
(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 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c)
:precision binary64
(/
x
(+
x
(*
y
(exp
(*
2.0
(-
(/ (* z (sqrt (+ t a))) t)
(* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))));
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = x / (x + (y * exp((2.0d0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0d0 / 6.0d0)) - (2.0d0 / (t * 3.0d0)))))))))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))));
}
def code(x, y, z, t, a, b, c): return x / (x + (y * math.exp((2.0 * (((z * math.sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))))
function code(x, y, z, t, a, b, c) return Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(z * sqrt(Float64(t + a))) / t) - Float64(Float64(b - c) * Float64(Float64(a + Float64(5.0 / 6.0)) - Float64(2.0 / Float64(t * 3.0)))))))))) end
function tmp = code(x, y, z, t, a, b, c) tmp = x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0))))))))); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(N[(z * N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] - N[(N[(b - c), $MachinePrecision] * N[(N[(a + N[(5.0 / 6.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{x + y \cdot e^{2 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} - \left(b - c\right) \cdot \left(\left(a + \frac{5}{6}\right) - \frac{2}{t \cdot 3}\right)\right)}}
\end{array}
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1
(+
(/ (* z (sqrt (+ t a))) t)
(* (- b c) (- (/ 2.0 (* t 3.0)) (+ a (/ 5.0 6.0)))))))
(if (<= t_1 INFINITY)
(/ x (+ x (* y (exp (* 2.0 t_1)))))
(/ x (fma y (exp (* -2.0 (* b (+ a 0.8333333333333334)))) x)))))
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 <= ((double) INFINITY)) {
tmp = x / (x + (y * exp((2.0 * t_1))));
} else {
tmp = x / fma(y, exp((-2.0 * (b * (a + 0.8333333333333334)))), x);
}
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 <= Inf) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * t_1))))); else tmp = Float64(x / fma(y, exp(Float64(-2.0 * Float64(b * Float64(a + 0.8333333333333334)))), x)); 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, Infinity], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[Exp[N[(-2.0 * N[(b * N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]]]
\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 \infty:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot t\_1}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(y, e^{-2 \cdot \left(b \cdot \left(a + 0.8333333333333334\right)\right)}, x\right)}\\
\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 100.0%
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 b around inf
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
+-commutativeN/A
lower-+.f6490.3
Simplified90.3%
Taylor expanded in t around inf
+-commutativeN/A
lower-fma.f64N/A
lower-exp.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-+.f6490.3
Simplified90.3%
Final simplification99.6%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (- (- (/ 0.6666666666666666 t) a) 0.8333333333333334))
(t_2 (sqrt (+ t a)))
(t_3
(+
(/ (* z t_2) t)
(* (- b c) (- (/ 2.0 (* t 3.0)) (+ a (/ 5.0 6.0)))))))
(if (<= t_3 -2e+21)
1.0
(if (<= t_3 1000000.0)
(/ x (+ x (fma 2.0 (* t_2 (/ (* z y) t)) y)))
(if (<= t_3 4e+133)
(* (- y x) (/ x (* (+ x y) (- y x))))
(if (<= t_3 2e+283)
(/ (* x 0.5) (* (* t_1 t_1) (* y (* c c))))
(/
x
(*
y
(*
c
(+
(fma
2.0
(+ 0.8333333333333334 (- a (/ 0.6666666666666666 t)))
(/ 1.0 c))
(/ x (* c y))))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((0.6666666666666666 / t) - a) - 0.8333333333333334;
double t_2 = sqrt((t + a));
double t_3 = ((z * t_2) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + (5.0 / 6.0))));
double tmp;
if (t_3 <= -2e+21) {
tmp = 1.0;
} else if (t_3 <= 1000000.0) {
tmp = x / (x + fma(2.0, (t_2 * ((z * y) / t)), y));
} else if (t_3 <= 4e+133) {
tmp = (y - x) * (x / ((x + y) * (y - x)));
} else if (t_3 <= 2e+283) {
tmp = (x * 0.5) / ((t_1 * t_1) * (y * (c * c)));
} else {
tmp = x / (y * (c * (fma(2.0, (0.8333333333333334 + (a - (0.6666666666666666 / t))), (1.0 / c)) + (x / (c * y)))));
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(0.6666666666666666 / t) - a) - 0.8333333333333334) t_2 = sqrt(Float64(t + a)) t_3 = Float64(Float64(Float64(z * t_2) / 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 <= -2e+21) tmp = 1.0; elseif (t_3 <= 1000000.0) tmp = Float64(x / Float64(x + fma(2.0, Float64(t_2 * Float64(Float64(z * y) / t)), y))); elseif (t_3 <= 4e+133) tmp = Float64(Float64(y - x) * Float64(x / Float64(Float64(x + y) * Float64(y - x)))); elseif (t_3 <= 2e+283) tmp = Float64(Float64(x * 0.5) / Float64(Float64(t_1 * t_1) * Float64(y * Float64(c * c)))); else tmp = Float64(x / Float64(y * Float64(c * Float64(fma(2.0, Float64(0.8333333333333334 + Float64(a - Float64(0.6666666666666666 / t))), Float64(1.0 / c)) + Float64(x / Float64(c * y)))))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(0.6666666666666666 / t), $MachinePrecision] - a), $MachinePrecision] - 0.8333333333333334), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(z * t$95$2), $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, -2e+21], 1.0, If[LessEqual[t$95$3, 1000000.0], N[(x / N[(x + N[(2.0 * N[(t$95$2 * N[(N[(z * y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 4e+133], N[(N[(y - x), $MachinePrecision] * N[(x / N[(N[(x + y), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 2e+283], N[(N[(x * 0.5), $MachinePrecision] / N[(N[(t$95$1 * t$95$1), $MachinePrecision] * N[(y * N[(c * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(c * N[(N[(2.0 * N[(0.8333333333333334 + N[(a - N[(0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / c), $MachinePrecision]), $MachinePrecision] + N[(x / N[(c * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\frac{0.6666666666666666}{t} - a\right) - 0.8333333333333334\\
t_2 := \sqrt{t + a}\\
t_3 := \frac{z \cdot t\_2}{t} + \left(b - c\right) \cdot \left(\frac{2}{t \cdot 3} - \left(a + \frac{5}{6}\right)\right)\\
\mathbf{if}\;t\_3 \leq -2 \cdot 10^{+21}:\\
\;\;\;\;1\\
\mathbf{elif}\;t\_3 \leq 1000000:\\
\;\;\;\;\frac{x}{x + \mathsf{fma}\left(2, t\_2 \cdot \frac{z \cdot y}{t}, y\right)}\\
\mathbf{elif}\;t\_3 \leq 4 \cdot 10^{+133}:\\
\;\;\;\;\left(y - x\right) \cdot \frac{x}{\left(x + y\right) \cdot \left(y - x\right)}\\
\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+283}:\\
\;\;\;\;\frac{x \cdot 0.5}{\left(t\_1 \cdot t\_1\right) \cdot \left(y \cdot \left(c \cdot c\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(c \cdot \left(\mathsf{fma}\left(2, 0.8333333333333334 + \left(a - \frac{0.6666666666666666}{t}\right), \frac{1}{c}\right) + \frac{x}{c \cdot y}\right)\right)}\\
\end{array}
\end{array}
if (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 #s(literal 5 binary64) #s(literal 6 binary64))) (/.f64 #s(literal 2 binary64) (*.f64 t #s(literal 3 binary64)))))) < -2e21Initial 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-+.f6465.9
Simplified65.9%
Taylor expanded in x around inf
Simplified100.0%
if -2e21 < (-.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)))))) < 1e6Initial program 100.0%
Taylor expanded in z around inf
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
+-commutativeN/A
lower-+.f64100.0
Simplified100.0%
Taylor expanded in z around 0
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f64N/A
lower-*.f6495.8
Simplified95.8%
if 1e6 < (-.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.0000000000000001e133Initial 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-+.f6456.0
Simplified56.0%
Taylor expanded in b around 0
+-commutativeN/A
lower-+.f6420.1
Simplified20.1%
flip-+N/A
associate-/r/N/A
lower-*.f64N/A
lower-/.f64N/A
difference-of-squaresN/A
lift-+.f64N/A
lower-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower--.f64N/A
lower--.f6471.8
Applied egg-rr71.8%
if 4.0000000000000001e133 < (-.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.99999999999999991e283Initial 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-/.f6467.1
Simplified67.1%
Taylor expanded in c around 0
+-commutativeN/A
lower-fma.f64N/A
Simplified81.4%
Taylor expanded in c around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
associate--l+N/A
lower-+.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
associate--l+N/A
lower-+.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6469.7
Simplified69.7%
if 1.99999999999999991e283 < (-.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 83.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-/.f6464.1
Simplified64.1%
Taylor expanded in c around 0
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
Simplified56.1%
Taylor expanded in y around inf
lower-*.f64N/A
associate-+r+N/A
lower-+.f64N/A
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
associate--l+N/A
lower-+.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
lower-/.f6462.5
Simplified62.5%
Taylor expanded in c around inf
lower-*.f64N/A
associate-+r+N/A
lower-+.f64N/A
lower-fma.f64N/A
associate--l+N/A
lower-+.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f6475.7
Simplified75.7%
Final simplification86.5%
(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 -2e+21)
1.0
(if (<= t_1 2e-20)
(/ x (+ x y))
(if (<= t_1 4e+133)
(* (- y x) (/ x (* (+ x y) (- y x))))
(/
x
(+ x (* y (fma c (* 0.8888888888888888 (/ c (* t t))) 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 <= -2e+21) {
tmp = 1.0;
} else if (t_1 <= 2e-20) {
tmp = x / (x + y);
} else if (t_1 <= 4e+133) {
tmp = (y - x) * (x / ((x + y) * (y - x)));
} else {
tmp = x / (x + (y * fma(c, (0.8888888888888888 * (c / (t * t))), 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 <= -2e+21) tmp = 1.0; elseif (t_1 <= 2e-20) tmp = Float64(x / Float64(x + y)); elseif (t_1 <= 4e+133) tmp = Float64(Float64(y - x) * Float64(x / Float64(Float64(x + y) * Float64(y - x)))); else tmp = Float64(x / Float64(x + Float64(y * fma(c, Float64(0.8888888888888888 * Float64(c / Float64(t * t))), 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, -2e+21], 1.0, If[LessEqual[t$95$1, 2e-20], N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 4e+133], N[(N[(y - x), $MachinePrecision] * N[(x / N[(N[(x + y), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[(c * N[(0.8888888888888888 * N[(c / N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\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 -2 \cdot 10^{+21}:\\
\;\;\;\;1\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-20}:\\
\;\;\;\;\frac{x}{x + y}\\
\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+133}:\\
\;\;\;\;\left(y - x\right) \cdot \frac{x}{\left(x + y\right) \cdot \left(y - x\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot \mathsf{fma}\left(c, 0.8888888888888888 \cdot \frac{c}{t \cdot t}, 1\right)}\\
\end{array}
\end{array}
if (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 #s(literal 5 binary64) #s(literal 6 binary64))) (/.f64 #s(literal 2 binary64) (*.f64 t #s(literal 3 binary64)))))) < -2e21Initial 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-+.f6465.9
Simplified65.9%
Taylor expanded in x around inf
Simplified100.0%
if -2e21 < (-.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.99999999999999989e-20Initial 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-+.f64100.0
Simplified100.0%
Taylor expanded in b around 0
+-commutativeN/A
lower-+.f64100.0
Simplified100.0%
if 1.99999999999999989e-20 < (-.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.0000000000000001e133Initial 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-+.f6455.6
Simplified55.6%
Taylor expanded in b around 0
+-commutativeN/A
lower-+.f6422.5
Simplified22.5%
flip-+N/A
associate-/r/N/A
lower-*.f64N/A
lower-/.f64N/A
difference-of-squaresN/A
lift-+.f64N/A
lower-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower--.f64N/A
lower--.f6470.3
Applied egg-rr70.3%
if 4.0000000000000001e133 < (-.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.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-/.f6465.3
Simplified65.3%
Taylor expanded in c around 0
+-commutativeN/A
lower-fma.f64N/A
Simplified83.7%
Taylor expanded in t around 0
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6462.5
Simplified62.5%
Final simplification82.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 -2e+21)
1.0
(if (<= t_1 2e-20)
(/ x (+ x y))
(if (<= t_1 5e+282)
(* (- y x) (/ x (* (+ x y) (- y x))))
(/
x
(*
y
(fma
(* c 2.0)
(+ 0.8333333333333334 (- a (/ 0.6666666666666666 t)))
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 <= -2e+21) {
tmp = 1.0;
} else if (t_1 <= 2e-20) {
tmp = x / (x + y);
} else if (t_1 <= 5e+282) {
tmp = (y - x) * (x / ((x + y) * (y - x)));
} else {
tmp = x / (y * fma((c * 2.0), (0.8333333333333334 + (a - (0.6666666666666666 / t))), 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 <= -2e+21) tmp = 1.0; elseif (t_1 <= 2e-20) tmp = Float64(x / Float64(x + y)); elseif (t_1 <= 5e+282) tmp = Float64(Float64(y - x) * Float64(x / Float64(Float64(x + y) * Float64(y - x)))); else tmp = Float64(x / Float64(y * fma(Float64(c * 2.0), Float64(0.8333333333333334 + Float64(a - Float64(0.6666666666666666 / t))), 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, -2e+21], 1.0, If[LessEqual[t$95$1, 2e-20], N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+282], N[(N[(y - x), $MachinePrecision] * N[(x / N[(N[(x + y), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(N[(c * 2.0), $MachinePrecision] * N[(0.8333333333333334 + N[(a - N[(0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\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 -2 \cdot 10^{+21}:\\
\;\;\;\;1\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-20}:\\
\;\;\;\;\frac{x}{x + y}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+282}:\\
\;\;\;\;\left(y - x\right) \cdot \frac{x}{\left(x + y\right) \cdot \left(y - x\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \mathsf{fma}\left(c \cdot 2, 0.8333333333333334 + \left(a - \frac{0.6666666666666666}{t}\right), 1\right)}\\
\end{array}
\end{array}
if (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 #s(literal 5 binary64) #s(literal 6 binary64))) (/.f64 #s(literal 2 binary64) (*.f64 t #s(literal 3 binary64)))))) < -2e21Initial 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-+.f6465.9
Simplified65.9%
Taylor expanded in x around inf
Simplified100.0%
if -2e21 < (-.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.99999999999999989e-20Initial 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-+.f64100.0
Simplified100.0%
Taylor expanded in b around 0
+-commutativeN/A
lower-+.f64100.0
Simplified100.0%
if 1.99999999999999989e-20 < (-.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.99999999999999978e282Initial 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-+.f6451.0
Simplified51.0%
Taylor expanded in b around 0
+-commutativeN/A
lower-+.f6417.0
Simplified17.0%
flip-+N/A
associate-/r/N/A
lower-*.f64N/A
lower-/.f64N/A
difference-of-squaresN/A
lift-+.f64N/A
lower-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower--.f64N/A
lower--.f6453.9
Applied egg-rr53.9%
if 4.99999999999999978e282 < (-.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 83.6%
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-/.f6465.2
Simplified65.2%
Taylor expanded in c around 0
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
Simplified54.5%
Taylor expanded in y around inf
lower-*.f64N/A
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
associate--l+N/A
lower-+.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6462.3
Simplified62.3%
Final simplification79.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 -2e+21)
1.0
(if (<= t_1 2e-20)
(/ x (+ x y))
(if (<= t_1 5e+262)
(* (- y x) (/ x (* (+ x y) (- y x))))
(/ x (* 0.8888888888888888 (/ (* y (* c c)) (* t t)))))))))
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 <= -2e+21) {
tmp = 1.0;
} else if (t_1 <= 2e-20) {
tmp = x / (x + y);
} else if (t_1 <= 5e+262) {
tmp = (y - x) * (x / ((x + y) * (y - x)));
} else {
tmp = x / (0.8888888888888888 * ((y * (c * c)) / (t * t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = ((z * sqrt((t + a))) / t) + ((b - c) * ((2.0d0 / (t * 3.0d0)) - (a + (5.0d0 / 6.0d0))))
if (t_1 <= (-2d+21)) then
tmp = 1.0d0
else if (t_1 <= 2d-20) then
tmp = x / (x + y)
else if (t_1 <= 5d+262) then
tmp = (y - x) * (x / ((x + y) * (y - x)))
else
tmp = x / (0.8888888888888888d0 * ((y * (c * c)) / (t * t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double 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 <= -2e+21) {
tmp = 1.0;
} else if (t_1 <= 2e-20) {
tmp = x / (x + y);
} else if (t_1 <= 5e+262) {
tmp = (y - x) * (x / ((x + y) * (y - x)));
} else {
tmp = x / (0.8888888888888888 * ((y * (c * c)) / (t * t)));
}
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 <= -2e+21: tmp = 1.0 elif t_1 <= 2e-20: tmp = x / (x + y) elif t_1 <= 5e+262: tmp = (y - x) * (x / ((x + y) * (y - x))) else: tmp = x / (0.8888888888888888 * ((y * (c * c)) / (t * t))) 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 <= -2e+21) tmp = 1.0; elseif (t_1 <= 2e-20) tmp = Float64(x / Float64(x + y)); elseif (t_1 <= 5e+262) tmp = Float64(Float64(y - x) * Float64(x / Float64(Float64(x + y) * Float64(y - x)))); else tmp = Float64(x / Float64(0.8888888888888888 * Float64(Float64(y * Float64(c * c)) / Float64(t * t)))); 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 <= -2e+21) tmp = 1.0; elseif (t_1 <= 2e-20) tmp = x / (x + y); elseif (t_1 <= 5e+262) tmp = (y - x) * (x / ((x + y) * (y - x))); else tmp = x / (0.8888888888888888 * ((y * (c * c)) / (t * t))); 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, -2e+21], 1.0, If[LessEqual[t$95$1, 2e-20], N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+262], N[(N[(y - x), $MachinePrecision] * N[(x / N[(N[(x + y), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(0.8888888888888888 * N[(N[(y * N[(c * c), $MachinePrecision]), $MachinePrecision] / N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\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 -2 \cdot 10^{+21}:\\
\;\;\;\;1\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-20}:\\
\;\;\;\;\frac{x}{x + y}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+262}:\\
\;\;\;\;\left(y - x\right) \cdot \frac{x}{\left(x + y\right) \cdot \left(y - x\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{0.8888888888888888 \cdot \frac{y \cdot \left(c \cdot c\right)}{t \cdot t}}\\
\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)))))) < -2e21Initial 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-+.f6465.9
Simplified65.9%
Taylor expanded in x around inf
Simplified100.0%
if -2e21 < (-.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.99999999999999989e-20Initial 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-+.f64100.0
Simplified100.0%
Taylor expanded in b around 0
+-commutativeN/A
lower-+.f64100.0
Simplified100.0%
if 1.99999999999999989e-20 < (-.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.00000000000000008e262Initial 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-+.f6449.4
Simplified49.4%
Taylor expanded in b around 0
+-commutativeN/A
lower-+.f6417.9
Simplified17.9%
flip-+N/A
associate-/r/N/A
lower-*.f64N/A
lower-/.f64N/A
difference-of-squaresN/A
lift-+.f64N/A
lower-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower--.f64N/A
lower--.f6455.6
Applied egg-rr55.6%
if 5.00000000000000008e262 < (-.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 84.6%
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-/.f6465.9
Simplified65.9%
Taylor expanded in c around 0
+-commutativeN/A
lower-fma.f64N/A
Simplified86.6%
Taylor expanded in t around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6459.1
Simplified59.1%
Final simplification79.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))))))))))
5e-45)
(* (- y x) (/ x (* (+ x y) (- 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)))))))))) <= 5e-45) {
tmp = (y - x) * (x / ((x + y) * (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)))))))))) <= 5d-45) then
tmp = (y - x) * (x / ((x + y) * (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)))))))))) <= 5e-45) {
tmp = (y - x) * (x / ((x + y) * (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)))))))))) <= 5e-45: tmp = (y - x) * (x / ((x + y) * (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)))))))))) <= 5e-45) tmp = Float64(Float64(y - x) * Float64(x / Float64(Float64(x + y) * Float64(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)))))))))) <= 5e-45) tmp = (y - x) * (x / ((x + y) * (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], 5e-45], N[(N[(y - x), $MachinePrecision] * N[(x / N[(N[(x + y), $MachinePrecision] * N[(y - x), $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 5 \cdot 10^{-45}:\\
\;\;\;\;\left(y - x\right) \cdot \frac{x}{\left(x + y\right) \cdot \left(y - 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))))))))))) < 4.99999999999999976e-45Initial 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-+.f6459.5
Simplified59.5%
Taylor expanded in b around 0
+-commutativeN/A
lower-+.f6422.3
Simplified22.3%
flip-+N/A
associate-/r/N/A
lower-*.f64N/A
lower-/.f64N/A
difference-of-squaresN/A
lift-+.f64N/A
lower-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower--.f64N/A
lower--.f6453.1
Applied egg-rr53.1%
if 4.99999999999999976e-45 < (/.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 92.4%
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-+.f6471.1
Simplified71.1%
Taylor expanded in x around inf
Simplified96.3%
Final simplification75.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))))))))))
5e-45)
(/ 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)))))))))) <= 5e-45) {
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)))))))))) <= 5d-45) 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)))))))))) <= 5e-45) {
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)))))))))) <= 5e-45: 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)))))))))) <= 5e-45) 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)))))))))) <= 5e-45) 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], 5e-45], 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 5 \cdot 10^{-45}:\\
\;\;\;\;\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))))))))))) < 4.99999999999999976e-45Initial 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-+.f6459.5
Simplified59.5%
Taylor expanded in b around 0
+-commutativeN/A
lower-+.f6422.3
Simplified22.3%
if 4.99999999999999976e-45 < (/.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 92.4%
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-+.f6471.1
Simplified71.1%
Taylor expanded in x around inf
Simplified96.3%
Final simplification60.5%
(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))))))))))
5e-45)
(/ 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)))))))))) <= 5e-45) {
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)))))))))) <= 5d-45) 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)))))))))) <= 5e-45) {
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)))))))))) <= 5e-45: 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)))))))))) <= 5e-45) 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)))))))))) <= 5e-45) 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], 5e-45], 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 5 \cdot 10^{-45}:\\
\;\;\;\;\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))))))))))) < 4.99999999999999976e-45Initial 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-+.f6459.5
Simplified59.5%
Taylor expanded in b around 0
+-commutativeN/A
lower-+.f6422.3
Simplified22.3%
Taylor expanded in x around 0
lower-/.f6421.9
Simplified21.9%
if 4.99999999999999976e-45 < (/.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 92.4%
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-+.f6471.1
Simplified71.1%
Taylor expanded in x around inf
Simplified96.3%
Final simplification60.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 -2e+21)
1.0
(if (<= t_1 2e+24)
(/ x (+ x y))
(/ (* x 0.5) (* c (* y (+ a 0.8333333333333334))))))))
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 <= -2e+21) {
tmp = 1.0;
} else if (t_1 <= 2e+24) {
tmp = x / (x + y);
} else {
tmp = (x * 0.5) / (c * (y * (a + 0.8333333333333334)));
}
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 = ((z * sqrt((t + a))) / t) + ((b - c) * ((2.0d0 / (t * 3.0d0)) - (a + (5.0d0 / 6.0d0))))
if (t_1 <= (-2d+21)) then
tmp = 1.0d0
else if (t_1 <= 2d+24) then
tmp = x / (x + y)
else
tmp = (x * 0.5d0) / (c * (y * (a + 0.8333333333333334d0)))
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) + ((b - c) * ((2.0 / (t * 3.0)) - (a + (5.0 / 6.0))));
double tmp;
if (t_1 <= -2e+21) {
tmp = 1.0;
} else if (t_1 <= 2e+24) {
tmp = x / (x + y);
} else {
tmp = (x * 0.5) / (c * (y * (a + 0.8333333333333334)));
}
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 <= -2e+21: tmp = 1.0 elif t_1 <= 2e+24: tmp = x / (x + y) else: tmp = (x * 0.5) / (c * (y * (a + 0.8333333333333334))) 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 <= -2e+21) tmp = 1.0; elseif (t_1 <= 2e+24) tmp = Float64(x / Float64(x + y)); else tmp = Float64(Float64(x * 0.5) / Float64(c * Float64(y * Float64(a + 0.8333333333333334)))); 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 <= -2e+21) tmp = 1.0; elseif (t_1 <= 2e+24) tmp = x / (x + y); else tmp = (x * 0.5) / (c * (y * (a + 0.8333333333333334))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(z * N[Sqrt[N[(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, -2e+21], 1.0, If[LessEqual[t$95$1, 2e+24], N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision], N[(N[(x * 0.5), $MachinePrecision] / N[(c * N[(y * N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\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 -2 \cdot 10^{+21}:\\
\;\;\;\;1\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+24}:\\
\;\;\;\;\frac{x}{x + y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot 0.5}{c \cdot \left(y \cdot \left(a + 0.8333333333333334\right)\right)}\\
\end{array}
\end{array}
if (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 #s(literal 5 binary64) #s(literal 6 binary64))) (/.f64 #s(literal 2 binary64) (*.f64 t #s(literal 3 binary64)))))) < -2e21Initial 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-+.f6465.9
Simplified65.9%
Taylor expanded in x around inf
Simplified100.0%
if -2e21 < (-.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)))))) < 2e24Initial 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-+.f6492.5
Simplified92.5%
Taylor expanded in b around 0
+-commutativeN/A
lower-+.f6488.8
Simplified88.8%
if 2e24 < (-.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 91.7%
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-/.f6462.6
Simplified62.6%
Taylor expanded in c around 0
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
Simplified40.6%
Taylor expanded in c around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.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-/.f6438.6
Simplified38.6%
Taylor expanded in t around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-+.f6436.2
Simplified36.2%
Final simplification68.7%
(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 -2e+21)
1.0
(if (<= t_1 5e+137) (/ x (+ x y)) (/ x (+ x (* 2.0 (* a (* c y)))))))))
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 <= -2e+21) {
tmp = 1.0;
} else if (t_1 <= 5e+137) {
tmp = x / (x + y);
} else {
tmp = x / (x + (2.0 * (a * (c * y))));
}
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 = ((z * sqrt((t + a))) / t) + ((b - c) * ((2.0d0 / (t * 3.0d0)) - (a + (5.0d0 / 6.0d0))))
if (t_1 <= (-2d+21)) then
tmp = 1.0d0
else if (t_1 <= 5d+137) then
tmp = x / (x + y)
else
tmp = x / (x + (2.0d0 * (a * (c * y))))
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) + ((b - c) * ((2.0 / (t * 3.0)) - (a + (5.0 / 6.0))));
double tmp;
if (t_1 <= -2e+21) {
tmp = 1.0;
} else if (t_1 <= 5e+137) {
tmp = x / (x + y);
} else {
tmp = x / (x + (2.0 * (a * (c * y))));
}
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 <= -2e+21: tmp = 1.0 elif t_1 <= 5e+137: tmp = x / (x + y) else: tmp = x / (x + (2.0 * (a * (c * y)))) 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 <= -2e+21) tmp = 1.0; elseif (t_1 <= 5e+137) tmp = Float64(x / Float64(x + y)); else tmp = Float64(x / Float64(x + Float64(2.0 * Float64(a * Float64(c * y))))); 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 <= -2e+21) tmp = 1.0; elseif (t_1 <= 5e+137) tmp = x / (x + y); else tmp = x / (x + (2.0 * (a * (c * y)))); 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, -2e+21], 1.0, If[LessEqual[t$95$1, 5e+137], N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(2.0 * N[(a * N[(c * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\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 -2 \cdot 10^{+21}:\\
\;\;\;\;1\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+137}:\\
\;\;\;\;\frac{x}{x + y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + 2 \cdot \left(a \cdot \left(c \cdot y\right)\right)}\\
\end{array}
\end{array}
if (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 #s(literal 5 binary64) #s(literal 6 binary64))) (/.f64 #s(literal 2 binary64) (*.f64 t #s(literal 3 binary64)))))) < -2e21Initial 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-+.f6465.9
Simplified65.9%
Taylor expanded in x around inf
Simplified100.0%
if -2e21 < (-.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.0000000000000002e137Initial 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-+.f6472.5
Simplified72.5%
Taylor expanded in b around 0
+-commutativeN/A
lower-+.f6454.9
Simplified54.9%
if 5.0000000000000002e137 < (-.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.8%
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-/.f6465.6
Simplified65.6%
Taylor expanded in c around 0
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
Simplified44.3%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6431.6
Simplified31.6%
Final simplification65.2%
(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 -2e+21)
1.0
(if (<= t_1 4e+133) (/ x (+ x y)) (/ (* -0.75 (* t x)) (* c y))))))
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 <= -2e+21) {
tmp = 1.0;
} else if (t_1 <= 4e+133) {
tmp = x / (x + y);
} else {
tmp = (-0.75 * (t * x)) / (c * y);
}
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 = ((z * sqrt((t + a))) / t) + ((b - c) * ((2.0d0 / (t * 3.0d0)) - (a + (5.0d0 / 6.0d0))))
if (t_1 <= (-2d+21)) then
tmp = 1.0d0
else if (t_1 <= 4d+133) then
tmp = x / (x + y)
else
tmp = ((-0.75d0) * (t * x)) / (c * y)
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) + ((b - c) * ((2.0 / (t * 3.0)) - (a + (5.0 / 6.0))));
double tmp;
if (t_1 <= -2e+21) {
tmp = 1.0;
} else if (t_1 <= 4e+133) {
tmp = x / (x + y);
} else {
tmp = (-0.75 * (t * x)) / (c * y);
}
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 <= -2e+21: tmp = 1.0 elif t_1 <= 4e+133: tmp = x / (x + y) else: tmp = (-0.75 * (t * x)) / (c * y) 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 <= -2e+21) tmp = 1.0; elseif (t_1 <= 4e+133) tmp = Float64(x / Float64(x + y)); else tmp = Float64(Float64(-0.75 * Float64(t * x)) / Float64(c * y)); 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 <= -2e+21) tmp = 1.0; elseif (t_1 <= 4e+133) tmp = x / (x + y); else tmp = (-0.75 * (t * x)) / (c * y); 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, -2e+21], 1.0, If[LessEqual[t$95$1, 4e+133], N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision], N[(N[(-0.75 * N[(t * x), $MachinePrecision]), $MachinePrecision] / N[(c * y), $MachinePrecision]), $MachinePrecision]]]]
\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 -2 \cdot 10^{+21}:\\
\;\;\;\;1\\
\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+133}:\\
\;\;\;\;\frac{x}{x + y}\\
\mathbf{else}:\\
\;\;\;\;\frac{-0.75 \cdot \left(t \cdot x\right)}{c \cdot y}\\
\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)))))) < -2e21Initial 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-+.f6465.9
Simplified65.9%
Taylor expanded in x around inf
Simplified100.0%
if -2e21 < (-.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.0000000000000001e133Initial 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-+.f6475.5
Simplified75.5%
Taylor expanded in b around 0
+-commutativeN/A
lower-+.f6457.1
Simplified57.1%
if 4.0000000000000001e133 < (-.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.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-/.f6465.3
Simplified65.3%
Taylor expanded in c around 0
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
Simplified43.5%
Taylor expanded in t around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6430.4
Simplified30.4%
Final simplification64.9%
(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 -2e+21)
1.0
(if (<= t_1 1e+235) (/ x (+ x y)) (/ x (* y (* 2.0 (* a c))))))))
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 <= -2e+21) {
tmp = 1.0;
} else if (t_1 <= 1e+235) {
tmp = x / (x + y);
} else {
tmp = x / (y * (2.0 * (a * c)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = ((z * sqrt((t + a))) / t) + ((b - c) * ((2.0d0 / (t * 3.0d0)) - (a + (5.0d0 / 6.0d0))))
if (t_1 <= (-2d+21)) then
tmp = 1.0d0
else if (t_1 <= 1d+235) then
tmp = x / (x + y)
else
tmp = x / (y * (2.0d0 * (a * c)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((z * Math.sqrt((t + a))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + (5.0 / 6.0))));
double tmp;
if (t_1 <= -2e+21) {
tmp = 1.0;
} else if (t_1 <= 1e+235) {
tmp = x / (x + y);
} else {
tmp = x / (y * (2.0 * (a * c)));
}
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 <= -2e+21: tmp = 1.0 elif t_1 <= 1e+235: tmp = x / (x + y) else: tmp = x / (y * (2.0 * (a * c))) 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 <= -2e+21) tmp = 1.0; elseif (t_1 <= 1e+235) tmp = Float64(x / Float64(x + y)); else tmp = Float64(x / Float64(y * Float64(2.0 * Float64(a * c)))); 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 <= -2e+21) tmp = 1.0; elseif (t_1 <= 1e+235) tmp = x / (x + y); else tmp = x / (y * (2.0 * (a * c))); 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, -2e+21], 1.0, If[LessEqual[t$95$1, 1e+235], N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(2.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\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 -2 \cdot 10^{+21}:\\
\;\;\;\;1\\
\mathbf{elif}\;t\_1 \leq 10^{+235}:\\
\;\;\;\;\frac{x}{x + y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(2 \cdot \left(a \cdot c\right)\right)}\\
\end{array}
\end{array}
if (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 #s(literal 5 binary64) #s(literal 6 binary64))) (/.f64 #s(literal 2 binary64) (*.f64 t #s(literal 3 binary64)))))) < -2e21Initial 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-+.f6465.9
Simplified65.9%
Taylor expanded in x around inf
Simplified100.0%
if -2e21 < (-.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.0000000000000001e235Initial 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-+.f6464.8
Simplified64.8%
Taylor expanded in b around 0
+-commutativeN/A
lower-+.f6442.7
Simplified42.7%
if 1.0000000000000001e235 < (-.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.3%
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
Simplified64.4%
Taylor expanded in c around 0
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
Simplified51.4%
Taylor expanded in y around inf
lower-*.f64N/A
associate-+r+N/A
lower-+.f64N/A
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
associate--l+N/A
lower-+.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
lower-/.f6457.9
Simplified57.9%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f6432.9
Simplified32.9%
Final simplification64.3%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (- (- (/ 0.6666666666666666 t) a) 0.8333333333333334)))
(if (<=
(+
(/ (* z (sqrt (+ t a))) t)
(* (- b c) (- (/ 2.0 (* t 3.0)) (+ a (/ 5.0 6.0)))))
-2e+21)
1.0
(/
x
(+
x
(*
y
(fma
c
(*
2.0
(fma
c
(* t_1 t_1)
(+ 0.8333333333333334 (- a (/ 0.6666666666666666 t)))))
1.0)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((0.6666666666666666 / t) - a) - 0.8333333333333334;
double tmp;
if ((((z * sqrt((t + a))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + (5.0 / 6.0))))) <= -2e+21) {
tmp = 1.0;
} else {
tmp = x / (x + (y * fma(c, (2.0 * fma(c, (t_1 * t_1), (0.8333333333333334 + (a - (0.6666666666666666 / t))))), 1.0)));
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(0.6666666666666666 / t) - a) - 0.8333333333333334) tmp = 0.0 if (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+21) tmp = 1.0; else tmp = Float64(x / Float64(x + Float64(y * fma(c, Float64(2.0 * fma(c, Float64(t_1 * t_1), Float64(0.8333333333333334 + Float64(a - Float64(0.6666666666666666 / t))))), 1.0)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(0.6666666666666666 / t), $MachinePrecision] - a), $MachinePrecision] - 0.8333333333333334), $MachinePrecision]}, If[LessEqual[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], -2e+21], 1.0, N[(x / N[(x + N[(y * N[(c * N[(2.0 * N[(c * N[(t$95$1 * t$95$1), $MachinePrecision] + N[(0.8333333333333334 + N[(a - N[(0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\frac{0.6666666666666666}{t} - a\right) - 0.8333333333333334\\
\mathbf{if}\;\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) \leq -2 \cdot 10^{+21}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot \mathsf{fma}\left(c, 2 \cdot \mathsf{fma}\left(c, t\_1 \cdot t\_1, 0.8333333333333334 + \left(a - \frac{0.6666666666666666}{t}\right)\right), 1\right)}\\
\end{array}
\end{array}
if (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 #s(literal 5 binary64) #s(literal 6 binary64))) (/.f64 #s(literal 2 binary64) (*.f64 t #s(literal 3 binary64)))))) < -2e21Initial 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-+.f6465.9
Simplified65.9%
Taylor expanded in x around inf
Simplified100.0%
if -2e21 < (-.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 93.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-/.f6467.2
Simplified67.2%
Taylor expanded in c around 0
+-commutativeN/A
lower-fma.f64N/A
Simplified79.7%
Final simplification88.3%
(FPCore (x y z t a b c)
:precision binary64
(if (<=
(+
(/ (* z (sqrt (+ t a))) t)
(* (- b c) (- (/ 2.0 (* t 3.0)) (+ a (/ 5.0 6.0)))))
-2e+21)
1.0
(/
x
(fma
y
(fma
c
(*
2.0
(fma
c
(* (+ a 0.8333333333333334) (+ a 0.8333333333333334))
(+ a 0.8333333333333334)))
1.0)
x))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((((z * sqrt((t + a))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + (5.0 / 6.0))))) <= -2e+21) {
tmp = 1.0;
} else {
tmp = x / fma(y, fma(c, (2.0 * fma(c, ((a + 0.8333333333333334) * (a + 0.8333333333333334)), (a + 0.8333333333333334))), 1.0), x);
}
return tmp;
}
function code(x, y, z, t, a, b, c) tmp = 0.0 if (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+21) tmp = 1.0; else tmp = Float64(x / fma(y, fma(c, Float64(2.0 * fma(c, Float64(Float64(a + 0.8333333333333334) * Float64(a + 0.8333333333333334)), Float64(a + 0.8333333333333334))), 1.0), x)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[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], -2e+21], 1.0, N[(x / N[(y * N[(c * N[(2.0 * N[(c * N[(N[(a + 0.8333333333333334), $MachinePrecision] * N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision] + N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\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) \leq -2 \cdot 10^{+21}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(y, \mathsf{fma}\left(c, 2 \cdot \mathsf{fma}\left(c, \left(a + 0.8333333333333334\right) \cdot \left(a + 0.8333333333333334\right), a + 0.8333333333333334\right), 1\right), x\right)}\\
\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)))))) < -2e21Initial 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-+.f6465.9
Simplified65.9%
Taylor expanded in x around inf
Simplified100.0%
if -2e21 < (-.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 93.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-/.f6467.2
Simplified67.2%
Taylor expanded in t around inf
+-commutativeN/A
lower-fma.f64N/A
lower-exp.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-+.f6455.4
Simplified55.4%
Taylor expanded in c around 0
+-commutativeN/A
lower-fma.f64N/A
distribute-lft-outN/A
lower-*.f64N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f6467.9
Simplified67.9%
Final simplification81.6%
(FPCore (x y z t a b c) :precision binary64 1.0)
double code(double x, double y, double z, double t, double a, double b, double c) {
return 1.0;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = 1.0d0
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return 1.0;
}
def code(x, y, z, t, a, b, c): return 1.0
function code(x, y, z, t, a, b, c) return 1.0 end
function tmp = code(x, y, z, t, a, b, c) tmp = 1.0; end
code[x_, y_, z_, t_, a_, b_, c_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 96.1%
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-+.f6465.5
Simplified65.5%
Taylor expanded in x around inf
Simplified51.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 2024207
(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)))))))))))