
(FPCore (x y z t a b) :precision binary64 (* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b))));
}
real(8) function code(x, y, z, t, a, b)
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
code = x * exp(((y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x * Math.exp(((y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b))));
}
def code(x, y, z, t, a, b): return x * math.exp(((y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b))))
function code(x, y, z, t, a, b) return Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))))) end
function tmp = code(x, y, z, t, a, b) tmp = x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b)))); end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 24 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b))));
}
real(8) function code(x, y, z, t, a, b)
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
code = x * exp(((y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x * Math.exp(((y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b))));
}
def code(x, y, z, t, a, b): return x * math.exp(((y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b))))
function code(x, y, z, t, a, b) return Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))))) end
function tmp = code(x, y, z, t, a, b) tmp = x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b)))); end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}
\end{array}
(FPCore (x y z t a b) :precision binary64 (* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b))));
}
real(8) function code(x, y, z, t, a, b)
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
code = x * exp(((y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x * Math.exp(((y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b))));
}
def code(x, y, z, t, a, b): return x * math.exp(((y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b))))
function code(x, y, z, t, a, b) return Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))))) end
function tmp = code(x, y, z, t, a, b) tmp = x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b)))); end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}
\end{array}
Initial program 96.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))
(if (<= t_1 -4e+141)
(/
x
(fma t (fma t (* (* y y) (fma (* t 0.16666666666666666) y 0.5)) y) 1.0))
(if (<= t_1 -20000000000.0)
(* x (* b (* 0.5 (* b (* a a)))))
(if (<= t_1 0.0002)
(* x (fma b (fma b (* 0.5 (* a a)) (- a)) 1.0))
(if (<= t_1 5e+164)
(* a (* a (fma b (fma b (* x 0.5) (/ x (- a))) (/ x (* a a)))))
(if (<= t_1 1e+213)
(*
x
(fma
t
(fma t (* (* y y) (fma (* t -0.16666666666666666) y 0.5)) (- y))
1.0))
(fma t (* x (* y (fma (* t 0.5) y -1.0))) x))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
double tmp;
if (t_1 <= -4e+141) {
tmp = x / fma(t, fma(t, ((y * y) * fma((t * 0.16666666666666666), y, 0.5)), y), 1.0);
} else if (t_1 <= -20000000000.0) {
tmp = x * (b * (0.5 * (b * (a * a))));
} else if (t_1 <= 0.0002) {
tmp = x * fma(b, fma(b, (0.5 * (a * a)), -a), 1.0);
} else if (t_1 <= 5e+164) {
tmp = a * (a * fma(b, fma(b, (x * 0.5), (x / -a)), (x / (a * a))));
} else if (t_1 <= 1e+213) {
tmp = x * fma(t, fma(t, ((y * y) * fma((t * -0.16666666666666666), y, 0.5)), -y), 1.0);
} else {
tmp = fma(t, (x * (y * fma((t * 0.5), y, -1.0))), x);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))) tmp = 0.0 if (t_1 <= -4e+141) tmp = Float64(x / fma(t, fma(t, Float64(Float64(y * y) * fma(Float64(t * 0.16666666666666666), y, 0.5)), y), 1.0)); elseif (t_1 <= -20000000000.0) tmp = Float64(x * Float64(b * Float64(0.5 * Float64(b * Float64(a * a))))); elseif (t_1 <= 0.0002) tmp = Float64(x * fma(b, fma(b, Float64(0.5 * Float64(a * a)), Float64(-a)), 1.0)); elseif (t_1 <= 5e+164) tmp = Float64(a * Float64(a * fma(b, fma(b, Float64(x * 0.5), Float64(x / Float64(-a))), Float64(x / Float64(a * a))))); elseif (t_1 <= 1e+213) tmp = Float64(x * fma(t, fma(t, Float64(Float64(y * y) * fma(Float64(t * -0.16666666666666666), y, 0.5)), Float64(-y)), 1.0)); else tmp = fma(t, Float64(x * Float64(y * fma(Float64(t * 0.5), y, -1.0))), x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+141], N[(x / N[(t * N[(t * N[(N[(y * y), $MachinePrecision] * N[(N[(t * 0.16666666666666666), $MachinePrecision] * y + 0.5), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -20000000000.0], N[(x * N[(b * N[(0.5 * N[(b * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0002], N[(x * N[(b * N[(b * N[(0.5 * N[(a * a), $MachinePrecision]), $MachinePrecision] + (-a)), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+164], N[(a * N[(a * N[(b * N[(b * N[(x * 0.5), $MachinePrecision] + N[(x / (-a)), $MachinePrecision]), $MachinePrecision] + N[(x / N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+213], N[(x * N[(t * N[(t * N[(N[(y * y), $MachinePrecision] * N[(N[(t * -0.16666666666666666), $MachinePrecision] * y + 0.5), $MachinePrecision]), $MachinePrecision] + (-y)), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(t * N[(x * N[(y * N[(N[(t * 0.5), $MachinePrecision] * y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+141}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(t, \mathsf{fma}\left(t, \left(y \cdot y\right) \cdot \mathsf{fma}\left(t \cdot 0.16666666666666666, y, 0.5\right), y\right), 1\right)}\\
\mathbf{elif}\;t\_1 \leq -20000000000:\\
\;\;\;\;x \cdot \left(b \cdot \left(0.5 \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)\right)\\
\mathbf{elif}\;t\_1 \leq 0.0002:\\
\;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, 0.5 \cdot \left(a \cdot a\right), -a\right), 1\right)\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+164}:\\
\;\;\;\;a \cdot \left(a \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, x \cdot 0.5, \frac{x}{-a}\right), \frac{x}{a \cdot a}\right)\right)\\
\mathbf{elif}\;t\_1 \leq 10^{+213}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(t, \mathsf{fma}\left(t, \left(y \cdot y\right) \cdot \mathsf{fma}\left(t \cdot -0.16666666666666666, y, 0.5\right), -y\right), 1\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t, x \cdot \left(y \cdot \mathsf{fma}\left(t \cdot 0.5, y, -1\right)\right), x\right)\\
\end{array}
\end{array}
if (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -4.00000000000000007e141Initial program 100.0%
Taylor expanded in t around inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6449.3
Simplified49.3%
exp-prodN/A
pow-negN/A
un-div-invN/A
/-lowering-/.f64N/A
pow-expN/A
exp-lowering-exp.f64N/A
*-lowering-*.f6449.3
Applied egg-rr49.3%
Taylor expanded in t around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
associate-*r*N/A
cube-multN/A
unpow2N/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6479.1
Simplified79.1%
if -4.00000000000000007e141 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -2e10Initial program 100.0%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6448.4
Simplified48.4%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
mul-1-negN/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f642.7
Simplified2.7%
Taylor expanded in b around inf
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
distribute-neg-fracN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-outN/A
+-commutativeN/A
sub-negN/A
*-lowering-*.f64N/A
sub-negN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f6427.2
Simplified27.2%
Taylor expanded in b around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6445.1
Simplified45.1%
if -2e10 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 2.0000000000000001e-4Initial program 88.6%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6486.0
Simplified86.0%
Taylor expanded in b around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f6489.4
Simplified89.4%
if 2.0000000000000001e-4 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 4.9999999999999995e164Initial program 92.6%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6458.9
Simplified58.9%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
mul-1-negN/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6437.7
Simplified37.7%
Taylor expanded in a around inf
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-+r+N/A
Simplified56.3%
if 4.9999999999999995e164 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 9.99999999999999984e212Initial program 100.0%
Taylor expanded in t around inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6460.8
Simplified60.8%
Taylor expanded in t around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
associate-*r*N/A
cube-multN/A
unpow2N/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f6480.2
Simplified80.2%
if 9.99999999999999984e212 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 98.0%
Taylor expanded in t around inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6458.5
Simplified58.5%
Taylor expanded in t around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified70.4%
Final simplification71.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))
(if (<= t_1 -4e+141)
(/
x
(fma t (fma t (* (* y y) (fma (* t 0.16666666666666666) y 0.5)) y) 1.0))
(if (<= t_1 -20000000000.0)
(* x (* b (* 0.5 (* b (* a a)))))
(if (<= t_1 2000000000000.0)
(* x (fma b (fma b (* 0.5 (* a a)) (- a)) 1.0))
(if (<= t_1 1e+80)
(* a (* a (/ x (* a a))))
(if (<= t_1 2e+225)
(* x (fma a (- (* (* (+ z b) (+ z b)) (* a 0.5)) (+ z b)) 1.0))
(fma t (* x (* y (fma (* t 0.5) y -1.0))) x))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
double tmp;
if (t_1 <= -4e+141) {
tmp = x / fma(t, fma(t, ((y * y) * fma((t * 0.16666666666666666), y, 0.5)), y), 1.0);
} else if (t_1 <= -20000000000.0) {
tmp = x * (b * (0.5 * (b * (a * a))));
} else if (t_1 <= 2000000000000.0) {
tmp = x * fma(b, fma(b, (0.5 * (a * a)), -a), 1.0);
} else if (t_1 <= 1e+80) {
tmp = a * (a * (x / (a * a)));
} else if (t_1 <= 2e+225) {
tmp = x * fma(a, ((((z + b) * (z + b)) * (a * 0.5)) - (z + b)), 1.0);
} else {
tmp = fma(t, (x * (y * fma((t * 0.5), y, -1.0))), x);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))) tmp = 0.0 if (t_1 <= -4e+141) tmp = Float64(x / fma(t, fma(t, Float64(Float64(y * y) * fma(Float64(t * 0.16666666666666666), y, 0.5)), y), 1.0)); elseif (t_1 <= -20000000000.0) tmp = Float64(x * Float64(b * Float64(0.5 * Float64(b * Float64(a * a))))); elseif (t_1 <= 2000000000000.0) tmp = Float64(x * fma(b, fma(b, Float64(0.5 * Float64(a * a)), Float64(-a)), 1.0)); elseif (t_1 <= 1e+80) tmp = Float64(a * Float64(a * Float64(x / Float64(a * a)))); elseif (t_1 <= 2e+225) tmp = Float64(x * fma(a, Float64(Float64(Float64(Float64(z + b) * Float64(z + b)) * Float64(a * 0.5)) - Float64(z + b)), 1.0)); else tmp = fma(t, Float64(x * Float64(y * fma(Float64(t * 0.5), y, -1.0))), x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+141], N[(x / N[(t * N[(t * N[(N[(y * y), $MachinePrecision] * N[(N[(t * 0.16666666666666666), $MachinePrecision] * y + 0.5), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -20000000000.0], N[(x * N[(b * N[(0.5 * N[(b * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2000000000000.0], N[(x * N[(b * N[(b * N[(0.5 * N[(a * a), $MachinePrecision]), $MachinePrecision] + (-a)), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+80], N[(a * N[(a * N[(x / N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+225], N[(x * N[(a * N[(N[(N[(N[(z + b), $MachinePrecision] * N[(z + b), $MachinePrecision]), $MachinePrecision] * N[(a * 0.5), $MachinePrecision]), $MachinePrecision] - N[(z + b), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(t * N[(x * N[(y * N[(N[(t * 0.5), $MachinePrecision] * y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+141}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(t, \mathsf{fma}\left(t, \left(y \cdot y\right) \cdot \mathsf{fma}\left(t \cdot 0.16666666666666666, y, 0.5\right), y\right), 1\right)}\\
\mathbf{elif}\;t\_1 \leq -20000000000:\\
\;\;\;\;x \cdot \left(b \cdot \left(0.5 \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)\right)\\
\mathbf{elif}\;t\_1 \leq 2000000000000:\\
\;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, 0.5 \cdot \left(a \cdot a\right), -a\right), 1\right)\\
\mathbf{elif}\;t\_1 \leq 10^{+80}:\\
\;\;\;\;a \cdot \left(a \cdot \frac{x}{a \cdot a}\right)\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+225}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(a, \left(\left(z + b\right) \cdot \left(z + b\right)\right) \cdot \left(a \cdot 0.5\right) - \left(z + b\right), 1\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t, x \cdot \left(y \cdot \mathsf{fma}\left(t \cdot 0.5, y, -1\right)\right), x\right)\\
\end{array}
\end{array}
if (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -4.00000000000000007e141Initial program 100.0%
Taylor expanded in t around inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6449.3
Simplified49.3%
exp-prodN/A
pow-negN/A
un-div-invN/A
/-lowering-/.f64N/A
pow-expN/A
exp-lowering-exp.f64N/A
*-lowering-*.f6449.3
Applied egg-rr49.3%
Taylor expanded in t around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
associate-*r*N/A
cube-multN/A
unpow2N/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6479.1
Simplified79.1%
if -4.00000000000000007e141 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -2e10Initial program 100.0%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6448.4
Simplified48.4%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
mul-1-negN/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f642.7
Simplified2.7%
Taylor expanded in b around inf
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
distribute-neg-fracN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-outN/A
+-commutativeN/A
sub-negN/A
*-lowering-*.f64N/A
sub-negN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f6427.2
Simplified27.2%
Taylor expanded in b around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6445.1
Simplified45.1%
if -2e10 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 2e12Initial program 89.2%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6486.7
Simplified86.7%
Taylor expanded in b around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f6486.5
Simplified86.5%
if 2e12 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 1e80Initial program 85.9%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6430.7
Simplified30.7%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
mul-1-negN/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6410.4
Simplified10.4%
Taylor expanded in a around inf
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-+r+N/A
Simplified51.1%
Taylor expanded in b around 0
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6465.2
Simplified65.2%
if 1e80 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 1.99999999999999986e225Initial program 97.7%
Taylor expanded in y around 0
*-lowering-*.f64N/A
--lowering--.f64N/A
sub-negN/A
accelerator-lowering-log1p.f64N/A
neg-lowering-neg.f6466.2
Simplified66.2%
Taylor expanded in z around 0
--lowering--.f64N/A
mul-1-negN/A
neg-lowering-neg.f6466.2
Simplified66.2%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f6459.7
Simplified59.7%
if 1.99999999999999986e225 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 97.7%
Taylor expanded in t around inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6462.6
Simplified62.6%
Taylor expanded in t around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified73.7%
Final simplification71.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))
(if (<= t_1 -4e+244)
(/ x (fma y (fma (* t t) (* y 0.5) t) 1.0))
(if (<= t_1 -20000000000.0)
(* x (* b (* 0.5 (* b (* a a)))))
(if (<= t_1 2000000000000.0)
(* x (fma b (fma b (* 0.5 (* a a)) (- a)) 1.0))
(if (<= t_1 1e+80)
(* a (* a (/ x (* a a))))
(if (<= t_1 2e+225)
(* x (fma a (- (* (* (+ z b) (+ z b)) (* a 0.5)) (+ z b)) 1.0))
(fma t (* x (* y (fma (* t 0.5) y -1.0))) x))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
double tmp;
if (t_1 <= -4e+244) {
tmp = x / fma(y, fma((t * t), (y * 0.5), t), 1.0);
} else if (t_1 <= -20000000000.0) {
tmp = x * (b * (0.5 * (b * (a * a))));
} else if (t_1 <= 2000000000000.0) {
tmp = x * fma(b, fma(b, (0.5 * (a * a)), -a), 1.0);
} else if (t_1 <= 1e+80) {
tmp = a * (a * (x / (a * a)));
} else if (t_1 <= 2e+225) {
tmp = x * fma(a, ((((z + b) * (z + b)) * (a * 0.5)) - (z + b)), 1.0);
} else {
tmp = fma(t, (x * (y * fma((t * 0.5), y, -1.0))), x);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))) tmp = 0.0 if (t_1 <= -4e+244) tmp = Float64(x / fma(y, fma(Float64(t * t), Float64(y * 0.5), t), 1.0)); elseif (t_1 <= -20000000000.0) tmp = Float64(x * Float64(b * Float64(0.5 * Float64(b * Float64(a * a))))); elseif (t_1 <= 2000000000000.0) tmp = Float64(x * fma(b, fma(b, Float64(0.5 * Float64(a * a)), Float64(-a)), 1.0)); elseif (t_1 <= 1e+80) tmp = Float64(a * Float64(a * Float64(x / Float64(a * a)))); elseif (t_1 <= 2e+225) tmp = Float64(x * fma(a, Float64(Float64(Float64(Float64(z + b) * Float64(z + b)) * Float64(a * 0.5)) - Float64(z + b)), 1.0)); else tmp = fma(t, Float64(x * Float64(y * fma(Float64(t * 0.5), y, -1.0))), x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+244], N[(x / N[(y * N[(N[(t * t), $MachinePrecision] * N[(y * 0.5), $MachinePrecision] + t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -20000000000.0], N[(x * N[(b * N[(0.5 * N[(b * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2000000000000.0], N[(x * N[(b * N[(b * N[(0.5 * N[(a * a), $MachinePrecision]), $MachinePrecision] + (-a)), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+80], N[(a * N[(a * N[(x / N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+225], N[(x * N[(a * N[(N[(N[(N[(z + b), $MachinePrecision] * N[(z + b), $MachinePrecision]), $MachinePrecision] * N[(a * 0.5), $MachinePrecision]), $MachinePrecision] - N[(z + b), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(t * N[(x * N[(y * N[(N[(t * 0.5), $MachinePrecision] * y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+244}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(y, \mathsf{fma}\left(t \cdot t, y \cdot 0.5, t\right), 1\right)}\\
\mathbf{elif}\;t\_1 \leq -20000000000:\\
\;\;\;\;x \cdot \left(b \cdot \left(0.5 \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)\right)\\
\mathbf{elif}\;t\_1 \leq 2000000000000:\\
\;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, 0.5 \cdot \left(a \cdot a\right), -a\right), 1\right)\\
\mathbf{elif}\;t\_1 \leq 10^{+80}:\\
\;\;\;\;a \cdot \left(a \cdot \frac{x}{a \cdot a}\right)\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+225}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(a, \left(\left(z + b\right) \cdot \left(z + b\right)\right) \cdot \left(a \cdot 0.5\right) - \left(z + b\right), 1\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t, x \cdot \left(y \cdot \mathsf{fma}\left(t \cdot 0.5, y, -1\right)\right), x\right)\\
\end{array}
\end{array}
if (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -4.0000000000000003e244Initial program 100.0%
Taylor expanded in t around inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6452.7
Simplified52.7%
exp-prodN/A
pow-negN/A
un-div-invN/A
/-lowering-/.f64N/A
pow-expN/A
exp-lowering-exp.f64N/A
*-lowering-*.f6452.7
Applied egg-rr52.7%
Taylor expanded in y around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6465.5
Simplified65.5%
if -4.0000000000000003e244 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -2e10Initial program 100.0%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6442.4
Simplified42.4%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
mul-1-negN/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f643.0
Simplified3.0%
Taylor expanded in b around inf
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
distribute-neg-fracN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-outN/A
+-commutativeN/A
sub-negN/A
*-lowering-*.f64N/A
sub-negN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f6434.0
Simplified34.0%
Taylor expanded in b around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6451.1
Simplified51.1%
if -2e10 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 2e12Initial program 89.2%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6486.7
Simplified86.7%
Taylor expanded in b around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f6486.5
Simplified86.5%
if 2e12 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 1e80Initial program 85.9%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6430.7
Simplified30.7%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
mul-1-negN/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6410.4
Simplified10.4%
Taylor expanded in a around inf
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-+r+N/A
Simplified51.1%
Taylor expanded in b around 0
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6465.2
Simplified65.2%
if 1e80 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 1.99999999999999986e225Initial program 97.7%
Taylor expanded in y around 0
*-lowering-*.f64N/A
--lowering--.f64N/A
sub-negN/A
accelerator-lowering-log1p.f64N/A
neg-lowering-neg.f6466.2
Simplified66.2%
Taylor expanded in z around 0
--lowering--.f64N/A
mul-1-negN/A
neg-lowering-neg.f6466.2
Simplified66.2%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f6459.7
Simplified59.7%
if 1.99999999999999986e225 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 97.7%
Taylor expanded in t around inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6462.6
Simplified62.6%
Taylor expanded in t around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified73.7%
Final simplification66.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (* b (* 0.5 (* b (* a a))))))
(t_2 (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))))
(t_3 (* a (* a (/ x (* a a))))))
(if (<= t_2 -1.5e+286)
(/ x (fma t y 1.0))
(if (<= t_2 -4e+244)
t_3
(if (<= t_2 -20000000000.0)
t_1
(if (<= t_2 2000000000000.0)
(fma (- (- z) b) (* x a) x)
(if (<= t_2 1e+104) t_3 t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * (b * (0.5 * (b * (a * a))));
double t_2 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
double t_3 = a * (a * (x / (a * a)));
double tmp;
if (t_2 <= -1.5e+286) {
tmp = x / fma(t, y, 1.0);
} else if (t_2 <= -4e+244) {
tmp = t_3;
} else if (t_2 <= -20000000000.0) {
tmp = t_1;
} else if (t_2 <= 2000000000000.0) {
tmp = fma((-z - b), (x * a), x);
} else if (t_2 <= 1e+104) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(x * Float64(b * Float64(0.5 * Float64(b * Float64(a * a))))) t_2 = Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))) t_3 = Float64(a * Float64(a * Float64(x / Float64(a * a)))) tmp = 0.0 if (t_2 <= -1.5e+286) tmp = Float64(x / fma(t, y, 1.0)); elseif (t_2 <= -4e+244) tmp = t_3; elseif (t_2 <= -20000000000.0) tmp = t_1; elseif (t_2 <= 2000000000000.0) tmp = fma(Float64(Float64(-z) - b), Float64(x * a), x); elseif (t_2 <= 1e+104) tmp = t_3; else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(b * N[(0.5 * N[(b * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(a * N[(a * N[(x / N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1.5e+286], N[(x / N[(t * y + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -4e+244], t$95$3, If[LessEqual[t$95$2, -20000000000.0], t$95$1, If[LessEqual[t$95$2, 2000000000000.0], N[(N[((-z) - b), $MachinePrecision] * N[(x * a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$2, 1e+104], t$95$3, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(b \cdot \left(0.5 \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)\right)\\
t_2 := y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)\\
t_3 := a \cdot \left(a \cdot \frac{x}{a \cdot a}\right)\\
\mathbf{if}\;t\_2 \leq -1.5 \cdot 10^{+286}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(t, y, 1\right)}\\
\mathbf{elif}\;t\_2 \leq -4 \cdot 10^{+244}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq -20000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 2000000000000:\\
\;\;\;\;\mathsf{fma}\left(\left(-z\right) - b, x \cdot a, x\right)\\
\mathbf{elif}\;t\_2 \leq 10^{+104}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -1.4999999999999999e286Initial program 100.0%
Taylor expanded in t around inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6466.3
Simplified66.3%
exp-prodN/A
pow-negN/A
un-div-invN/A
/-lowering-/.f64N/A
pow-expN/A
exp-lowering-exp.f64N/A
*-lowering-*.f6466.3
Applied egg-rr66.3%
Taylor expanded in y around 0
+-commutativeN/A
accelerator-lowering-fma.f6459.4
Simplified59.4%
if -1.4999999999999999e286 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -4.0000000000000003e244 or 2e12 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 1e104Initial program 93.8%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6448.4
Simplified48.4%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
mul-1-negN/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6412.0
Simplified12.0%
Taylor expanded in a around inf
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-+r+N/A
Simplified32.6%
Taylor expanded in b around 0
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6457.5
Simplified57.5%
if -4.0000000000000003e244 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -2e10 or 1e104 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 98.6%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6447.0
Simplified47.0%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
mul-1-negN/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6429.5
Simplified29.5%
Taylor expanded in b around inf
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
distribute-neg-fracN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-outN/A
+-commutativeN/A
sub-negN/A
*-lowering-*.f64N/A
sub-negN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f6446.5
Simplified46.5%
Taylor expanded in b around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6451.8
Simplified51.8%
if -2e10 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 2e12Initial program 89.2%
Taylor expanded in y around 0
*-lowering-*.f64N/A
--lowering--.f64N/A
sub-negN/A
accelerator-lowering-log1p.f64N/A
neg-lowering-neg.f6497.2
Simplified97.2%
Taylor expanded in z around 0
--lowering--.f64N/A
mul-1-negN/A
neg-lowering-neg.f6497.2
Simplified97.2%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
distribute-lft-inN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
--lowering--.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
*-commutativeN/A
*-lowering-*.f6482.5
Simplified82.5%
Final simplification59.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))
(if (<= t_1 -1.5e+286)
(/ x (fma t y 1.0))
(if (<= t_1 -4e+244)
(* a (* a (/ x (* a a))))
(if (<= t_1 -20000000000.0)
(* x (* b (* 0.5 (* b (* a a)))))
(if (<= t_1 2e+225)
(* x (fma b (fma b (* 0.5 (* a a)) (- a)) 1.0))
(fma t (* x (* y (fma (* t 0.5) y -1.0))) x)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
double tmp;
if (t_1 <= -1.5e+286) {
tmp = x / fma(t, y, 1.0);
} else if (t_1 <= -4e+244) {
tmp = a * (a * (x / (a * a)));
} else if (t_1 <= -20000000000.0) {
tmp = x * (b * (0.5 * (b * (a * a))));
} else if (t_1 <= 2e+225) {
tmp = x * fma(b, fma(b, (0.5 * (a * a)), -a), 1.0);
} else {
tmp = fma(t, (x * (y * fma((t * 0.5), y, -1.0))), x);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))) tmp = 0.0 if (t_1 <= -1.5e+286) tmp = Float64(x / fma(t, y, 1.0)); elseif (t_1 <= -4e+244) tmp = Float64(a * Float64(a * Float64(x / Float64(a * a)))); elseif (t_1 <= -20000000000.0) tmp = Float64(x * Float64(b * Float64(0.5 * Float64(b * Float64(a * a))))); elseif (t_1 <= 2e+225) tmp = Float64(x * fma(b, fma(b, Float64(0.5 * Float64(a * a)), Float64(-a)), 1.0)); else tmp = fma(t, Float64(x * Float64(y * fma(Float64(t * 0.5), y, -1.0))), x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1.5e+286], N[(x / N[(t * y + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -4e+244], N[(a * N[(a * N[(x / N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -20000000000.0], N[(x * N[(b * N[(0.5 * N[(b * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+225], N[(x * N[(b * N[(b * N[(0.5 * N[(a * a), $MachinePrecision]), $MachinePrecision] + (-a)), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(t * N[(x * N[(y * N[(N[(t * 0.5), $MachinePrecision] * y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)\\
\mathbf{if}\;t\_1 \leq -1.5 \cdot 10^{+286}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(t, y, 1\right)}\\
\mathbf{elif}\;t\_1 \leq -4 \cdot 10^{+244}:\\
\;\;\;\;a \cdot \left(a \cdot \frac{x}{a \cdot a}\right)\\
\mathbf{elif}\;t\_1 \leq -20000000000:\\
\;\;\;\;x \cdot \left(b \cdot \left(0.5 \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)\right)\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+225}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, 0.5 \cdot \left(a \cdot a\right), -a\right), 1\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t, x \cdot \left(y \cdot \mathsf{fma}\left(t \cdot 0.5, y, -1\right)\right), x\right)\\
\end{array}
\end{array}
if (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -1.4999999999999999e286Initial program 100.0%
Taylor expanded in t around inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6466.3
Simplified66.3%
exp-prodN/A
pow-negN/A
un-div-invN/A
/-lowering-/.f64N/A
pow-expN/A
exp-lowering-exp.f64N/A
*-lowering-*.f6466.3
Applied egg-rr66.3%
Taylor expanded in y around 0
+-commutativeN/A
accelerator-lowering-fma.f6459.4
Simplified59.4%
if -1.4999999999999999e286 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -4.0000000000000003e244Initial program 100.0%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6455.1
Simplified55.1%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
mul-1-negN/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f642.3
Simplified2.3%
Taylor expanded in a around inf
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-+r+N/A
Simplified9.4%
Taylor expanded in b around 0
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6455.3
Simplified55.3%
if -4.0000000000000003e244 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -2e10Initial program 100.0%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6442.4
Simplified42.4%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
mul-1-negN/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f643.0
Simplified3.0%
Taylor expanded in b around inf
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
distribute-neg-fracN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-outN/A
+-commutativeN/A
sub-negN/A
*-lowering-*.f64N/A
sub-negN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f6434.0
Simplified34.0%
Taylor expanded in b around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6451.1
Simplified51.1%
if -2e10 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 1.99999999999999986e225Initial program 92.1%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6469.2
Simplified69.2%
Taylor expanded in b around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f6465.7
Simplified65.7%
if 1.99999999999999986e225 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 97.7%
Taylor expanded in t around inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6462.6
Simplified62.6%
Taylor expanded in t around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified73.7%
Final simplification62.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))
(if (<= t_1 -1.5e+286)
(/ x (fma t y 1.0))
(if (<= t_1 -4e+244)
(* a (* a (/ x (* a a))))
(if (<= t_1 -20000000000.0)
(* x (* b (* 0.5 (* b (* a a)))))
(if (<= t_1 2e+225)
(* x (fma b (* b (* 0.5 (* a a))) 1.0))
(fma t (* x (* y (fma (* t 0.5) y -1.0))) x)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
double tmp;
if (t_1 <= -1.5e+286) {
tmp = x / fma(t, y, 1.0);
} else if (t_1 <= -4e+244) {
tmp = a * (a * (x / (a * a)));
} else if (t_1 <= -20000000000.0) {
tmp = x * (b * (0.5 * (b * (a * a))));
} else if (t_1 <= 2e+225) {
tmp = x * fma(b, (b * (0.5 * (a * a))), 1.0);
} else {
tmp = fma(t, (x * (y * fma((t * 0.5), y, -1.0))), x);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))) tmp = 0.0 if (t_1 <= -1.5e+286) tmp = Float64(x / fma(t, y, 1.0)); elseif (t_1 <= -4e+244) tmp = Float64(a * Float64(a * Float64(x / Float64(a * a)))); elseif (t_1 <= -20000000000.0) tmp = Float64(x * Float64(b * Float64(0.5 * Float64(b * Float64(a * a))))); elseif (t_1 <= 2e+225) tmp = Float64(x * fma(b, Float64(b * Float64(0.5 * Float64(a * a))), 1.0)); else tmp = fma(t, Float64(x * Float64(y * fma(Float64(t * 0.5), y, -1.0))), x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1.5e+286], N[(x / N[(t * y + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -4e+244], N[(a * N[(a * N[(x / N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -20000000000.0], N[(x * N[(b * N[(0.5 * N[(b * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+225], N[(x * N[(b * N[(b * N[(0.5 * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(t * N[(x * N[(y * N[(N[(t * 0.5), $MachinePrecision] * y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)\\
\mathbf{if}\;t\_1 \leq -1.5 \cdot 10^{+286}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(t, y, 1\right)}\\
\mathbf{elif}\;t\_1 \leq -4 \cdot 10^{+244}:\\
\;\;\;\;a \cdot \left(a \cdot \frac{x}{a \cdot a}\right)\\
\mathbf{elif}\;t\_1 \leq -20000000000:\\
\;\;\;\;x \cdot \left(b \cdot \left(0.5 \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)\right)\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+225}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(b, b \cdot \left(0.5 \cdot \left(a \cdot a\right)\right), 1\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t, x \cdot \left(y \cdot \mathsf{fma}\left(t \cdot 0.5, y, -1\right)\right), x\right)\\
\end{array}
\end{array}
if (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -1.4999999999999999e286Initial program 100.0%
Taylor expanded in t around inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6466.3
Simplified66.3%
exp-prodN/A
pow-negN/A
un-div-invN/A
/-lowering-/.f64N/A
pow-expN/A
exp-lowering-exp.f64N/A
*-lowering-*.f6466.3
Applied egg-rr66.3%
Taylor expanded in y around 0
+-commutativeN/A
accelerator-lowering-fma.f6459.4
Simplified59.4%
if -1.4999999999999999e286 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -4.0000000000000003e244Initial program 100.0%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6455.1
Simplified55.1%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
mul-1-negN/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f642.3
Simplified2.3%
Taylor expanded in a around inf
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-+r+N/A
Simplified9.4%
Taylor expanded in b around 0
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6455.3
Simplified55.3%
if -4.0000000000000003e244 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -2e10Initial program 100.0%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6442.4
Simplified42.4%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
mul-1-negN/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f643.0
Simplified3.0%
Taylor expanded in b around inf
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
distribute-neg-fracN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-outN/A
+-commutativeN/A
sub-negN/A
*-lowering-*.f64N/A
sub-negN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f6434.0
Simplified34.0%
Taylor expanded in b around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6451.1
Simplified51.1%
if -2e10 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 1.99999999999999986e225Initial program 92.1%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6469.2
Simplified69.2%
Taylor expanded in b around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f6465.7
Simplified65.7%
Taylor expanded in b around inf
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6465.3
Simplified65.3%
if 1.99999999999999986e225 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 97.7%
Taylor expanded in t around inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6462.6
Simplified62.6%
Taylor expanded in t around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified73.7%
Final simplification62.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))
(if (<= t_1 -1.5e+286)
(/ x (fma t y 1.0))
(if (<= t_1 -4e+244)
(* a (* a (/ x (* a a))))
(if (<= t_1 -20000000000.0)
(* x (* b (* 0.5 (* b (* a a)))))
(if (<= t_1 2e+225)
(* x (fma b (* b (* 0.5 (* a a))) 1.0))
(* x (fma t (* y (fma (* t 0.5) y -1.0)) 1.0))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
double tmp;
if (t_1 <= -1.5e+286) {
tmp = x / fma(t, y, 1.0);
} else if (t_1 <= -4e+244) {
tmp = a * (a * (x / (a * a)));
} else if (t_1 <= -20000000000.0) {
tmp = x * (b * (0.5 * (b * (a * a))));
} else if (t_1 <= 2e+225) {
tmp = x * fma(b, (b * (0.5 * (a * a))), 1.0);
} else {
tmp = x * fma(t, (y * fma((t * 0.5), y, -1.0)), 1.0);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))) tmp = 0.0 if (t_1 <= -1.5e+286) tmp = Float64(x / fma(t, y, 1.0)); elseif (t_1 <= -4e+244) tmp = Float64(a * Float64(a * Float64(x / Float64(a * a)))); elseif (t_1 <= -20000000000.0) tmp = Float64(x * Float64(b * Float64(0.5 * Float64(b * Float64(a * a))))); elseif (t_1 <= 2e+225) tmp = Float64(x * fma(b, Float64(b * Float64(0.5 * Float64(a * a))), 1.0)); else tmp = Float64(x * fma(t, Float64(y * fma(Float64(t * 0.5), y, -1.0)), 1.0)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1.5e+286], N[(x / N[(t * y + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -4e+244], N[(a * N[(a * N[(x / N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -20000000000.0], N[(x * N[(b * N[(0.5 * N[(b * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+225], N[(x * N[(b * N[(b * N[(0.5 * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(x * N[(t * N[(y * N[(N[(t * 0.5), $MachinePrecision] * y + -1.0), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)\\
\mathbf{if}\;t\_1 \leq -1.5 \cdot 10^{+286}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(t, y, 1\right)}\\
\mathbf{elif}\;t\_1 \leq -4 \cdot 10^{+244}:\\
\;\;\;\;a \cdot \left(a \cdot \frac{x}{a \cdot a}\right)\\
\mathbf{elif}\;t\_1 \leq -20000000000:\\
\;\;\;\;x \cdot \left(b \cdot \left(0.5 \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)\right)\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+225}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(b, b \cdot \left(0.5 \cdot \left(a \cdot a\right)\right), 1\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(t, y \cdot \mathsf{fma}\left(t \cdot 0.5, y, -1\right), 1\right)\\
\end{array}
\end{array}
if (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -1.4999999999999999e286Initial program 100.0%
Taylor expanded in t around inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6466.3
Simplified66.3%
exp-prodN/A
pow-negN/A
un-div-invN/A
/-lowering-/.f64N/A
pow-expN/A
exp-lowering-exp.f64N/A
*-lowering-*.f6466.3
Applied egg-rr66.3%
Taylor expanded in y around 0
+-commutativeN/A
accelerator-lowering-fma.f6459.4
Simplified59.4%
if -1.4999999999999999e286 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -4.0000000000000003e244Initial program 100.0%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6455.1
Simplified55.1%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
mul-1-negN/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f642.3
Simplified2.3%
Taylor expanded in a around inf
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-+r+N/A
Simplified9.4%
Taylor expanded in b around 0
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6455.3
Simplified55.3%
if -4.0000000000000003e244 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -2e10Initial program 100.0%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6442.4
Simplified42.4%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
mul-1-negN/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f643.0
Simplified3.0%
Taylor expanded in b around inf
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
distribute-neg-fracN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-outN/A
+-commutativeN/A
sub-negN/A
*-lowering-*.f64N/A
sub-negN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f6434.0
Simplified34.0%
Taylor expanded in b around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6451.1
Simplified51.1%
if -2e10 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 1.99999999999999986e225Initial program 92.1%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6469.2
Simplified69.2%
Taylor expanded in b around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f6465.7
Simplified65.7%
Taylor expanded in b around inf
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6465.3
Simplified65.3%
if 1.99999999999999986e225 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 97.7%
Taylor expanded in t around inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6462.6
Simplified62.6%
Taylor expanded in t around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6471.6
Simplified71.6%
Final simplification61.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))
(if (<= t_1 -4e+244)
(/ x (fma y (fma (* t t) (* y 0.5) t) 1.0))
(if (<= t_1 -20000000000.0)
(* x (* b (* 0.5 (* b (* a a)))))
(if (<= t_1 2e+225)
(* x (fma b (fma b (* 0.5 (* a a)) (- a)) 1.0))
(fma t (* x (* y (fma (* t 0.5) y -1.0))) x))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
double tmp;
if (t_1 <= -4e+244) {
tmp = x / fma(y, fma((t * t), (y * 0.5), t), 1.0);
} else if (t_1 <= -20000000000.0) {
tmp = x * (b * (0.5 * (b * (a * a))));
} else if (t_1 <= 2e+225) {
tmp = x * fma(b, fma(b, (0.5 * (a * a)), -a), 1.0);
} else {
tmp = fma(t, (x * (y * fma((t * 0.5), y, -1.0))), x);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))) tmp = 0.0 if (t_1 <= -4e+244) tmp = Float64(x / fma(y, fma(Float64(t * t), Float64(y * 0.5), t), 1.0)); elseif (t_1 <= -20000000000.0) tmp = Float64(x * Float64(b * Float64(0.5 * Float64(b * Float64(a * a))))); elseif (t_1 <= 2e+225) tmp = Float64(x * fma(b, fma(b, Float64(0.5 * Float64(a * a)), Float64(-a)), 1.0)); else tmp = fma(t, Float64(x * Float64(y * fma(Float64(t * 0.5), y, -1.0))), x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+244], N[(x / N[(y * N[(N[(t * t), $MachinePrecision] * N[(y * 0.5), $MachinePrecision] + t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -20000000000.0], N[(x * N[(b * N[(0.5 * N[(b * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+225], N[(x * N[(b * N[(b * N[(0.5 * N[(a * a), $MachinePrecision]), $MachinePrecision] + (-a)), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(t * N[(x * N[(y * N[(N[(t * 0.5), $MachinePrecision] * y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+244}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(y, \mathsf{fma}\left(t \cdot t, y \cdot 0.5, t\right), 1\right)}\\
\mathbf{elif}\;t\_1 \leq -20000000000:\\
\;\;\;\;x \cdot \left(b \cdot \left(0.5 \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)\right)\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+225}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, 0.5 \cdot \left(a \cdot a\right), -a\right), 1\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t, x \cdot \left(y \cdot \mathsf{fma}\left(t \cdot 0.5, y, -1\right)\right), x\right)\\
\end{array}
\end{array}
if (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -4.0000000000000003e244Initial program 100.0%
Taylor expanded in t around inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6452.7
Simplified52.7%
exp-prodN/A
pow-negN/A
un-div-invN/A
/-lowering-/.f64N/A
pow-expN/A
exp-lowering-exp.f64N/A
*-lowering-*.f6452.7
Applied egg-rr52.7%
Taylor expanded in y around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6465.5
Simplified65.5%
if -4.0000000000000003e244 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -2e10Initial program 100.0%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6442.4
Simplified42.4%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
mul-1-negN/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f643.0
Simplified3.0%
Taylor expanded in b around inf
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
distribute-neg-fracN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-outN/A
+-commutativeN/A
sub-negN/A
*-lowering-*.f64N/A
sub-negN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f6434.0
Simplified34.0%
Taylor expanded in b around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6451.1
Simplified51.1%
if -2e10 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 1.99999999999999986e225Initial program 92.1%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6469.2
Simplified69.2%
Taylor expanded in b around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f6465.7
Simplified65.7%
if 1.99999999999999986e225 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 97.7%
Taylor expanded in t around inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6462.6
Simplified62.6%
Taylor expanded in t around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified73.7%
Final simplification63.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))
(if (<= t_1 -1.5e+286)
(/ x (fma t y 1.0))
(if (<= t_1 -4e+244)
(* a (* a (/ x (* a a))))
(if (<= t_1 -20000000000.0)
(* x (* b (* 0.5 (* b (* a a)))))
(* x (fma b (* b (* 0.5 (* a a))) 1.0)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
double tmp;
if (t_1 <= -1.5e+286) {
tmp = x / fma(t, y, 1.0);
} else if (t_1 <= -4e+244) {
tmp = a * (a * (x / (a * a)));
} else if (t_1 <= -20000000000.0) {
tmp = x * (b * (0.5 * (b * (a * a))));
} else {
tmp = x * fma(b, (b * (0.5 * (a * a))), 1.0);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))) tmp = 0.0 if (t_1 <= -1.5e+286) tmp = Float64(x / fma(t, y, 1.0)); elseif (t_1 <= -4e+244) tmp = Float64(a * Float64(a * Float64(x / Float64(a * a)))); elseif (t_1 <= -20000000000.0) tmp = Float64(x * Float64(b * Float64(0.5 * Float64(b * Float64(a * a))))); else tmp = Float64(x * fma(b, Float64(b * Float64(0.5 * Float64(a * a))), 1.0)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1.5e+286], N[(x / N[(t * y + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -4e+244], N[(a * N[(a * N[(x / N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -20000000000.0], N[(x * N[(b * N[(0.5 * N[(b * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(b * N[(b * N[(0.5 * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)\\
\mathbf{if}\;t\_1 \leq -1.5 \cdot 10^{+286}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(t, y, 1\right)}\\
\mathbf{elif}\;t\_1 \leq -4 \cdot 10^{+244}:\\
\;\;\;\;a \cdot \left(a \cdot \frac{x}{a \cdot a}\right)\\
\mathbf{elif}\;t\_1 \leq -20000000000:\\
\;\;\;\;x \cdot \left(b \cdot \left(0.5 \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(b, b \cdot \left(0.5 \cdot \left(a \cdot a\right)\right), 1\right)\\
\end{array}
\end{array}
if (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -1.4999999999999999e286Initial program 100.0%
Taylor expanded in t around inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6466.3
Simplified66.3%
exp-prodN/A
pow-negN/A
un-div-invN/A
/-lowering-/.f64N/A
pow-expN/A
exp-lowering-exp.f64N/A
*-lowering-*.f6466.3
Applied egg-rr66.3%
Taylor expanded in y around 0
+-commutativeN/A
accelerator-lowering-fma.f6459.4
Simplified59.4%
if -1.4999999999999999e286 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -4.0000000000000003e244Initial program 100.0%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6455.1
Simplified55.1%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
mul-1-negN/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f642.3
Simplified2.3%
Taylor expanded in a around inf
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-+r+N/A
Simplified9.4%
Taylor expanded in b around 0
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6455.3
Simplified55.3%
if -4.0000000000000003e244 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -2e10Initial program 100.0%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6442.4
Simplified42.4%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
mul-1-negN/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f643.0
Simplified3.0%
Taylor expanded in b around inf
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
distribute-neg-fracN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-outN/A
+-commutativeN/A
sub-negN/A
*-lowering-*.f64N/A
sub-negN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f6434.0
Simplified34.0%
Taylor expanded in b around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6451.1
Simplified51.1%
if -2e10 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 93.7%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6462.3
Simplified62.3%
Taylor expanded in b around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f6461.1
Simplified61.1%
Taylor expanded in b around inf
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6460.8
Simplified60.8%
Final simplification58.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))
(if (<= t_1 (- INFINITY))
(/ x (fma t y 1.0))
(if (<= t_1 -20000000000.0)
(* x (* b (* 0.5 (* b (* a a)))))
(if (<= t_1 0.0002)
(fma (- (- z) b) (* x a) x)
(* a (* a (* x (* 0.5 (* b b))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = x / fma(t, y, 1.0);
} else if (t_1 <= -20000000000.0) {
tmp = x * (b * (0.5 * (b * (a * a))));
} else if (t_1 <= 0.0002) {
tmp = fma((-z - b), (x * a), x);
} else {
tmp = a * (a * (x * (0.5 * (b * b))));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(x / fma(t, y, 1.0)); elseif (t_1 <= -20000000000.0) tmp = Float64(x * Float64(b * Float64(0.5 * Float64(b * Float64(a * a))))); elseif (t_1 <= 0.0002) tmp = fma(Float64(Float64(-z) - b), Float64(x * a), x); else tmp = Float64(a * Float64(a * Float64(x * Float64(0.5 * Float64(b * b))))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(x / N[(t * y + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -20000000000.0], N[(x * N[(b * N[(0.5 * N[(b * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0002], N[(N[((-z) - b), $MachinePrecision] * N[(x * a), $MachinePrecision] + x), $MachinePrecision], N[(a * N[(a * N[(x * N[(0.5 * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(t, y, 1\right)}\\
\mathbf{elif}\;t\_1 \leq -20000000000:\\
\;\;\;\;x \cdot \left(b \cdot \left(0.5 \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)\right)\\
\mathbf{elif}\;t\_1 \leq 0.0002:\\
\;\;\;\;\mathsf{fma}\left(\left(-z\right) - b, x \cdot a, x\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(a \cdot \left(x \cdot \left(0.5 \cdot \left(b \cdot b\right)\right)\right)\right)\\
\end{array}
\end{array}
if (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -inf.0Initial program 100.0%
Taylor expanded in t around inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6476.9
Simplified76.9%
exp-prodN/A
pow-negN/A
un-div-invN/A
/-lowering-/.f64N/A
pow-expN/A
exp-lowering-exp.f64N/A
*-lowering-*.f6476.9
Applied egg-rr76.9%
Taylor expanded in y around 0
+-commutativeN/A
accelerator-lowering-fma.f6463.5
Simplified63.5%
if -inf.0 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -2e10Initial program 100.0%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6442.0
Simplified42.0%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
mul-1-negN/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f642.9
Simplified2.9%
Taylor expanded in b around inf
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
distribute-neg-fracN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-outN/A
+-commutativeN/A
sub-negN/A
*-lowering-*.f64N/A
sub-negN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f6431.8
Simplified31.8%
Taylor expanded in b around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6446.1
Simplified46.1%
if -2e10 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 2.0000000000000001e-4Initial program 88.6%
Taylor expanded in y around 0
*-lowering-*.f64N/A
--lowering--.f64N/A
sub-negN/A
accelerator-lowering-log1p.f64N/A
neg-lowering-neg.f6497.1
Simplified97.1%
Taylor expanded in z around 0
--lowering--.f64N/A
mul-1-negN/A
neg-lowering-neg.f6497.1
Simplified97.1%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
distribute-lft-inN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
--lowering--.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
*-commutativeN/A
*-lowering-*.f6485.2
Simplified85.2%
if 2.0000000000000001e-4 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 96.2%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6450.6
Simplified50.6%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
mul-1-negN/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6443.5
Simplified43.5%
Taylor expanded in a around inf
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-+r+N/A
Simplified53.2%
Taylor expanded in b around inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6448.3
Simplified48.3%
Final simplification56.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))))
(t_2 (* a (* a (* x (* 0.5 (* b b)))))))
(if (<= t_1 (- INFINITY))
(/ x (fma t y 1.0))
(if (<= t_1 -20000000000.0)
t_2
(if (<= t_1 0.0002) (fma (- (- z) b) (* x a) x) t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
double t_2 = a * (a * (x * (0.5 * (b * b))));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = x / fma(t, y, 1.0);
} else if (t_1 <= -20000000000.0) {
tmp = t_2;
} else if (t_1 <= 0.0002) {
tmp = fma((-z - b), (x * a), x);
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))) t_2 = Float64(a * Float64(a * Float64(x * Float64(0.5 * Float64(b * b))))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(x / fma(t, y, 1.0)); elseif (t_1 <= -20000000000.0) tmp = t_2; elseif (t_1 <= 0.0002) tmp = fma(Float64(Float64(-z) - b), Float64(x * a), x); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a * N[(a * N[(x * N[(0.5 * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(x / N[(t * y + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -20000000000.0], t$95$2, If[LessEqual[t$95$1, 0.0002], N[(N[((-z) - b), $MachinePrecision] * N[(x * a), $MachinePrecision] + x), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)\\
t_2 := a \cdot \left(a \cdot \left(x \cdot \left(0.5 \cdot \left(b \cdot b\right)\right)\right)\right)\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(t, y, 1\right)}\\
\mathbf{elif}\;t\_1 \leq -20000000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 0.0002:\\
\;\;\;\;\mathsf{fma}\left(\left(-z\right) - b, x \cdot a, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -inf.0Initial program 100.0%
Taylor expanded in t around inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6476.9
Simplified76.9%
exp-prodN/A
pow-negN/A
un-div-invN/A
/-lowering-/.f64N/A
pow-expN/A
exp-lowering-exp.f64N/A
*-lowering-*.f6476.9
Applied egg-rr76.9%
Taylor expanded in y around 0
+-commutativeN/A
accelerator-lowering-fma.f6463.5
Simplified63.5%
if -inf.0 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -2e10 or 2.0000000000000001e-4 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 97.9%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6446.9
Simplified46.9%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
mul-1-negN/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6425.8
Simplified25.8%
Taylor expanded in a around inf
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-+r+N/A
Simplified35.2%
Taylor expanded in b around inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6446.8
Simplified46.8%
if -2e10 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 2.0000000000000001e-4Initial program 88.6%
Taylor expanded in y around 0
*-lowering-*.f64N/A
--lowering--.f64N/A
sub-negN/A
accelerator-lowering-log1p.f64N/A
neg-lowering-neg.f6497.1
Simplified97.1%
Taylor expanded in z around 0
--lowering--.f64N/A
mul-1-negN/A
neg-lowering-neg.f6497.1
Simplified97.1%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
distribute-lft-inN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
--lowering--.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
*-commutativeN/A
*-lowering-*.f6485.2
Simplified85.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))
(if (<= t_1 (- INFINITY))
(/ x (fma t y 1.0))
(if (<= t_1 -20000000000.0)
(- (* x (* a b)))
(if (<= t_1 1e+152)
(fma (- (- z) b) (* x a) x)
(* x (- 1.0 (* y t))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = x / fma(t, y, 1.0);
} else if (t_1 <= -20000000000.0) {
tmp = -(x * (a * b));
} else if (t_1 <= 1e+152) {
tmp = fma((-z - b), (x * a), x);
} else {
tmp = x * (1.0 - (y * t));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(x / fma(t, y, 1.0)); elseif (t_1 <= -20000000000.0) tmp = Float64(-Float64(x * Float64(a * b))); elseif (t_1 <= 1e+152) tmp = fma(Float64(Float64(-z) - b), Float64(x * a), x); else tmp = Float64(x * Float64(1.0 - Float64(y * t))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(x / N[(t * y + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -20000000000.0], (-N[(x * N[(a * b), $MachinePrecision]), $MachinePrecision]), If[LessEqual[t$95$1, 1e+152], N[(N[((-z) - b), $MachinePrecision] * N[(x * a), $MachinePrecision] + x), $MachinePrecision], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(t, y, 1\right)}\\
\mathbf{elif}\;t\_1 \leq -20000000000:\\
\;\;\;\;-x \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;t\_1 \leq 10^{+152}:\\
\;\;\;\;\mathsf{fma}\left(\left(-z\right) - b, x \cdot a, x\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\end{array}
\end{array}
if (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -inf.0Initial program 100.0%
Taylor expanded in t around inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6476.9
Simplified76.9%
exp-prodN/A
pow-negN/A
un-div-invN/A
/-lowering-/.f64N/A
pow-expN/A
exp-lowering-exp.f64N/A
*-lowering-*.f6476.9
Applied egg-rr76.9%
Taylor expanded in y around 0
+-commutativeN/A
accelerator-lowering-fma.f6463.5
Simplified63.5%
if -inf.0 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -2e10Initial program 100.0%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6442.0
Simplified42.0%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
mul-1-negN/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f642.9
Simplified2.9%
Taylor expanded in b around inf
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
distribute-neg-fracN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-outN/A
+-commutativeN/A
sub-negN/A
*-lowering-*.f64N/A
sub-negN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f6431.8
Simplified31.8%
Taylor expanded in b around 0
mul-1-negN/A
neg-lowering-neg.f6421.3
Simplified21.3%
if -2e10 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 1e152Initial program 91.2%
Taylor expanded in y around 0
*-lowering-*.f64N/A
--lowering--.f64N/A
sub-negN/A
accelerator-lowering-log1p.f64N/A
neg-lowering-neg.f6486.2
Simplified86.2%
Taylor expanded in z around 0
--lowering--.f64N/A
mul-1-negN/A
neg-lowering-neg.f6486.2
Simplified86.2%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
distribute-lft-inN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
--lowering--.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
*-commutativeN/A
*-lowering-*.f6457.8
Simplified57.8%
if 1e152 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 97.0%
Taylor expanded in t around inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6457.9
Simplified57.9%
Taylor expanded in y around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f6433.6
Simplified33.6%
Final simplification40.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))
(if (<= t_1 -20000000000.0)
(- (* x (* a b)))
(if (<= t_1 1e+152) (fma (- (- z) b) (* x a) x) (* x (- 1.0 (* y t)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
double tmp;
if (t_1 <= -20000000000.0) {
tmp = -(x * (a * b));
} else if (t_1 <= 1e+152) {
tmp = fma((-z - b), (x * a), x);
} else {
tmp = x * (1.0 - (y * t));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))) tmp = 0.0 if (t_1 <= -20000000000.0) tmp = Float64(-Float64(x * Float64(a * b))); elseif (t_1 <= 1e+152) tmp = fma(Float64(Float64(-z) - b), Float64(x * a), x); else tmp = Float64(x * Float64(1.0 - Float64(y * t))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -20000000000.0], (-N[(x * N[(a * b), $MachinePrecision]), $MachinePrecision]), If[LessEqual[t$95$1, 1e+152], N[(N[((-z) - b), $MachinePrecision] * N[(x * a), $MachinePrecision] + x), $MachinePrecision], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)\\
\mathbf{if}\;t\_1 \leq -20000000000:\\
\;\;\;\;-x \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;t\_1 \leq 10^{+152}:\\
\;\;\;\;\mathsf{fma}\left(\left(-z\right) - b, x \cdot a, x\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\end{array}
\end{array}
if (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -2e10Initial program 100.0%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6444.5
Simplified44.5%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
mul-1-negN/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f642.8
Simplified2.8%
Taylor expanded in b around inf
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
distribute-neg-fracN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-outN/A
+-commutativeN/A
sub-negN/A
*-lowering-*.f64N/A
sub-negN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f6429.7
Simplified29.7%
Taylor expanded in b around 0
mul-1-negN/A
neg-lowering-neg.f6418.5
Simplified18.5%
if -2e10 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 1e152Initial program 91.2%
Taylor expanded in y around 0
*-lowering-*.f64N/A
--lowering--.f64N/A
sub-negN/A
accelerator-lowering-log1p.f64N/A
neg-lowering-neg.f6486.2
Simplified86.2%
Taylor expanded in z around 0
--lowering--.f64N/A
mul-1-negN/A
neg-lowering-neg.f6486.2
Simplified86.2%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
distribute-lft-inN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
--lowering--.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
*-commutativeN/A
*-lowering-*.f6457.8
Simplified57.8%
if 1e152 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 97.0%
Taylor expanded in t around inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6457.9
Simplified57.9%
Taylor expanded in y around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f6433.6
Simplified33.6%
Final simplification36.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))
(if (<= t_1 -20000000000.0)
(- (* x (* a b)))
(if (<= t_1 4e+65) x (* (* y t) (- x))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
double tmp;
if (t_1 <= -20000000000.0) {
tmp = -(x * (a * b));
} else if (t_1 <= 4e+65) {
tmp = x;
} else {
tmp = (y * t) * -x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: tmp
t_1 = (y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))
if (t_1 <= (-20000000000.0d0)) then
tmp = -(x * (a * b))
else if (t_1 <= 4d+65) then
tmp = x
else
tmp = (y * t) * -x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b));
double tmp;
if (t_1 <= -20000000000.0) {
tmp = -(x * (a * b));
} else if (t_1 <= 4e+65) {
tmp = x;
} else {
tmp = (y * t) * -x;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b)) tmp = 0 if t_1 <= -20000000000.0: tmp = -(x * (a * b)) elif t_1 <= 4e+65: tmp = x else: tmp = (y * t) * -x return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))) tmp = 0.0 if (t_1 <= -20000000000.0) tmp = Float64(-Float64(x * Float64(a * b))); elseif (t_1 <= 4e+65) tmp = x; else tmp = Float64(Float64(y * t) * Float64(-x)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b)); tmp = 0.0; if (t_1 <= -20000000000.0) tmp = -(x * (a * b)); elseif (t_1 <= 4e+65) tmp = x; else tmp = (y * t) * -x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -20000000000.0], (-N[(x * N[(a * b), $MachinePrecision]), $MachinePrecision]), If[LessEqual[t$95$1, 4e+65], x, N[(N[(y * t), $MachinePrecision] * (-x)), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)\\
\mathbf{if}\;t\_1 \leq -20000000000:\\
\;\;\;\;-x \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+65}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot t\right) \cdot \left(-x\right)\\
\end{array}
\end{array}
if (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -2e10Initial program 100.0%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6444.5
Simplified44.5%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
mul-1-negN/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f642.8
Simplified2.8%
Taylor expanded in b around inf
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
distribute-neg-fracN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-outN/A
+-commutativeN/A
sub-negN/A
*-lowering-*.f64N/A
sub-negN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f6429.7
Simplified29.7%
Taylor expanded in b around 0
mul-1-negN/A
neg-lowering-neg.f6418.5
Simplified18.5%
if -2e10 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 4e65Initial program 89.5%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6478.6
Simplified78.6%
Taylor expanded in a around 0
Simplified66.0%
if 4e65 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 96.7%
Taylor expanded in t around inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6453.7
Simplified53.7%
Taylor expanded in y around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f6427.2
Simplified27.2%
Taylor expanded in t around inf
mul-1-negN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f6426.7
Simplified26.7%
Final simplification33.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (* x (* a b))))
(t_2 (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))
(if (<= t_2 -20000000000.0) t_1 (if (<= t_2 2e+112) x t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -(x * (a * b));
double t_2 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
double tmp;
if (t_2 <= -20000000000.0) {
tmp = t_1;
} else if (t_2 <= 2e+112) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = -(x * (a * b))
t_2 = (y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))
if (t_2 <= (-20000000000.0d0)) then
tmp = t_1
else if (t_2 <= 2d+112) then
tmp = x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -(x * (a * b));
double t_2 = (y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b));
double tmp;
if (t_2 <= -20000000000.0) {
tmp = t_1;
} else if (t_2 <= 2e+112) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = -(x * (a * b)) t_2 = (y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b)) tmp = 0 if t_2 <= -20000000000.0: tmp = t_1 elif t_2 <= 2e+112: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(-Float64(x * Float64(a * b))) t_2 = Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))) tmp = 0.0 if (t_2 <= -20000000000.0) tmp = t_1; elseif (t_2 <= 2e+112) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = -(x * (a * b)); t_2 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b)); tmp = 0.0; if (t_2 <= -20000000000.0) tmp = t_1; elseif (t_2 <= 2e+112) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = (-N[(x * N[(a * b), $MachinePrecision]), $MachinePrecision])}, Block[{t$95$2 = N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -20000000000.0], t$95$1, If[LessEqual[t$95$2, 2e+112], x, t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -x \cdot \left(a \cdot b\right)\\
t_2 := y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)\\
\mathbf{if}\;t\_2 \leq -20000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+112}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -2e10 or 1.9999999999999999e112 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 98.9%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6447.3
Simplified47.3%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
mul-1-negN/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6424.0
Simplified24.0%
Taylor expanded in b around inf
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
distribute-neg-fracN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-outN/A
+-commutativeN/A
sub-negN/A
*-lowering-*.f64N/A
sub-negN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f6441.0
Simplified41.0%
Taylor expanded in b around 0
mul-1-negN/A
neg-lowering-neg.f6421.8
Simplified21.8%
if -2e10 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 1.9999999999999999e112Initial program 89.8%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6474.1
Simplified74.1%
Taylor expanded in a around 0
Simplified57.0%
Final simplification32.2%
(FPCore (x y z t a b) :precision binary64 (if (<= (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))) -20000000000.0) (- (* x (* a b))) (* x (- 1.0 (* y t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((y * (log(z) - t)) + (a * (log((1.0 - z)) - b))) <= -20000000000.0) {
tmp = -(x * (a * b));
} else {
tmp = x * (1.0 - (y * t));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if (((y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))) <= (-20000000000.0d0)) then
tmp = -(x * (a * b))
else
tmp = x * (1.0d0 - (y * t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b))) <= -20000000000.0) {
tmp = -(x * (a * b));
} else {
tmp = x * (1.0 - (y * t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if ((y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b))) <= -20000000000.0: tmp = -(x * (a * b)) else: tmp = x * (1.0 - (y * t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))) <= -20000000000.0) tmp = Float64(-Float64(x * Float64(a * b))); else tmp = Float64(x * Float64(1.0 - Float64(y * t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (((y * (log(z) - t)) + (a * (log((1.0 - z)) - b))) <= -20000000000.0) tmp = -(x * (a * b)); else tmp = x * (1.0 - (y * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -20000000000.0], (-N[(x * N[(a * b), $MachinePrecision]), $MachinePrecision]), N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq -20000000000:\\
\;\;\;\;-x \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\end{array}
\end{array}
if (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -2e10Initial program 100.0%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6444.5
Simplified44.5%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
mul-1-negN/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f642.8
Simplified2.8%
Taylor expanded in b around inf
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
distribute-neg-fracN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-outN/A
+-commutativeN/A
sub-negN/A
*-lowering-*.f64N/A
sub-negN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f6429.7
Simplified29.7%
Taylor expanded in b around 0
mul-1-negN/A
neg-lowering-neg.f6418.5
Simplified18.5%
if -2e10 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 93.7%
Taylor expanded in t around inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6462.6
Simplified62.6%
Taylor expanded in y around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f6443.8
Simplified43.8%
Final simplification33.8%
(FPCore (x y z t a b) :precision binary64 (if (<= (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))) -20000000000.0) (- (* x (* a b))) (* x (- 1.0 (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((y * (log(z) - t)) + (a * (log((1.0 - z)) - b))) <= -20000000000.0) {
tmp = -(x * (a * b));
} else {
tmp = x * (1.0 - (a * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if (((y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))) <= (-20000000000.0d0)) then
tmp = -(x * (a * b))
else
tmp = x * (1.0d0 - (a * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b))) <= -20000000000.0) {
tmp = -(x * (a * b));
} else {
tmp = x * (1.0 - (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if ((y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b))) <= -20000000000.0: tmp = -(x * (a * b)) else: tmp = x * (1.0 - (a * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))) <= -20000000000.0) tmp = Float64(-Float64(x * Float64(a * b))); else tmp = Float64(x * Float64(1.0 - Float64(a * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (((y * (log(z) - t)) + (a * (log((1.0 - z)) - b))) <= -20000000000.0) tmp = -(x * (a * b)); else tmp = x * (1.0 - (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -20000000000.0], (-N[(x * N[(a * b), $MachinePrecision]), $MachinePrecision]), N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq -20000000000:\\
\;\;\;\;-x \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\
\end{array}
\end{array}
if (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -2e10Initial program 100.0%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6444.5
Simplified44.5%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
mul-1-negN/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f642.8
Simplified2.8%
Taylor expanded in b around inf
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
distribute-neg-fracN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-outN/A
+-commutativeN/A
sub-negN/A
*-lowering-*.f64N/A
sub-negN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f6429.7
Simplified29.7%
Taylor expanded in b around 0
mul-1-negN/A
neg-lowering-neg.f6418.5
Simplified18.5%
if -2e10 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 93.7%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6462.3
Simplified62.3%
Taylor expanded in a around 0
neg-mul-1N/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f6441.7
Simplified41.7%
Final simplification32.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (exp (* y (- (log z) t))))))
(if (<= y -1e-43)
t_1
(if (<= y 1.4e-13) (* x (exp (- (* a (+ z b))))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * exp((y * (log(z) - t)));
double tmp;
if (y <= -1e-43) {
tmp = t_1;
} else if (y <= 1.4e-13) {
tmp = x * exp(-(a * (z + b)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: tmp
t_1 = x * exp((y * (log(z) - t)))
if (y <= (-1d-43)) then
tmp = t_1
else if (y <= 1.4d-13) then
tmp = x * exp(-(a * (z + b)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * Math.exp((y * (Math.log(z) - t)));
double tmp;
if (y <= -1e-43) {
tmp = t_1;
} else if (y <= 1.4e-13) {
tmp = x * Math.exp(-(a * (z + b)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * math.exp((y * (math.log(z) - t))) tmp = 0 if y <= -1e-43: tmp = t_1 elif y <= 1.4e-13: tmp = x * math.exp(-(a * (z + b))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * exp(Float64(y * Float64(log(z) - t)))) tmp = 0.0 if (y <= -1e-43) tmp = t_1; elseif (y <= 1.4e-13) tmp = Float64(x * exp(Float64(-Float64(a * Float64(z + b))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * exp((y * (log(z) - t))); tmp = 0.0; if (y <= -1e-43) tmp = t_1; elseif (y <= 1.4e-13) tmp = x * exp(-(a * (z + b))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1e-43], t$95$1, If[LessEqual[y, 1.4e-13], N[(x * N[Exp[(-N[(a * N[(z + b), $MachinePrecision]), $MachinePrecision])], $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot e^{y \cdot \left(\log z - t\right)}\\
\mathbf{if}\;y \leq -1 \cdot 10^{-43}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{-13}:\\
\;\;\;\;x \cdot e^{-a \cdot \left(z + b\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.00000000000000008e-43 or 1.4000000000000001e-13 < y Initial program 97.9%
Taylor expanded in y around inf
*-lowering-*.f64N/A
--lowering--.f64N/A
log-lowering-log.f6490.4
Simplified90.4%
if -1.00000000000000008e-43 < y < 1.4000000000000001e-13Initial program 93.9%
Taylor expanded in y around 0
*-lowering-*.f64N/A
--lowering--.f64N/A
sub-negN/A
accelerator-lowering-log1p.f64N/A
neg-lowering-neg.f6488.3
Simplified88.3%
Taylor expanded in z around 0
--lowering--.f64N/A
mul-1-negN/A
neg-lowering-neg.f6488.3
Simplified88.3%
Final simplification89.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (exp (- (* y t))))))
(if (<= t -400.0)
t_1
(if (<= t 3e-63)
(* x (pow z y))
(if (<= t 3e+22) (* x (exp (* b (- a)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * exp(-(y * t));
double tmp;
if (t <= -400.0) {
tmp = t_1;
} else if (t <= 3e-63) {
tmp = x * pow(z, y);
} else if (t <= 3e+22) {
tmp = x * exp((b * -a));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: tmp
t_1 = x * exp(-(y * t))
if (t <= (-400.0d0)) then
tmp = t_1
else if (t <= 3d-63) then
tmp = x * (z ** y)
else if (t <= 3d+22) then
tmp = x * exp((b * -a))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * Math.exp(-(y * t));
double tmp;
if (t <= -400.0) {
tmp = t_1;
} else if (t <= 3e-63) {
tmp = x * Math.pow(z, y);
} else if (t <= 3e+22) {
tmp = x * Math.exp((b * -a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * math.exp(-(y * t)) tmp = 0 if t <= -400.0: tmp = t_1 elif t <= 3e-63: tmp = x * math.pow(z, y) elif t <= 3e+22: tmp = x * math.exp((b * -a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * exp(Float64(-Float64(y * t)))) tmp = 0.0 if (t <= -400.0) tmp = t_1; elseif (t <= 3e-63) tmp = Float64(x * (z ^ y)); elseif (t <= 3e+22) tmp = Float64(x * exp(Float64(b * Float64(-a)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * exp(-(y * t)); tmp = 0.0; if (t <= -400.0) tmp = t_1; elseif (t <= 3e-63) tmp = x * (z ^ y); elseif (t <= 3e+22) tmp = x * exp((b * -a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Exp[(-N[(y * t), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -400.0], t$95$1, If[LessEqual[t, 3e-63], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3e+22], N[(x * N[Exp[N[(b * (-a)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot e^{-y \cdot t}\\
\mathbf{if}\;t \leq -400:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3 \cdot 10^{-63}:\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{elif}\;t \leq 3 \cdot 10^{+22}:\\
\;\;\;\;x \cdot e^{b \cdot \left(-a\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -400 or 3e22 < t Initial program 97.5%
Taylor expanded in t around inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6479.4
Simplified79.4%
if -400 < t < 2.99999999999999979e-63Initial program 96.0%
Taylor expanded in y around inf
*-lowering-*.f64N/A
--lowering--.f64N/A
log-lowering-log.f6474.6
Simplified74.6%
Taylor expanded in t around 0
*-lowering-*.f64N/A
pow-lowering-pow.f6474.6
Simplified74.6%
if 2.99999999999999979e-63 < t < 3e22Initial program 87.8%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6487.8
Simplified87.8%
Final simplification77.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (pow z y))))
(if (<= y -1.2e+40)
t_1
(if (<= y 17.0) (* x (exp (- (* a (+ z b))))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * pow(z, y);
double tmp;
if (y <= -1.2e+40) {
tmp = t_1;
} else if (y <= 17.0) {
tmp = x * exp(-(a * (z + b)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: tmp
t_1 = x * (z ** y)
if (y <= (-1.2d+40)) then
tmp = t_1
else if (y <= 17.0d0) then
tmp = x * exp(-(a * (z + b)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * Math.pow(z, y);
double tmp;
if (y <= -1.2e+40) {
tmp = t_1;
} else if (y <= 17.0) {
tmp = x * Math.exp(-(a * (z + b)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * math.pow(z, y) tmp = 0 if y <= -1.2e+40: tmp = t_1 elif y <= 17.0: tmp = x * math.exp(-(a * (z + b))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * (z ^ y)) tmp = 0.0 if (y <= -1.2e+40) tmp = t_1; elseif (y <= 17.0) tmp = Float64(x * exp(Float64(-Float64(a * Float64(z + b))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * (z ^ y); tmp = 0.0; if (y <= -1.2e+40) tmp = t_1; elseif (y <= 17.0) tmp = x * exp(-(a * (z + b))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.2e+40], t$95$1, If[LessEqual[y, 17.0], N[(x * N[Exp[(-N[(a * N[(z + b), $MachinePrecision]), $MachinePrecision])], $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot {z}^{y}\\
\mathbf{if}\;y \leq -1.2 \cdot 10^{+40}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 17:\\
\;\;\;\;x \cdot e^{-a \cdot \left(z + b\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.2e40 or 17 < y Initial program 98.4%
Taylor expanded in y around inf
*-lowering-*.f64N/A
--lowering--.f64N/A
log-lowering-log.f6492.7
Simplified92.7%
Taylor expanded in t around 0
*-lowering-*.f64N/A
pow-lowering-pow.f6475.8
Simplified75.8%
if -1.2e40 < y < 17Initial program 94.2%
Taylor expanded in y around 0
*-lowering-*.f64N/A
--lowering--.f64N/A
sub-negN/A
accelerator-lowering-log1p.f64N/A
neg-lowering-neg.f6483.7
Simplified83.7%
Taylor expanded in z around 0
--lowering--.f64N/A
mul-1-negN/A
neg-lowering-neg.f6483.7
Simplified83.7%
Final simplification79.9%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* x (pow z y)))) (if (<= y -7.5e+39) t_1 (if (<= y 2.8) (* x (exp (* b (- a)))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * pow(z, y);
double tmp;
if (y <= -7.5e+39) {
tmp = t_1;
} else if (y <= 2.8) {
tmp = x * exp((b * -a));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: tmp
t_1 = x * (z ** y)
if (y <= (-7.5d+39)) then
tmp = t_1
else if (y <= 2.8d0) then
tmp = x * exp((b * -a))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * Math.pow(z, y);
double tmp;
if (y <= -7.5e+39) {
tmp = t_1;
} else if (y <= 2.8) {
tmp = x * Math.exp((b * -a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * math.pow(z, y) tmp = 0 if y <= -7.5e+39: tmp = t_1 elif y <= 2.8: tmp = x * math.exp((b * -a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * (z ^ y)) tmp = 0.0 if (y <= -7.5e+39) tmp = t_1; elseif (y <= 2.8) tmp = Float64(x * exp(Float64(b * Float64(-a)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * (z ^ y); tmp = 0.0; if (y <= -7.5e+39) tmp = t_1; elseif (y <= 2.8) tmp = x * exp((b * -a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.5e+39], t$95$1, If[LessEqual[y, 2.8], N[(x * N[Exp[N[(b * (-a)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot {z}^{y}\\
\mathbf{if}\;y \leq -7.5 \cdot 10^{+39}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.8:\\
\;\;\;\;x \cdot e^{b \cdot \left(-a\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -7.5000000000000005e39 or 2.7999999999999998 < y Initial program 98.4%
Taylor expanded in y around inf
*-lowering-*.f64N/A
--lowering--.f64N/A
log-lowering-log.f6492.7
Simplified92.7%
Taylor expanded in t around 0
*-lowering-*.f64N/A
pow-lowering-pow.f6475.8
Simplified75.8%
if -7.5000000000000005e39 < y < 2.7999999999999998Initial program 94.2%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6475.2
Simplified75.2%
Final simplification75.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -1.3e+88)
(* x (- 1.0 (* y t)))
(if (<= y 3.7e-235)
(* x (fma a (- (- z) b) 1.0))
(if (<= y 5.2e+137) (* a (/ x a)) (- (* x (* a b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.3e+88) {
tmp = x * (1.0 - (y * t));
} else if (y <= 3.7e-235) {
tmp = x * fma(a, (-z - b), 1.0);
} else if (y <= 5.2e+137) {
tmp = a * (x / a);
} else {
tmp = -(x * (a * b));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.3e+88) tmp = Float64(x * Float64(1.0 - Float64(y * t))); elseif (y <= 3.7e-235) tmp = Float64(x * fma(a, Float64(Float64(-z) - b), 1.0)); elseif (y <= 5.2e+137) tmp = Float64(a * Float64(x / a)); else tmp = Float64(-Float64(x * Float64(a * b))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.3e+88], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.7e-235], N[(x * N[(a * N[((-z) - b), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.2e+137], N[(a * N[(x / a), $MachinePrecision]), $MachinePrecision], (-N[(x * N[(a * b), $MachinePrecision]), $MachinePrecision])]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.3 \cdot 10^{+88}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\mathbf{elif}\;y \leq 3.7 \cdot 10^{-235}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(a, \left(-z\right) - b, 1\right)\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{+137}:\\
\;\;\;\;a \cdot \frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;-x \cdot \left(a \cdot b\right)\\
\end{array}
\end{array}
if y < -1.3e88Initial program 97.6%
Taylor expanded in t around inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6464.4
Simplified64.4%
Taylor expanded in y around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f6426.7
Simplified26.7%
if -1.3e88 < y < 3.7000000000000001e-235Initial program 93.9%
Taylor expanded in y around 0
*-lowering-*.f64N/A
--lowering--.f64N/A
sub-negN/A
accelerator-lowering-log1p.f64N/A
neg-lowering-neg.f6482.2
Simplified82.2%
Taylor expanded in z around 0
--lowering--.f64N/A
mul-1-negN/A
neg-lowering-neg.f6482.2
Simplified82.2%
Taylor expanded in a around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
distribute-lft-inN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
--lowering--.f64N/A
mul-1-negN/A
neg-lowering-neg.f6446.7
Simplified46.7%
if 3.7000000000000001e-235 < y < 5.1999999999999998e137Initial program 97.4%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6459.7
Simplified59.7%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
mul-1-negN/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6429.3
Simplified29.3%
Taylor expanded in a around inf
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-+r+N/A
Simplified27.3%
Taylor expanded in a around 0
/-lowering-/.f6434.9
Simplified34.9%
if 5.1999999999999998e137 < y Initial program 97.8%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6420.6
Simplified20.6%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
mul-1-negN/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6412.0
Simplified12.0%
Taylor expanded in b around inf
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
distribute-neg-fracN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-outN/A
+-commutativeN/A
sub-negN/A
*-lowering-*.f64N/A
sub-negN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f6444.1
Simplified44.1%
Taylor expanded in b around 0
mul-1-negN/A
neg-lowering-neg.f6429.1
Simplified29.1%
Final simplification37.0%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
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
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 96.2%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6455.2
Simplified55.2%
Taylor expanded in a around 0
Simplified19.6%
herbie shell --seed 2024205
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, B"
:precision binary64
(* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))))))