
(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 20 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.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (* 0.5 (* a (* a (* b b))))))
(t_2 (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))
(if (<= t_2 -2000.0)
t_1
(if (<= t_2 1e+58)
(fma b (* (fma -0.5 (* b (* a a)) a) (- x)) x)
(if (<= t_2 5.5e+250)
t_1
(* x (fma y (fma 0.5 (* y (* t t)) (- t)) 1.0)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * (0.5 * (a * (a * (b * b))));
double t_2 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
double tmp;
if (t_2 <= -2000.0) {
tmp = t_1;
} else if (t_2 <= 1e+58) {
tmp = fma(b, (fma(-0.5, (b * (a * a)), a) * -x), x);
} else if (t_2 <= 5.5e+250) {
tmp = t_1;
} else {
tmp = x * fma(y, fma(0.5, (y * (t * t)), -t), 1.0);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(x * Float64(0.5 * Float64(a * Float64(a * Float64(b * 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 <= -2000.0) tmp = t_1; elseif (t_2 <= 1e+58) tmp = fma(b, Float64(fma(-0.5, Float64(b * Float64(a * a)), a) * Float64(-x)), x); elseif (t_2 <= 5.5e+250) tmp = t_1; else tmp = Float64(x * fma(y, fma(0.5, Float64(y * Float64(t * t)), Float64(-t)), 1.0)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(0.5 * N[(a * N[(a * N[(b * b), $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]}, If[LessEqual[t$95$2, -2000.0], t$95$1, If[LessEqual[t$95$2, 1e+58], N[(b * N[(N[(-0.5 * N[(b * N[(a * a), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision] * (-x)), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$2, 5.5e+250], t$95$1, N[(x * N[(y * N[(0.5 * N[(y * N[(t * t), $MachinePrecision]), $MachinePrecision] + (-t)), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(0.5 \cdot \left(a \cdot \left(a \cdot \left(b \cdot b\right)\right)\right)\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 -2000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 10^{+58}:\\
\;\;\;\;\mathsf{fma}\left(b, \mathsf{fma}\left(-0.5, b \cdot \left(a \cdot a\right), a\right) \cdot \left(-x\right), x\right)\\
\mathbf{elif}\;t\_2 \leq 5.5 \cdot 10^{+250}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(0.5, y \cdot \left(t \cdot t\right), -t\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))) < -2e3 or 9.99999999999999944e57 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 5.4999999999999999e250Initial program 98.1%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6444.8
Simplified44.8%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
neg-lowering-neg.f6421.3
Simplified21.3%
Taylor expanded in a around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6421.4
Simplified21.4%
Taylor expanded in a around inf
*-lowering-*.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6446.7
Simplified46.7%
if -2e3 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 9.99999999999999944e57Initial program 94.4%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6484.1
Simplified84.1%
Taylor expanded in b around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6470.2
Simplified70.2%
Taylor expanded in x around -inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6483.7
Simplified83.7%
if 5.4999999999999999e250 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 91.8%
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
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
neg-lowering-neg.f6468.5
Simplified68.5%
Final simplification58.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (* 0.5 (* a (* a (* b b))))))
(t_2 (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))
(if (<= t_2 -2000.0)
t_1
(if (<= t_2 1e+58)
(* x (fma b (fma 0.5 (* b (* a a)) (- a)) 1.0))
(if (<= t_2 5.5e+250)
t_1
(* x (fma y (fma 0.5 (* y (* t t)) (- t)) 1.0)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * (0.5 * (a * (a * (b * b))));
double t_2 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
double tmp;
if (t_2 <= -2000.0) {
tmp = t_1;
} else if (t_2 <= 1e+58) {
tmp = x * fma(b, fma(0.5, (b * (a * a)), -a), 1.0);
} else if (t_2 <= 5.5e+250) {
tmp = t_1;
} else {
tmp = x * fma(y, fma(0.5, (y * (t * t)), -t), 1.0);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(x * Float64(0.5 * Float64(a * Float64(a * Float64(b * 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 <= -2000.0) tmp = t_1; elseif (t_2 <= 1e+58) tmp = Float64(x * fma(b, fma(0.5, Float64(b * Float64(a * a)), Float64(-a)), 1.0)); elseif (t_2 <= 5.5e+250) tmp = t_1; else tmp = Float64(x * fma(y, fma(0.5, Float64(y * Float64(t * t)), Float64(-t)), 1.0)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(0.5 * N[(a * N[(a * N[(b * b), $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]}, If[LessEqual[t$95$2, -2000.0], t$95$1, If[LessEqual[t$95$2, 1e+58], N[(x * N[(b * N[(0.5 * N[(b * N[(a * a), $MachinePrecision]), $MachinePrecision] + (-a)), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5.5e+250], t$95$1, N[(x * N[(y * N[(0.5 * N[(y * N[(t * t), $MachinePrecision]), $MachinePrecision] + (-t)), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(0.5 \cdot \left(a \cdot \left(a \cdot \left(b \cdot b\right)\right)\right)\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 -2000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 10^{+58}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(0.5, b \cdot \left(a \cdot a\right), -a\right), 1\right)\\
\mathbf{elif}\;t\_2 \leq 5.5 \cdot 10^{+250}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(0.5, y \cdot \left(t \cdot t\right), -t\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))) < -2e3 or 9.99999999999999944e57 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 5.4999999999999999e250Initial program 98.1%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6444.8
Simplified44.8%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
neg-lowering-neg.f6421.3
Simplified21.3%
Taylor expanded in a around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6421.4
Simplified21.4%
Taylor expanded in a around inf
*-lowering-*.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6446.7
Simplified46.7%
if -2e3 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 9.99999999999999944e57Initial program 94.4%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6484.1
Simplified84.1%
Taylor expanded in b around 0
+-commutativeN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f6482.4
Simplified82.4%
if 5.4999999999999999e250 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 91.8%
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
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
neg-lowering-neg.f6468.5
Simplified68.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))))
(if (<= t_1 0.0)
(* x (* 0.5 (* a (* a (* b b)))))
(if (<= t_1 1e+194)
(* x (fma b (fma 0.5 (* b (* a a)) (- a)) 1.0))
(* x (fma a (* a (* 0.5 (* b b))) 1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b))));
double tmp;
if (t_1 <= 0.0) {
tmp = x * (0.5 * (a * (a * (b * b))));
} else if (t_1 <= 1e+194) {
tmp = x * fma(b, fma(0.5, (b * (a * a)), -a), 1.0);
} else {
tmp = x * fma(a, (a * (0.5 * (b * b))), 1.0);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))))) tmp = 0.0 if (t_1 <= 0.0) tmp = Float64(x * Float64(0.5 * Float64(a * Float64(a * Float64(b * b))))); elseif (t_1 <= 1e+194) tmp = Float64(x * fma(b, fma(0.5, Float64(b * Float64(a * a)), Float64(-a)), 1.0)); else tmp = Float64(x * fma(a, Float64(a * Float64(0.5 * Float64(b * b))), 1.0)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = 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]}, If[LessEqual[t$95$1, 0.0], N[(x * N[(0.5 * N[(a * N[(a * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+194], N[(x * N[(b * N[(0.5 * N[(b * N[(a * a), $MachinePrecision]), $MachinePrecision] + (-a)), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(x * N[(a * N[(a * N[(0.5 * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}\\
\mathbf{if}\;t\_1 \leq 0:\\
\;\;\;\;x \cdot \left(0.5 \cdot \left(a \cdot \left(a \cdot \left(b \cdot b\right)\right)\right)\right)\\
\mathbf{elif}\;t\_1 \leq 10^{+194}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(0.5, b \cdot \left(a \cdot a\right), -a\right), 1\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(a, a \cdot \left(0.5 \cdot \left(b \cdot b\right)\right), 1\right)\\
\end{array}
\end{array}
if (*.f64 x (exp.f64 (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))))) < 0.0Initial program 98.4%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6453.4
Simplified53.4%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
neg-lowering-neg.f6432.5
Simplified32.5%
Taylor expanded in a around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6432.2
Simplified32.2%
Taylor expanded in a around inf
*-lowering-*.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6440.0
Simplified40.0%
if 0.0 < (*.f64 x (exp.f64 (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))))) < 9.99999999999999945e193Initial program 81.6%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6481.6
Simplified81.6%
Taylor expanded in b around 0
+-commutativeN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f6493.9
Simplified93.9%
if 9.99999999999999945e193 < (*.f64 x (exp.f64 (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))))) Initial program 92.3%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6453.7
Simplified53.7%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
neg-lowering-neg.f6455.7
Simplified55.7%
Taylor expanded in a around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6455.7
Simplified55.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))))))
(t_2 (* a (* b b))))
(if (<= t_1 0.0)
(* x (* 0.5 (* a t_2)))
(if (<= t_1 5e-67)
(* x (fma (* (* a a) (* b 0.5)) b 1.0))
(* x (fma a (fma 0.5 t_2 (- b)) 1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b))));
double t_2 = a * (b * b);
double tmp;
if (t_1 <= 0.0) {
tmp = x * (0.5 * (a * t_2));
} else if (t_1 <= 5e-67) {
tmp = x * fma(((a * a) * (b * 0.5)), b, 1.0);
} else {
tmp = x * fma(a, fma(0.5, t_2, -b), 1.0);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))))) t_2 = Float64(a * Float64(b * b)) tmp = 0.0 if (t_1 <= 0.0) tmp = Float64(x * Float64(0.5 * Float64(a * t_2))); elseif (t_1 <= 5e-67) tmp = Float64(x * fma(Float64(Float64(a * a) * Float64(b * 0.5)), b, 1.0)); else tmp = Float64(x * fma(a, fma(0.5, t_2, Float64(-b)), 1.0)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = 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]}, Block[{t$95$2 = N[(a * N[(b * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 0.0], N[(x * N[(0.5 * N[(a * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e-67], N[(x * N[(N[(N[(a * a), $MachinePrecision] * N[(b * 0.5), $MachinePrecision]), $MachinePrecision] * b + 1.0), $MachinePrecision]), $MachinePrecision], N[(x * N[(a * N[(0.5 * t$95$2 + (-b)), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}\\
t_2 := a \cdot \left(b \cdot b\right)\\
\mathbf{if}\;t\_1 \leq 0:\\
\;\;\;\;x \cdot \left(0.5 \cdot \left(a \cdot t\_2\right)\right)\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-67}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(\left(a \cdot a\right) \cdot \left(b \cdot 0.5\right), b, 1\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(a, \mathsf{fma}\left(0.5, t\_2, -b\right), 1\right)\\
\end{array}
\end{array}
if (*.f64 x (exp.f64 (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))))) < 0.0Initial program 98.4%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6453.4
Simplified53.4%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
neg-lowering-neg.f6432.5
Simplified32.5%
Taylor expanded in a around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6432.2
Simplified32.2%
Taylor expanded in a around inf
*-lowering-*.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6440.0
Simplified40.0%
if 0.0 < (*.f64 x (exp.f64 (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))))) < 4.9999999999999999e-67Initial program 67.3%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6467.3
Simplified67.3%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
neg-lowering-neg.f6445.8
Simplified45.8%
Taylor expanded in a around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6445.8
Simplified45.8%
associate-*r*N/A
associate-*r*N/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6497.3
Applied egg-rr97.3%
if 4.9999999999999999e-67 < (*.f64 x (exp.f64 (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))))) Initial program 93.2%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6459.2
Simplified59.2%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
neg-lowering-neg.f6460.9
Simplified60.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))))
(if (<= t_1 0.0)
(* x (* 0.5 (* a (* a (* b b)))))
(if (<= t_1 5e-67)
(* x (fma (* (* a a) (* b 0.5)) b 1.0))
(* x (fma a (* a (* 0.5 (* b b))) 1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b))));
double tmp;
if (t_1 <= 0.0) {
tmp = x * (0.5 * (a * (a * (b * b))));
} else if (t_1 <= 5e-67) {
tmp = x * fma(((a * a) * (b * 0.5)), b, 1.0);
} else {
tmp = x * fma(a, (a * (0.5 * (b * b))), 1.0);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))))) tmp = 0.0 if (t_1 <= 0.0) tmp = Float64(x * Float64(0.5 * Float64(a * Float64(a * Float64(b * b))))); elseif (t_1 <= 5e-67) tmp = Float64(x * fma(Float64(Float64(a * a) * Float64(b * 0.5)), b, 1.0)); else tmp = Float64(x * fma(a, Float64(a * Float64(0.5 * Float64(b * b))), 1.0)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = 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]}, If[LessEqual[t$95$1, 0.0], N[(x * N[(0.5 * N[(a * N[(a * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e-67], N[(x * N[(N[(N[(a * a), $MachinePrecision] * N[(b * 0.5), $MachinePrecision]), $MachinePrecision] * b + 1.0), $MachinePrecision]), $MachinePrecision], N[(x * N[(a * N[(a * N[(0.5 * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}\\
\mathbf{if}\;t\_1 \leq 0:\\
\;\;\;\;x \cdot \left(0.5 \cdot \left(a \cdot \left(a \cdot \left(b \cdot b\right)\right)\right)\right)\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-67}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(\left(a \cdot a\right) \cdot \left(b \cdot 0.5\right), b, 1\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(a, a \cdot \left(0.5 \cdot \left(b \cdot b\right)\right), 1\right)\\
\end{array}
\end{array}
if (*.f64 x (exp.f64 (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))))) < 0.0Initial program 98.4%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6453.4
Simplified53.4%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
neg-lowering-neg.f6432.5
Simplified32.5%
Taylor expanded in a around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6432.2
Simplified32.2%
Taylor expanded in a around inf
*-lowering-*.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6440.0
Simplified40.0%
if 0.0 < (*.f64 x (exp.f64 (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))))) < 4.9999999999999999e-67Initial program 67.3%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6467.3
Simplified67.3%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
neg-lowering-neg.f6445.8
Simplified45.8%
Taylor expanded in a around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6445.8
Simplified45.8%
associate-*r*N/A
associate-*r*N/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6497.3
Applied egg-rr97.3%
if 4.9999999999999999e-67 < (*.f64 x (exp.f64 (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))))) Initial program 93.2%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6459.2
Simplified59.2%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
neg-lowering-neg.f6460.9
Simplified60.9%
Taylor expanded in a around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6460.9
Simplified60.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))
(t_2 (* x (* 0.5 (* a (* a (* b b)))))))
(if (<= t_1 0.0) t_2 (if (<= t_1 10.0) (fma (* a (+ z b)) (- x) x) t_2))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b))));
double t_2 = x * (0.5 * (a * (a * (b * b))));
double tmp;
if (t_1 <= 0.0) {
tmp = t_2;
} else if (t_1 <= 10.0) {
tmp = fma((a * (z + b)), -x, x);
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = exp(Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b)))) t_2 = Float64(x * Float64(0.5 * Float64(a * Float64(a * Float64(b * b))))) tmp = 0.0 if (t_1 <= 0.0) tmp = t_2; elseif (t_1 <= 10.0) tmp = fma(Float64(a * Float64(z + b)), Float64(-x), x); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = 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]}, Block[{t$95$2 = N[(x * N[(0.5 * N[(a * N[(a * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 0.0], t$95$2, If[LessEqual[t$95$1, 10.0], N[(N[(a * N[(z + b), $MachinePrecision]), $MachinePrecision] * (-x) + x), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}\\
t_2 := x \cdot \left(0.5 \cdot \left(a \cdot \left(a \cdot \left(b \cdot b\right)\right)\right)\right)\\
\mathbf{if}\;t\_1 \leq 0:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 10:\\
\;\;\;\;\mathsf{fma}\left(a \cdot \left(z + b\right), -x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (exp.f64 (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b)))) < 0.0 or 10 < (exp.f64 (+.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 b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6447.6
Simplified47.6%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
neg-lowering-neg.f6429.9
Simplified29.9%
Taylor expanded in a around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6430.0
Simplified30.0%
Taylor expanded in a around inf
*-lowering-*.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6448.3
Simplified48.3%
if 0.0 < (exp.f64 (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b)))) < 10Initial program 93.6%
Taylor expanded in y around 0
*-lowering-*.f64N/A
--lowering--.f64N/A
sub-negN/A
accelerator-lowering-log1p.f64N/A
neg-lowering-neg.f6496.2
Simplified96.2%
Taylor expanded in z around 0
associate-*r*N/A
+-commutativeN/A
associate-*r*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
+-lowering-+.f6496.2
Simplified96.2%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-neg-inN/A
neg-mul-1N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
neg-mul-1N/A
neg-lowering-neg.f6489.6
Simplified89.6%
Final simplification55.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 -2000.0)
(* x (* 0.5 (* a (* a (* b b)))))
(if (<= t_1 5.5e+250)
(* x (fma a (- (fma a (* (+ z b) (* 0.5 (+ z b))) (- b)) z) 1.0))
(* x (fma y (fma 0.5 (* y (* t t)) (- t)) 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 <= -2000.0) {
tmp = x * (0.5 * (a * (a * (b * b))));
} else if (t_1 <= 5.5e+250) {
tmp = x * fma(a, (fma(a, ((z + b) * (0.5 * (z + b))), -b) - z), 1.0);
} else {
tmp = x * fma(y, fma(0.5, (y * (t * t)), -t), 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 <= -2000.0) tmp = Float64(x * Float64(0.5 * Float64(a * Float64(a * Float64(b * b))))); elseif (t_1 <= 5.5e+250) tmp = Float64(x * fma(a, Float64(fma(a, Float64(Float64(z + b) * Float64(0.5 * Float64(z + b))), Float64(-b)) - z), 1.0)); else tmp = Float64(x * fma(y, fma(0.5, Float64(y * Float64(t * t)), Float64(-t)), 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, -2000.0], N[(x * N[(0.5 * N[(a * N[(a * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5.5e+250], N[(x * N[(a * N[(N[(a * N[(N[(z + b), $MachinePrecision] * N[(0.5 * N[(z + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + (-b)), $MachinePrecision] - z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(x * N[(y * N[(0.5 * N[(y * N[(t * t), $MachinePrecision]), $MachinePrecision] + (-t)), $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 -2000:\\
\;\;\;\;x \cdot \left(0.5 \cdot \left(a \cdot \left(a \cdot \left(b \cdot b\right)\right)\right)\right)\\
\mathbf{elif}\;t\_1 \leq 5.5 \cdot 10^{+250}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(a, \mathsf{fma}\left(a, \left(z + b\right) \cdot \left(0.5 \cdot \left(z + b\right)\right), -b\right) - z, 1\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(0.5, y \cdot \left(t \cdot t\right), -t\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))) < -2e3Initial program 98.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
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
neg-lowering-neg.f642.9
Simplified2.9%
Taylor expanded in a around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f642.9
Simplified2.9%
Taylor expanded in a around inf
*-lowering-*.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6442.1
Simplified42.1%
if -2e3 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 5.4999999999999999e250Initial program 96.4%
Taylor expanded in y around 0
*-lowering-*.f64N/A
--lowering--.f64N/A
sub-negN/A
accelerator-lowering-log1p.f64N/A
neg-lowering-neg.f6473.6
Simplified73.6%
Taylor expanded in z around 0
associate-*r*N/A
+-commutativeN/A
associate-*r*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
+-lowering-+.f6473.6
Simplified73.6%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified65.6%
if 5.4999999999999999e250 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 91.8%
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
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
neg-lowering-neg.f6468.5
Simplified68.5%
Final simplification57.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (* 0.5 (* x (* a (* a b))))))
(t_2 (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))
(if (<= t_2 -2000.0) t_1 (if (<= t_2 2e+94) (- x (* t (* x y))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (0.5 * (x * (a * (a * b))));
double t_2 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
double tmp;
if (t_2 <= -2000.0) {
tmp = t_1;
} else if (t_2 <= 2e+94) {
tmp = x - (t * (x * y));
} 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 = b * (0.5d0 * (x * (a * (a * b))))
t_2 = (y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))
if (t_2 <= (-2000.0d0)) then
tmp = t_1
else if (t_2 <= 2d+94) then
tmp = x - (t * (x * y))
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 = b * (0.5 * (x * (a * (a * b))));
double t_2 = (y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b));
double tmp;
if (t_2 <= -2000.0) {
tmp = t_1;
} else if (t_2 <= 2e+94) {
tmp = x - (t * (x * y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (0.5 * (x * (a * (a * b)))) t_2 = (y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b)) tmp = 0 if t_2 <= -2000.0: tmp = t_1 elif t_2 <= 2e+94: tmp = x - (t * (x * y)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(0.5 * Float64(x * Float64(a * 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 <= -2000.0) tmp = t_1; elseif (t_2 <= 2e+94) tmp = Float64(x - Float64(t * Float64(x * y))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (0.5 * (x * (a * (a * b)))); t_2 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b)); tmp = 0.0; if (t_2 <= -2000.0) tmp = t_1; elseif (t_2 <= 2e+94) tmp = x - (t * (x * y)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(0.5 * N[(x * N[(a * N[(a * b), $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]}, If[LessEqual[t$95$2, -2000.0], t$95$1, If[LessEqual[t$95$2, 2e+94], N[(x - N[(t * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(0.5 \cdot \left(x \cdot \left(a \cdot \left(a \cdot b\right)\right)\right)\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 -2000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+94}:\\
\;\;\;\;x - t \cdot \left(x \cdot y\right)\\
\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))) < -2e3 or 2e94 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 96.9%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6449.0
Simplified49.0%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
neg-lowering-neg.f6430.0
Simplified30.0%
Taylor expanded in a around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6430.0
Simplified30.0%
Taylor expanded in a around inf
associate-*r*N/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6444.7
Simplified44.7%
if -2e3 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 2e94Initial program 93.5%
Taylor expanded in t around inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6476.7
Simplified76.7%
Taylor expanded in y around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6469.1
Simplified69.1%
(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 -2000.0) t_1 (if (<= t_2 2e+94) 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 <= -2000.0) {
tmp = t_1;
} else if (t_2 <= 2e+94) {
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 <= (-2000.0d0)) then
tmp = t_1
else if (t_2 <= 2d+94) 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 <= -2000.0) {
tmp = t_1;
} else if (t_2 <= 2e+94) {
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 <= -2000.0: tmp = t_1 elif t_2 <= 2e+94: 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 <= -2000.0) tmp = t_1; elseif (t_2 <= 2e+94) 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 <= -2000.0) tmp = t_1; elseif (t_2 <= 2e+94) 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, -2000.0], t$95$1, If[LessEqual[t$95$2, 2e+94], 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 -2000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+94}:\\
\;\;\;\;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))) < -2e3 or 2e94 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 96.9%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6449.0
Simplified49.0%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
neg-lowering-neg.f6430.0
Simplified30.0%
Taylor expanded in a around 0
mul-1-negN/A
neg-lowering-neg.f6415.3
Simplified15.3%
Taylor expanded in a around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6426.3
Simplified26.3%
if -2e3 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 2e94Initial program 93.5%
Taylor expanded in y around inf
*-lowering-*.f64N/A
--lowering--.f64N/A
log-lowering-log.f6486.0
Simplified86.0%
Taylor expanded in y around 0
Simplified67.5%
Final simplification36.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (* a (* x b))))
(t_2 (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))
(if (<= t_2 -2000.0) t_1 (if (<= t_2 2e+94) x t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -(a * (x * b));
double t_2 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
double tmp;
if (t_2 <= -2000.0) {
tmp = t_1;
} else if (t_2 <= 2e+94) {
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 = -(a * (x * b))
t_2 = (y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))
if (t_2 <= (-2000.0d0)) then
tmp = t_1
else if (t_2 <= 2d+94) 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 = -(a * (x * b));
double t_2 = (y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b));
double tmp;
if (t_2 <= -2000.0) {
tmp = t_1;
} else if (t_2 <= 2e+94) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = -(a * (x * b)) t_2 = (y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b)) tmp = 0 if t_2 <= -2000.0: tmp = t_1 elif t_2 <= 2e+94: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(-Float64(a * Float64(x * 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 <= -2000.0) tmp = t_1; elseif (t_2 <= 2e+94) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = -(a * (x * b)); t_2 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b)); tmp = 0.0; if (t_2 <= -2000.0) tmp = t_1; elseif (t_2 <= 2e+94) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = (-N[(a * N[(x * 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, -2000.0], t$95$1, If[LessEqual[t$95$2, 2e+94], x, t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -a \cdot \left(x \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 -2000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+94}:\\
\;\;\;\;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))) < -2e3 or 2e94 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 96.9%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6449.0
Simplified49.0%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
neg-lowering-neg.f6430.0
Simplified30.0%
Taylor expanded in a around 0
mul-1-negN/A
neg-lowering-neg.f6415.3
Simplified15.3%
Taylor expanded in a around inf
mul-1-negN/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.f6425.8
Simplified25.8%
if -2e3 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 2e94Initial program 93.5%
Taylor expanded in y around inf
*-lowering-*.f64N/A
--lowering--.f64N/A
log-lowering-log.f6486.0
Simplified86.0%
Taylor expanded in y around 0
Simplified67.5%
Final simplification35.8%
(FPCore (x y z t a b) :precision binary64 (if (<= (* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))))) 0.0) (* x (* 0.5 (* a (* a (* b b))))) (* x (fma a (* a (* 0.5 (* b b))) 1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b))))) <= 0.0) {
tmp = x * (0.5 * (a * (a * (b * b))));
} else {
tmp = x * fma(a, (a * (0.5 * (b * b))), 1.0);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))))) <= 0.0) tmp = Float64(x * Float64(0.5 * Float64(a * Float64(a * Float64(b * b))))); else tmp = Float64(x * fma(a, Float64(a * Float64(0.5 * Float64(b * b))), 1.0)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[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], 0.0], N[(x * N[(0.5 * N[(a * N[(a * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(a * N[(a * N[(0.5 * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \leq 0:\\
\;\;\;\;x \cdot \left(0.5 \cdot \left(a \cdot \left(a \cdot \left(b \cdot b\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(a, a \cdot \left(0.5 \cdot \left(b \cdot b\right)\right), 1\right)\\
\end{array}
\end{array}
if (*.f64 x (exp.f64 (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))))) < 0.0Initial program 98.4%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6453.4
Simplified53.4%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
neg-lowering-neg.f6432.5
Simplified32.5%
Taylor expanded in a around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6432.2
Simplified32.2%
Taylor expanded in a around inf
*-lowering-*.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6440.0
Simplified40.0%
if 0.0 < (*.f64 x (exp.f64 (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))))) Initial program 89.8%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6460.3
Simplified60.3%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
neg-lowering-neg.f6458.9
Simplified58.9%
Taylor expanded in a around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6458.9
Simplified58.9%
(FPCore (x y z t a b) :precision binary64 (if (<= (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))) -2000.0) (- (* x (* a b))) (fma (* a (+ z b)) (- x) x)))
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))) <= -2000.0) {
tmp = -(x * (a * b));
} else {
tmp = fma((a * (z + b)), -x, x);
}
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))) <= -2000.0) tmp = Float64(-Float64(x * Float64(a * b))); else tmp = fma(Float64(a * Float64(z + b)), Float64(-x), x); end return 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], -2000.0], (-N[(x * N[(a * b), $MachinePrecision]), $MachinePrecision]), N[(N[(a * N[(z + b), $MachinePrecision]), $MachinePrecision] * (-x) + x), $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 -2000:\\
\;\;\;\;-x \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a \cdot \left(z + b\right), -x, 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))) < -2e3Initial program 98.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
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
neg-lowering-neg.f642.9
Simplified2.9%
Taylor expanded in a around 0
mul-1-negN/A
neg-lowering-neg.f643.2
Simplified3.2%
Taylor expanded in a around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6425.9
Simplified25.9%
if -2e3 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 95.0%
Taylor expanded in y around 0
*-lowering-*.f64N/A
--lowering--.f64N/A
sub-negN/A
accelerator-lowering-log1p.f64N/A
neg-lowering-neg.f6468.3
Simplified68.3%
Taylor expanded in z around 0
associate-*r*N/A
+-commutativeN/A
associate-*r*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
+-lowering-+.f6468.3
Simplified68.3%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-neg-inN/A
neg-mul-1N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
neg-mul-1N/A
neg-lowering-neg.f6443.3
Simplified43.3%
Final simplification36.6%
(FPCore (x y z t a b) :precision binary64 (if (<= (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))) -2000.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))) <= -2000.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))) <= (-2000.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))) <= -2000.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))) <= -2000.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))) <= -2000.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))) <= -2000.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], -2000.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 -2000:\\
\;\;\;\;-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))) < -2e3Initial program 98.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
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
neg-lowering-neg.f642.9
Simplified2.9%
Taylor expanded in a around 0
mul-1-negN/A
neg-lowering-neg.f643.2
Simplified3.2%
Taylor expanded in a around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6425.9
Simplified25.9%
if -2e3 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 95.0%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6463.4
Simplified63.4%
Taylor expanded in a around 0
neg-mul-1N/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f6443.3
Simplified43.3%
Final simplification36.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (exp (* y (- (log z) t))))))
(if (<= y -1.62e-43)
t_1
(if (<= y 8.2e-5) (* 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 <= -1.62e-43) {
tmp = t_1;
} else if (y <= 8.2e-5) {
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 <= (-1.62d-43)) then
tmp = t_1
else if (y <= 8.2d-5) 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 <= -1.62e-43) {
tmp = t_1;
} else if (y <= 8.2e-5) {
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 <= -1.62e-43: tmp = t_1 elif y <= 8.2e-5: 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 <= -1.62e-43) tmp = t_1; elseif (y <= 8.2e-5) 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 <= -1.62e-43) tmp = t_1; elseif (y <= 8.2e-5) 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, -1.62e-43], t$95$1, If[LessEqual[y, 8.2e-5], 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.62 \cdot 10^{-43}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 8.2 \cdot 10^{-5}:\\
\;\;\;\;x \cdot e^{-a \cdot \left(z + b\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.6199999999999999e-43 or 8.20000000000000009e-5 < y Initial program 97.2%
Taylor expanded in y around inf
*-lowering-*.f64N/A
--lowering--.f64N/A
log-lowering-log.f6487.8
Simplified87.8%
if -1.6199999999999999e-43 < y < 8.20000000000000009e-5Initial program 94.7%
Taylor expanded in y around 0
*-lowering-*.f64N/A
--lowering--.f64N/A
sub-negN/A
accelerator-lowering-log1p.f64N/A
neg-lowering-neg.f6492.2
Simplified92.2%
Taylor expanded in z around 0
associate-*r*N/A
+-commutativeN/A
associate-*r*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
+-lowering-+.f6492.2
Simplified92.2%
Final simplification89.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (pow z y))) (t_2 (* x (exp (* t (- y))))))
(if (<= y -1.25e+157)
t_2
(if (<= y -2.2e+55)
t_1
(if (<= y 0.0015)
(* x (exp (- (* a b))))
(if (<= y 4.6e+148) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * pow(z, y);
double t_2 = x * exp((t * -y));
double tmp;
if (y <= -1.25e+157) {
tmp = t_2;
} else if (y <= -2.2e+55) {
tmp = t_1;
} else if (y <= 0.0015) {
tmp = x * exp(-(a * b));
} else if (y <= 4.6e+148) {
tmp = t_1;
} else {
tmp = t_2;
}
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 * (z ** y)
t_2 = x * exp((t * -y))
if (y <= (-1.25d+157)) then
tmp = t_2
else if (y <= (-2.2d+55)) then
tmp = t_1
else if (y <= 0.0015d0) then
tmp = x * exp(-(a * b))
else if (y <= 4.6d+148) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * Math.pow(z, y);
double t_2 = x * Math.exp((t * -y));
double tmp;
if (y <= -1.25e+157) {
tmp = t_2;
} else if (y <= -2.2e+55) {
tmp = t_1;
} else if (y <= 0.0015) {
tmp = x * Math.exp(-(a * b));
} else if (y <= 4.6e+148) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * math.pow(z, y) t_2 = x * math.exp((t * -y)) tmp = 0 if y <= -1.25e+157: tmp = t_2 elif y <= -2.2e+55: tmp = t_1 elif y <= 0.0015: tmp = x * math.exp(-(a * b)) elif y <= 4.6e+148: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * (z ^ y)) t_2 = Float64(x * exp(Float64(t * Float64(-y)))) tmp = 0.0 if (y <= -1.25e+157) tmp = t_2; elseif (y <= -2.2e+55) tmp = t_1; elseif (y <= 0.0015) tmp = Float64(x * exp(Float64(-Float64(a * b)))); elseif (y <= 4.6e+148) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * (z ^ y); t_2 = x * exp((t * -y)); tmp = 0.0; if (y <= -1.25e+157) tmp = t_2; elseif (y <= -2.2e+55) tmp = t_1; elseif (y <= 0.0015) tmp = x * exp(-(a * b)); elseif (y <= 4.6e+148) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[Exp[N[(t * (-y)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.25e+157], t$95$2, If[LessEqual[y, -2.2e+55], t$95$1, If[LessEqual[y, 0.0015], N[(x * N[Exp[(-N[(a * b), $MachinePrecision])], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.6e+148], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot {z}^{y}\\
t_2 := x \cdot e^{t \cdot \left(-y\right)}\\
\mathbf{if}\;y \leq -1.25 \cdot 10^{+157}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -2.2 \cdot 10^{+55}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 0.0015:\\
\;\;\;\;x \cdot e^{-a \cdot b}\\
\mathbf{elif}\;y \leq 4.6 \cdot 10^{+148}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -1.24999999999999994e157 or 4.6000000000000001e148 < y Initial program 94.2%
Taylor expanded in t around inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6472.0
Simplified72.0%
if -1.24999999999999994e157 < y < -2.2000000000000001e55 or 0.0015 < y < 4.6000000000000001e148Initial program 100.0%
Taylor expanded in y around inf
*-lowering-*.f64N/A
--lowering--.f64N/A
log-lowering-log.f6489.5
Simplified89.5%
Taylor expanded in t around 0
*-lowering-*.f64N/A
pow-lowering-pow.f6475.4
Simplified75.4%
if -2.2000000000000001e55 < y < 0.0015Initial program 95.5%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6480.9
Simplified80.9%
Final simplification77.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (exp (* t (- y))))))
(if (<= t -4200000.0)
t_1
(if (<= t 8e+146) (* 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((t * -y));
double tmp;
if (t <= -4200000.0) {
tmp = t_1;
} else if (t <= 8e+146) {
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((t * -y))
if (t <= (-4200000.0d0)) then
tmp = t_1
else if (t <= 8d+146) 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((t * -y));
double tmp;
if (t <= -4200000.0) {
tmp = t_1;
} else if (t <= 8e+146) {
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((t * -y)) tmp = 0 if t <= -4200000.0: tmp = t_1 elif t <= 8e+146: 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(t * Float64(-y)))) tmp = 0.0 if (t <= -4200000.0) tmp = t_1; elseif (t <= 8e+146) 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((t * -y)); tmp = 0.0; if (t <= -4200000.0) tmp = t_1; elseif (t <= 8e+146) 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[(t * (-y)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4200000.0], t$95$1, If[LessEqual[t, 8e+146], 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^{t \cdot \left(-y\right)}\\
\mathbf{if}\;t \leq -4200000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 8 \cdot 10^{+146}:\\
\;\;\;\;x \cdot e^{-a \cdot \left(z + b\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -4.2e6 or 7.99999999999999947e146 < t Initial program 96.9%
Taylor expanded in t around inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6485.5
Simplified85.5%
if -4.2e6 < t < 7.99999999999999947e146Initial program 95.7%
Taylor expanded in y around 0
*-lowering-*.f64N/A
--lowering--.f64N/A
sub-negN/A
accelerator-lowering-log1p.f64N/A
neg-lowering-neg.f6472.2
Simplified72.2%
Taylor expanded in z around 0
associate-*r*N/A
+-commutativeN/A
associate-*r*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
+-lowering-+.f6472.2
Simplified72.2%
Final simplification77.2%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* x (pow z y)))) (if (<= y -2.2e+55) t_1 (if (<= y 0.0015) (* x (exp (- (* a 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 <= -2.2e+55) {
tmp = t_1;
} else if (y <= 0.0015) {
tmp = x * exp(-(a * 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 <= (-2.2d+55)) then
tmp = t_1
else if (y <= 0.0015d0) then
tmp = x * exp(-(a * 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 <= -2.2e+55) {
tmp = t_1;
} else if (y <= 0.0015) {
tmp = x * Math.exp(-(a * 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 <= -2.2e+55: tmp = t_1 elif y <= 0.0015: tmp = x * math.exp(-(a * 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 <= -2.2e+55) tmp = t_1; elseif (y <= 0.0015) tmp = Float64(x * exp(Float64(-Float64(a * 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 <= -2.2e+55) tmp = t_1; elseif (y <= 0.0015) tmp = x * exp(-(a * 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, -2.2e+55], t$95$1, If[LessEqual[y, 0.0015], N[(x * N[Exp[(-N[(a * b), $MachinePrecision])], $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot {z}^{y}\\
\mathbf{if}\;y \leq -2.2 \cdot 10^{+55}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 0.0015:\\
\;\;\;\;x \cdot e^{-a \cdot b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.2000000000000001e55 or 0.0015 < y Initial program 96.8%
Taylor expanded in y around inf
*-lowering-*.f64N/A
--lowering--.f64N/A
log-lowering-log.f6489.8
Simplified89.8%
Taylor expanded in t around 0
*-lowering-*.f64N/A
pow-lowering-pow.f6463.8
Simplified63.8%
if -2.2000000000000001e55 < y < 0.0015Initial program 95.5%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6480.9
Simplified80.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (pow z y))))
(if (<= y -5e+51)
t_1
(if (<= y 2.3e-9) (* x (fma b (fma 0.5 (* b (* a a)) (- a)) 1.0)) 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 <= -5e+51) {
tmp = t_1;
} else if (y <= 2.3e-9) {
tmp = x * fma(b, fma(0.5, (b * (a * a)), -a), 1.0);
} 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 <= -5e+51) tmp = t_1; elseif (y <= 2.3e-9) tmp = Float64(x * fma(b, fma(0.5, Float64(b * Float64(a * a)), Float64(-a)), 1.0)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5e+51], t$95$1, If[LessEqual[y, 2.3e-9], N[(x * N[(b * N[(0.5 * N[(b * N[(a * a), $MachinePrecision]), $MachinePrecision] + (-a)), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot {z}^{y}\\
\mathbf{if}\;y \leq -5 \cdot 10^{+51}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.3 \cdot 10^{-9}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(0.5, b \cdot \left(a \cdot a\right), -a\right), 1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -5e51 or 2.2999999999999999e-9 < y Initial program 96.9%
Taylor expanded in y around inf
*-lowering-*.f64N/A
--lowering--.f64N/A
log-lowering-log.f6487.9
Simplified87.9%
Taylor expanded in t around 0
*-lowering-*.f64N/A
pow-lowering-pow.f6462.9
Simplified62.9%
if -5e51 < y < 2.2999999999999999e-9Initial program 95.3%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6480.9
Simplified80.9%
Taylor expanded in b around 0
+-commutativeN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f6466.3
Simplified66.3%
(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.1%
Taylor expanded in y around inf
*-lowering-*.f64N/A
--lowering--.f64N/A
log-lowering-log.f6471.2
Simplified71.2%
Taylor expanded in y around 0
Simplified19.1%
herbie shell --seed 2024199
(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))))))