
(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 19 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 95.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 -1e+45)
(* x (* y (* y (* y (* -0.16666666666666666 (* t (* t t)))))))
(if (<= t_1 50000000000000.0)
(* x (fma b (fma 0.5 (* b (* a a)) (- a)) 1.0))
(if (<= t_1 5e+151)
(fma
a
(fma
a
(fma
(* a -0.16666666666666666)
(* x (* b (* b b)))
(* 0.5 (* x (* b b))))
(* x (- b)))
x)
(* x (fma t (- (* 0.5 (* t (* y y))) y) 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 <= -1e+45) {
tmp = x * (y * (y * (y * (-0.16666666666666666 * (t * (t * t))))));
} else if (t_1 <= 50000000000000.0) {
tmp = x * fma(b, fma(0.5, (b * (a * a)), -a), 1.0);
} else if (t_1 <= 5e+151) {
tmp = fma(a, fma(a, fma((a * -0.16666666666666666), (x * (b * (b * b))), (0.5 * (x * (b * b)))), (x * -b)), x);
} else {
tmp = x * fma(t, ((0.5 * (t * (y * y))) - y), 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 <= -1e+45) tmp = Float64(x * Float64(y * Float64(y * Float64(y * Float64(-0.16666666666666666 * Float64(t * Float64(t * t))))))); elseif (t_1 <= 50000000000000.0) tmp = Float64(x * fma(b, fma(0.5, Float64(b * Float64(a * a)), Float64(-a)), 1.0)); elseif (t_1 <= 5e+151) tmp = fma(a, fma(a, fma(Float64(a * -0.16666666666666666), Float64(x * Float64(b * Float64(b * b))), Float64(0.5 * Float64(x * Float64(b * b)))), Float64(x * Float64(-b))), x); else tmp = Float64(x * fma(t, Float64(Float64(0.5 * Float64(t * Float64(y * y))) - y), 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, -1e+45], N[(x * N[(y * N[(y * N[(y * N[(-0.16666666666666666 * N[(t * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 50000000000000.0], N[(x * N[(b * N[(0.5 * N[(b * N[(a * a), $MachinePrecision]), $MachinePrecision] + (-a)), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+151], N[(a * N[(a * N[(N[(a * -0.16666666666666666), $MachinePrecision] * N[(x * N[(b * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(x * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * (-b)), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(x * N[(t * N[(N[(0.5 * N[(t * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - y), $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 \cdot 10^{+45}:\\
\;\;\;\;x \cdot \left(y \cdot \left(y \cdot \left(y \cdot \left(-0.16666666666666666 \cdot \left(t \cdot \left(t \cdot t\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;t\_1 \leq 50000000000000:\\
\;\;\;\;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\_1 \leq 5 \cdot 10^{+151}:\\
\;\;\;\;\mathsf{fma}\left(a, \mathsf{fma}\left(a, \mathsf{fma}\left(a \cdot -0.16666666666666666, x \cdot \left(b \cdot \left(b \cdot b\right)\right), 0.5 \cdot \left(x \cdot \left(b \cdot b\right)\right)\right), x \cdot \left(-b\right)\right), x\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(t, 0.5 \cdot \left(t \cdot \left(y \cdot y\right)\right) - y, 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))) < -9.9999999999999993e44Initial 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.f6453.7
Simplified53.7%
Taylor expanded in t around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f641.8
Simplified1.8%
Taylor expanded in t around inf
associate-*r*N/A
unpow3N/A
unpow2N/A
associate-*r*N/A
unpow2N/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
Simplified33.8%
if -9.9999999999999993e44 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 5e13Initial program 93.6%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6478.8
Simplified78.8%
Taylor expanded in b around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f6481.7
Simplified81.7%
if 5e13 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 5.0000000000000002e151Initial program 82.9%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6445.0
Simplified45.0%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified36.6%
if 5.0000000000000002e151 < (+.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 t around inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6461.1
Simplified61.1%
Taylor expanded in t around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6474.6
Simplified74.6%
Final simplification58.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 -1e+45)
(* x (* y (* y (* y (* -0.16666666666666666 (* t (* t t)))))))
(if (<= t_1 50000000000000.0)
(* x (fma b (fma 0.5 (* b (* a a)) (- a)) 1.0))
(if (<= t_1 2e+150)
(* y (* 0.5 (* y (* x (* t t)))))
(* x (fma t (- (* 0.5 (* t (* y y))) y) 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 <= -1e+45) {
tmp = x * (y * (y * (y * (-0.16666666666666666 * (t * (t * t))))));
} else if (t_1 <= 50000000000000.0) {
tmp = x * fma(b, fma(0.5, (b * (a * a)), -a), 1.0);
} else if (t_1 <= 2e+150) {
tmp = y * (0.5 * (y * (x * (t * t))));
} else {
tmp = x * fma(t, ((0.5 * (t * (y * y))) - y), 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 <= -1e+45) tmp = Float64(x * Float64(y * Float64(y * Float64(y * Float64(-0.16666666666666666 * Float64(t * Float64(t * t))))))); elseif (t_1 <= 50000000000000.0) tmp = Float64(x * fma(b, fma(0.5, Float64(b * Float64(a * a)), Float64(-a)), 1.0)); elseif (t_1 <= 2e+150) tmp = Float64(y * Float64(0.5 * Float64(y * Float64(x * Float64(t * t))))); else tmp = Float64(x * fma(t, Float64(Float64(0.5 * Float64(t * Float64(y * y))) - y), 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, -1e+45], N[(x * N[(y * N[(y * N[(y * N[(-0.16666666666666666 * N[(t * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 50000000000000.0], N[(x * N[(b * N[(0.5 * N[(b * N[(a * a), $MachinePrecision]), $MachinePrecision] + (-a)), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+150], N[(y * N[(0.5 * N[(y * N[(x * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(t * N[(N[(0.5 * N[(t * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - y), $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 \cdot 10^{+45}:\\
\;\;\;\;x \cdot \left(y \cdot \left(y \cdot \left(y \cdot \left(-0.16666666666666666 \cdot \left(t \cdot \left(t \cdot t\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;t\_1 \leq 50000000000000:\\
\;\;\;\;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\_1 \leq 2 \cdot 10^{+150}:\\
\;\;\;\;y \cdot \left(0.5 \cdot \left(y \cdot \left(x \cdot \left(t \cdot t\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(t, 0.5 \cdot \left(t \cdot \left(y \cdot y\right)\right) - y, 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))) < -9.9999999999999993e44Initial 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.f6453.7
Simplified53.7%
Taylor expanded in t around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f641.8
Simplified1.8%
Taylor expanded in t around inf
associate-*r*N/A
unpow3N/A
unpow2N/A
associate-*r*N/A
unpow2N/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
Simplified33.8%
if -9.9999999999999993e44 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 5e13Initial program 93.6%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6478.8
Simplified78.8%
Taylor expanded in b around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f6481.7
Simplified81.7%
if 5e13 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 1.99999999999999996e150Initial program 82.1%
Taylor expanded in t around inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6421.3
Simplified21.3%
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.f6421.5
Simplified21.5%
Taylor expanded in t around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6417.1
Simplified17.1%
Taylor expanded in y around inf
associate-*r*N/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6437.8
Simplified37.8%
if 1.99999999999999996e150 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 95.1%
Taylor expanded in t around inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6460.4
Simplified60.4%
Taylor expanded in t around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6473.7
Simplified73.7%
Final simplification58.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (* 0.5 (* y (* x (* t t))))))
(t_2 (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))
(if (<= t_2 -1e+45)
t_1
(if (<= t_2 50000000000000.0)
(* x (fma b (fma 0.5 (* b (* a a)) (- a)) 1.0))
(if (<= t_2 2e+150)
t_1
(* x (fma t (- (* 0.5 (* t (* y y))) y) 1.0)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (0.5 * (y * (x * (t * t))));
double t_2 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
double tmp;
if (t_2 <= -1e+45) {
tmp = t_1;
} else if (t_2 <= 50000000000000.0) {
tmp = x * fma(b, fma(0.5, (b * (a * a)), -a), 1.0);
} else if (t_2 <= 2e+150) {
tmp = t_1;
} else {
tmp = x * fma(t, ((0.5 * (t * (y * y))) - y), 1.0);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(0.5 * Float64(y * Float64(x * Float64(t * t))))) t_2 = Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))) tmp = 0.0 if (t_2 <= -1e+45) tmp = t_1; elseif (t_2 <= 50000000000000.0) tmp = Float64(x * fma(b, fma(0.5, Float64(b * Float64(a * a)), Float64(-a)), 1.0)); elseif (t_2 <= 2e+150) tmp = t_1; else tmp = Float64(x * fma(t, Float64(Float64(0.5 * Float64(t * Float64(y * y))) - y), 1.0)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(0.5 * N[(y * N[(x * N[(t * t), $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, -1e+45], t$95$1, If[LessEqual[t$95$2, 50000000000000.0], 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, 2e+150], t$95$1, N[(x * N[(t * N[(N[(0.5 * N[(t * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(0.5 \cdot \left(y \cdot \left(x \cdot \left(t \cdot t\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 -1 \cdot 10^{+45}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 50000000000000:\\
\;\;\;\;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 2 \cdot 10^{+150}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(t, 0.5 \cdot \left(t \cdot \left(y \cdot y\right)\right) - y, 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))) < -9.9999999999999993e44 or 5e13 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 1.99999999999999996e150Initial program 96.5%
Taylor expanded in t around inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6447.4
Simplified47.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.f646.1
Simplified6.1%
Taylor expanded in t around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f645.3
Simplified5.3%
Taylor expanded in y around inf
associate-*r*N/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6432.7
Simplified32.7%
if -9.9999999999999993e44 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 5e13Initial program 93.6%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6478.8
Simplified78.8%
Taylor expanded in b around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f6481.7
Simplified81.7%
if 1.99999999999999996e150 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 95.1%
Taylor expanded in t around inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6460.4
Simplified60.4%
Taylor expanded in t around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6473.7
Simplified73.7%
(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 -20000000000000.0)
(* b (* x (- a)))
(if (<= t_1 50000000000000.0)
(fma (* a (+ z b)) (- x) x)
(if (<= t_1 4e+303)
(* a (fma x (- b) (/ x a)))
(* 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 <= -20000000000000.0) {
tmp = b * (x * -a);
} else if (t_1 <= 50000000000000.0) {
tmp = fma((a * (z + b)), -x, x);
} else if (t_1 <= 4e+303) {
tmp = a * fma(x, -b, (x / a));
} 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 <= -20000000000000.0) tmp = Float64(b * Float64(x * Float64(-a))); elseif (t_1 <= 50000000000000.0) tmp = fma(Float64(a * Float64(z + b)), Float64(-x), x); elseif (t_1 <= 4e+303) tmp = Float64(a * fma(x, Float64(-b), Float64(x / a))); 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, -20000000000000.0], N[(b * N[(x * (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 50000000000000.0], N[(N[(a * N[(z + b), $MachinePrecision]), $MachinePrecision] * (-x) + x), $MachinePrecision], If[LessEqual[t$95$1, 4e+303], N[(a * N[(x * (-b) + N[(x / a), $MachinePrecision]), $MachinePrecision]), $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 -20000000000000:\\
\;\;\;\;b \cdot \left(x \cdot \left(-a\right)\right)\\
\mathbf{elif}\;t\_1 \leq 50000000000000:\\
\;\;\;\;\mathsf{fma}\left(a \cdot \left(z + b\right), -x, x\right)\\
\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+303}:\\
\;\;\;\;a \cdot \mathsf{fma}\left(x, -b, \frac{x}{a}\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))) < -2e13Initial program 100.0%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6449.3
Simplified49.3%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
associate-*r*N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f643.0
Simplified3.0%
Taylor expanded in a around inf
mul-1-negN/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
distribute-rgt-neg-outN/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.f6418.4
Simplified18.4%
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
neg-lowering-neg.f6420.4
Applied egg-rr20.4%
if -2e13 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 5e13Initial program 93.1%
Taylor expanded in y around 0
*-lowering-*.f64N/A
--lowering--.f64N/A
sub-negN/A
accelerator-lowering-log1p.f64N/A
neg-lowering-neg.f6493.9
Simplified93.9%
Taylor expanded in z around 0
--lowering--.f64N/A
mul-1-negN/A
neg-lowering-neg.f6493.9
Simplified93.9%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
mul-1-negN/A
neg-lowering-neg.f6484.5
Simplified84.5%
if 5e13 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 4e303Initial program 93.4%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6440.1
Simplified40.1%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
associate-*r*N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f6411.3
Simplified11.3%
Taylor expanded in a around inf
*-lowering-*.f64N/A
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f6420.7
Simplified20.7%
if 4e303 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 90.7%
Taylor expanded in t around inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6466.0
Simplified66.0%
Taylor expanded in y around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6461.5
Simplified61.5%
Final simplification41.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 -1e+45)
(* y (* 0.5 (* y (* x (* t t)))))
(if (<= t_1 50000000000000.0)
(* x (fma b (fma 0.5 (* b (* a a)) (- a)) 1.0))
(* x (* 0.5 (* y (* y (* t 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 <= -1e+45) {
tmp = y * (0.5 * (y * (x * (t * t))));
} else if (t_1 <= 50000000000000.0) {
tmp = x * fma(b, fma(0.5, (b * (a * a)), -a), 1.0);
} else {
tmp = x * (0.5 * (y * (y * (t * 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 <= -1e+45) tmp = Float64(y * Float64(0.5 * Float64(y * Float64(x * Float64(t * t))))); elseif (t_1 <= 50000000000000.0) tmp = Float64(x * fma(b, fma(0.5, Float64(b * Float64(a * a)), Float64(-a)), 1.0)); else tmp = Float64(x * Float64(0.5 * Float64(y * Float64(y * Float64(t * 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, -1e+45], N[(y * N[(0.5 * N[(y * N[(x * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 50000000000000.0], N[(x * N[(b * N[(0.5 * N[(b * N[(a * a), $MachinePrecision]), $MachinePrecision] + (-a)), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(x * N[(0.5 * N[(y * N[(y * N[(t * t), $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 -1 \cdot 10^{+45}:\\
\;\;\;\;y \cdot \left(0.5 \cdot \left(y \cdot \left(x \cdot \left(t \cdot t\right)\right)\right)\right)\\
\mathbf{elif}\;t\_1 \leq 50000000000000:\\
\;\;\;\;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 \left(0.5 \cdot \left(y \cdot \left(y \cdot \left(t \cdot t\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))) < -9.9999999999999993e44Initial 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.f6453.7
Simplified53.7%
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.f642.5
Simplified2.5%
Taylor expanded in t around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f642.5
Simplified2.5%
Taylor expanded in y around inf
associate-*r*N/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6431.5
Simplified31.5%
if -9.9999999999999993e44 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 5e13Initial program 93.6%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6478.8
Simplified78.8%
Taylor expanded in b around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f6481.7
Simplified81.7%
if 5e13 < (+.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 t around inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6452.0
Simplified52.0%
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.f6457.9
Simplified57.9%
Taylor expanded in y around inf
*-lowering-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6460.1
Simplified60.1%
Final simplification55.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 -1e+45)
(* y (* 0.5 (* y (* x (* t t)))))
(if (<= t_1 50000000000000.0)
(fma (* a (+ z b)) (- x) x)
(* x (* 0.5 (* y (* y (* t 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 <= -1e+45) {
tmp = y * (0.5 * (y * (x * (t * t))));
} else if (t_1 <= 50000000000000.0) {
tmp = fma((a * (z + b)), -x, x);
} else {
tmp = x * (0.5 * (y * (y * (t * 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 <= -1e+45) tmp = Float64(y * Float64(0.5 * Float64(y * Float64(x * Float64(t * t))))); elseif (t_1 <= 50000000000000.0) tmp = fma(Float64(a * Float64(z + b)), Float64(-x), x); else tmp = Float64(x * Float64(0.5 * Float64(y * Float64(y * Float64(t * 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, -1e+45], N[(y * N[(0.5 * N[(y * N[(x * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 50000000000000.0], N[(N[(a * N[(z + b), $MachinePrecision]), $MachinePrecision] * (-x) + x), $MachinePrecision], N[(x * N[(0.5 * N[(y * N[(y * N[(t * t), $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 -1 \cdot 10^{+45}:\\
\;\;\;\;y \cdot \left(0.5 \cdot \left(y \cdot \left(x \cdot \left(t \cdot t\right)\right)\right)\right)\\
\mathbf{elif}\;t\_1 \leq 50000000000000:\\
\;\;\;\;\mathsf{fma}\left(a \cdot \left(z + b\right), -x, x\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(0.5 \cdot \left(y \cdot \left(y \cdot \left(t \cdot t\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))) < -9.9999999999999993e44Initial 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.f6453.7
Simplified53.7%
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.f642.5
Simplified2.5%
Taylor expanded in t around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f642.5
Simplified2.5%
Taylor expanded in y around inf
associate-*r*N/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6431.5
Simplified31.5%
if -9.9999999999999993e44 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 5e13Initial 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.f6486.6
Simplified86.6%
Taylor expanded in z around 0
--lowering--.f64N/A
mul-1-negN/A
neg-lowering-neg.f6486.6
Simplified86.6%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
mul-1-negN/A
neg-lowering-neg.f6477.9
Simplified77.9%
if 5e13 < (+.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 t around inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6452.0
Simplified52.0%
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.f6457.9
Simplified57.9%
Taylor expanded in y around inf
*-lowering-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6460.1
Simplified60.1%
Final simplification54.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (* 0.5 (* y (* y (* t t))))))
(t_2 (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))
(if (<= t_2 -1e+45)
t_1
(if (<= t_2 50000000000000.0) (fma (* a (+ z b)) (- x) x) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * (0.5 * (y * (y * (t * t))));
double t_2 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
double tmp;
if (t_2 <= -1e+45) {
tmp = t_1;
} else if (t_2 <= 50000000000000.0) {
tmp = fma((a * (z + b)), -x, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(x * Float64(0.5 * Float64(y * Float64(y * Float64(t * t))))) t_2 = Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))) tmp = 0.0 if (t_2 <= -1e+45) tmp = t_1; elseif (t_2 <= 50000000000000.0) tmp = fma(Float64(a * Float64(z + b)), Float64(-x), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(0.5 * N[(y * N[(y * N[(t * t), $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, -1e+45], t$95$1, If[LessEqual[t$95$2, 50000000000000.0], N[(N[(a * N[(z + b), $MachinePrecision]), $MachinePrecision] * (-x) + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(0.5 \cdot \left(y \cdot \left(y \cdot \left(t \cdot t\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 -1 \cdot 10^{+45}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 50000000000000:\\
\;\;\;\;\mathsf{fma}\left(a \cdot \left(z + b\right), -x, x\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))) < -9.9999999999999993e44 or 5e13 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 95.9%
Taylor expanded in t around inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6452.8
Simplified52.8%
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.f6431.7
Simplified31.7%
Taylor expanded in y around inf
*-lowering-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6446.2
Simplified46.2%
if -9.9999999999999993e44 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 5e13Initial 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.f6486.6
Simplified86.6%
Taylor expanded in z around 0
--lowering--.f64N/A
mul-1-negN/A
neg-lowering-neg.f6486.6
Simplified86.6%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
mul-1-negN/A
neg-lowering-neg.f6477.9
Simplified77.9%
Final simplification53.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 -20000000000000.0)
(* b (* x (- a)))
(if (<= t_1 5e+37) x (* (* a b) (- 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 <= -20000000000000.0) {
tmp = b * (x * -a);
} else if (t_1 <= 5e+37) {
tmp = x;
} else {
tmp = (a * b) * -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 <= (-20000000000000.0d0)) then
tmp = b * (x * -a)
else if (t_1 <= 5d+37) then
tmp = x
else
tmp = (a * b) * -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 <= -20000000000000.0) {
tmp = b * (x * -a);
} else if (t_1 <= 5e+37) {
tmp = x;
} else {
tmp = (a * b) * -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 <= -20000000000000.0: tmp = b * (x * -a) elif t_1 <= 5e+37: tmp = x else: tmp = (a * b) * -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 <= -20000000000000.0) tmp = Float64(b * Float64(x * Float64(-a))); elseif (t_1 <= 5e+37) tmp = x; else tmp = Float64(Float64(a * b) * 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 <= -20000000000000.0) tmp = b * (x * -a); elseif (t_1 <= 5e+37) tmp = x; else tmp = (a * b) * -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, -20000000000000.0], N[(b * N[(x * (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+37], x, N[(N[(a * b), $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 -20000000000000:\\
\;\;\;\;b \cdot \left(x \cdot \left(-a\right)\right)\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+37}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\left(a \cdot b\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))) < -2e13Initial program 100.0%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6449.3
Simplified49.3%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
associate-*r*N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f643.0
Simplified3.0%
Taylor expanded in a around inf
mul-1-negN/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
distribute-rgt-neg-outN/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.f6418.4
Simplified18.4%
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
neg-lowering-neg.f6420.4
Applied egg-rr20.4%
if -2e13 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 4.99999999999999989e37Initial program 91.9%
Taylor expanded in y around inf
*-lowering-*.f64N/A
--lowering--.f64N/A
log-lowering-log.f6484.4
Simplified84.4%
Taylor expanded in y around 0
Simplified75.8%
if 4.99999999999999989e37 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 93.0%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6448.8
Simplified48.8%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
associate-*r*N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f6428.4
Simplified28.4%
Taylor expanded in a around inf
mul-1-negN/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
distribute-rgt-neg-outN/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.f6428.0
Simplified28.0%
Final simplification36.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (* a b) (- x)))
(t_2 (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))
(if (<= t_2 -20000000000000.0) t_1 (if (<= t_2 5e+37) x t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a * b) * -x;
double t_2 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
double tmp;
if (t_2 <= -20000000000000.0) {
tmp = t_1;
} else if (t_2 <= 5e+37) {
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 * b) * -x
t_2 = (y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))
if (t_2 <= (-20000000000000.0d0)) then
tmp = t_1
else if (t_2 <= 5d+37) 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 * b) * -x;
double t_2 = (y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b));
double tmp;
if (t_2 <= -20000000000000.0) {
tmp = t_1;
} else if (t_2 <= 5e+37) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a * b) * -x t_2 = (y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b)) tmp = 0 if t_2 <= -20000000000000.0: tmp = t_1 elif t_2 <= 5e+37: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a * b) * Float64(-x)) t_2 = Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))) tmp = 0.0 if (t_2 <= -20000000000000.0) tmp = t_1; elseif (t_2 <= 5e+37) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a * b) * -x; t_2 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b)); tmp = 0.0; if (t_2 <= -20000000000000.0) tmp = t_1; elseif (t_2 <= 5e+37) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a * b), $MachinePrecision] * (-x)), $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, -20000000000000.0], t$95$1, If[LessEqual[t$95$2, 5e+37], x, t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot b\right) \cdot \left(-x\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 -20000000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+37}:\\
\;\;\;\;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))) < -2e13 or 4.99999999999999989e37 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 96.5%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6449.1
Simplified49.1%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
associate-*r*N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f6415.8
Simplified15.8%
Taylor expanded in a around inf
mul-1-negN/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
distribute-rgt-neg-outN/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.f6423.2
Simplified23.2%
if -2e13 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 4.99999999999999989e37Initial program 91.9%
Taylor expanded in y around inf
*-lowering-*.f64N/A
--lowering--.f64N/A
log-lowering-log.f6484.4
Simplified84.4%
Taylor expanded in y around 0
Simplified75.8%
Final simplification35.5%
(FPCore (x y z t a b) :precision binary64 (if (<= (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))) 0.0) (* b (* x (- a))) (* x (- 1.0 (* y t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b)))) <= 0.0) {
tmp = b * (x * -a);
} 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 (exp(((y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b)))) <= 0.0d0) then
tmp = b * (x * -a)
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 (Math.exp(((y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b)))) <= 0.0) {
tmp = b * (x * -a);
} else {
tmp = x * (1.0 - (y * t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if math.exp(((y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b)))) <= 0.0: tmp = b * (x * -a) else: tmp = x * (1.0 - (y * t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (exp(Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b)))) <= 0.0) tmp = Float64(b * Float64(x * Float64(-a))); 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 (exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b)))) <= 0.0) tmp = b * (x * -a); else tmp = x * (1.0 - (y * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[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], 0.0], N[(b * N[(x * (-a)), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \leq 0:\\
\;\;\;\;b \cdot \left(x \cdot \left(-a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\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.0Initial program 100.0%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6449.3
Simplified49.3%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
associate-*r*N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f643.0
Simplified3.0%
Taylor expanded in a around inf
mul-1-negN/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
distribute-rgt-neg-outN/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.f6418.4
Simplified18.4%
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
neg-lowering-neg.f6420.4
Applied egg-rr20.4%
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)))) Initial program 92.6%
Taylor expanded in t around inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6463.6
Simplified63.6%
Taylor expanded in y around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6448.3
Simplified48.3%
Final simplification37.7%
(FPCore (x y z t a b) :precision binary64 (if (<= (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))) 0.0) (* b (* x (- a))) (* x (- 1.0 (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b)))) <= 0.0) {
tmp = b * (x * -a);
} 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 (exp(((y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b)))) <= 0.0d0) then
tmp = b * (x * -a)
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 (Math.exp(((y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b)))) <= 0.0) {
tmp = b * (x * -a);
} else {
tmp = x * (1.0 - (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if math.exp(((y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b)))) <= 0.0: tmp = b * (x * -a) else: tmp = x * (1.0 - (a * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (exp(Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b)))) <= 0.0) tmp = Float64(b * Float64(x * Float64(-a))); 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 (exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b)))) <= 0.0) tmp = b * (x * -a); else tmp = x * (1.0 - (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[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], 0.0], N[(b * N[(x * (-a)), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \leq 0:\\
\;\;\;\;b \cdot \left(x \cdot \left(-a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\
\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.0Initial program 100.0%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6449.3
Simplified49.3%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
associate-*r*N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f643.0
Simplified3.0%
Taylor expanded in a around inf
mul-1-negN/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
distribute-rgt-neg-outN/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.f6418.4
Simplified18.4%
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
neg-lowering-neg.f6420.4
Applied egg-rr20.4%
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)))) Initial program 92.6%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6461.8
Simplified61.8%
Taylor expanded in a around 0
neg-mul-1N/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f6446.9
Simplified46.9%
Final simplification36.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (exp (* y (- (log z) t))))))
(if (<= y -1.26)
t_1
(if (<= y 5.2e-37) (* 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.26) {
tmp = t_1;
} else if (y <= 5.2e-37) {
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.26d0)) then
tmp = t_1
else if (y <= 5.2d-37) 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.26) {
tmp = t_1;
} else if (y <= 5.2e-37) {
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.26: tmp = t_1 elif y <= 5.2e-37: 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.26) tmp = t_1; elseif (y <= 5.2e-37) 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.26) tmp = t_1; elseif (y <= 5.2e-37) 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.26], t$95$1, If[LessEqual[y, 5.2e-37], 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.26:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{-37}:\\
\;\;\;\;x \cdot e^{-a \cdot \left(z + b\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.26000000000000001 or 5.19999999999999959e-37 < y Initial program 96.4%
Taylor expanded in y around inf
*-lowering-*.f64N/A
--lowering--.f64N/A
log-lowering-log.f6488.7
Simplified88.7%
if -1.26000000000000001 < y < 5.19999999999999959e-37Initial 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.f6488.0
Simplified88.0%
Taylor expanded in z around 0
--lowering--.f64N/A
mul-1-negN/A
neg-lowering-neg.f6488.0
Simplified88.0%
Final simplification88.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -1.05e+45)
(* x (exp (* t (- y))))
(if (<= t 9.5e-101)
(* x (exp (- (* a (+ z b)))))
(* x (pow (exp -1.0) (* y t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.05e+45) {
tmp = x * exp((t * -y));
} else if (t <= 9.5e-101) {
tmp = x * exp(-(a * (z + b)));
} else {
tmp = x * pow(exp(-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 (t <= (-1.05d+45)) then
tmp = x * exp((t * -y))
else if (t <= 9.5d-101) then
tmp = x * exp(-(a * (z + b)))
else
tmp = x * (exp((-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 (t <= -1.05e+45) {
tmp = x * Math.exp((t * -y));
} else if (t <= 9.5e-101) {
tmp = x * Math.exp(-(a * (z + b)));
} else {
tmp = x * Math.pow(Math.exp(-1.0), (y * t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.05e+45: tmp = x * math.exp((t * -y)) elif t <= 9.5e-101: tmp = x * math.exp(-(a * (z + b))) else: tmp = x * math.pow(math.exp(-1.0), (y * t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.05e+45) tmp = Float64(x * exp(Float64(t * Float64(-y)))); elseif (t <= 9.5e-101) tmp = Float64(x * exp(Float64(-Float64(a * Float64(z + b))))); else tmp = Float64(x * (exp(-1.0) ^ Float64(y * t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -1.05e+45) tmp = x * exp((t * -y)); elseif (t <= 9.5e-101) tmp = x * exp(-(a * (z + b))); else tmp = x * (exp(-1.0) ^ (y * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.05e+45], N[(x * N[Exp[N[(t * (-y)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.5e-101], N[(x * N[Exp[(-N[(a * N[(z + b), $MachinePrecision]), $MachinePrecision])], $MachinePrecision]), $MachinePrecision], N[(x * N[Power[N[Exp[-1.0], $MachinePrecision], N[(y * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.05 \cdot 10^{+45}:\\
\;\;\;\;x \cdot e^{t \cdot \left(-y\right)}\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{-101}:\\
\;\;\;\;x \cdot e^{-a \cdot \left(z + b\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot {\left(e^{-1}\right)}^{\left(y \cdot t\right)}\\
\end{array}
\end{array}
if t < -1.04999999999999997e45Initial program 98.5%
Taylor expanded in t around inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6485.0
Simplified85.0%
if -1.04999999999999997e45 < t < 9.49999999999999994e-101Initial program 94.6%
Taylor expanded in y around 0
*-lowering-*.f64N/A
--lowering--.f64N/A
sub-negN/A
accelerator-lowering-log1p.f64N/A
neg-lowering-neg.f6473.7
Simplified73.7%
Taylor expanded in z around 0
--lowering--.f64N/A
mul-1-negN/A
neg-lowering-neg.f6473.7
Simplified73.7%
if 9.49999999999999994e-101 < t Initial program 93.8%
Taylor expanded in t around inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6476.8
Simplified76.8%
distribute-rgt-neg-outN/A
neg-mul-1N/A
exp-prodN/A
pow-lowering-pow.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f6476.8
Applied egg-rr76.8%
Final simplification77.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (exp (* t (- y))))))
(if (<= t -5.8e+44)
t_1
(if (<= t 9.5e-101) (* 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 <= -5.8e+44) {
tmp = t_1;
} else if (t <= 9.5e-101) {
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 <= (-5.8d+44)) then
tmp = t_1
else if (t <= 9.5d-101) 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 <= -5.8e+44) {
tmp = t_1;
} else if (t <= 9.5e-101) {
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 <= -5.8e+44: tmp = t_1 elif t <= 9.5e-101: 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 <= -5.8e+44) tmp = t_1; elseif (t <= 9.5e-101) 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 <= -5.8e+44) tmp = t_1; elseif (t <= 9.5e-101) 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, -5.8e+44], t$95$1, If[LessEqual[t, 9.5e-101], 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 -5.8 \cdot 10^{+44}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{-101}:\\
\;\;\;\;x \cdot e^{-a \cdot \left(z + b\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -5.8000000000000004e44 or 9.49999999999999994e-101 < t Initial program 96.0%
Taylor expanded in t around inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6480.5
Simplified80.5%
if -5.8000000000000004e44 < t < 9.49999999999999994e-101Initial program 94.6%
Taylor expanded in y around 0
*-lowering-*.f64N/A
--lowering--.f64N/A
sub-negN/A
accelerator-lowering-log1p.f64N/A
neg-lowering-neg.f6473.7
Simplified73.7%
Taylor expanded in z around 0
--lowering--.f64N/A
mul-1-negN/A
neg-lowering-neg.f6473.7
Simplified73.7%
Final simplification77.7%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* x (exp (* t (- y)))))) (if (<= t -8.8e+89) t_1 (if (<= t 2.5e-105) (* x (exp (- (* a 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 <= -8.8e+89) {
tmp = t_1;
} else if (t <= 2.5e-105) {
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 * exp((t * -y))
if (t <= (-8.8d+89)) then
tmp = t_1
else if (t <= 2.5d-105) 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.exp((t * -y));
double tmp;
if (t <= -8.8e+89) {
tmp = t_1;
} else if (t <= 2.5e-105) {
tmp = x * Math.exp(-(a * 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 <= -8.8e+89: tmp = t_1 elif t <= 2.5e-105: tmp = x * math.exp(-(a * 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 <= -8.8e+89) tmp = t_1; elseif (t <= 2.5e-105) 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 * exp((t * -y)); tmp = 0.0; if (t <= -8.8e+89) tmp = t_1; elseif (t <= 2.5e-105) 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[Exp[N[(t * (-y)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.8e+89], t$95$1, If[LessEqual[t, 2.5e-105], N[(x * N[Exp[(-N[(a * b), $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 -8.8 \cdot 10^{+89}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.5 \cdot 10^{-105}:\\
\;\;\;\;x \cdot e^{-a \cdot b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -8.8000000000000001e89 or 2.49999999999999982e-105 < t Initial program 95.8%
Taylor expanded in t around inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6480.9
Simplified80.9%
if -8.8000000000000001e89 < t < 2.49999999999999982e-105Initial program 94.9%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6467.7
Simplified67.7%
Final simplification75.1%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* x (pow z y)))) (if (<= y -5.5) t_1 (if (<= y 1.1e+145) (* 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 <= -5.5) {
tmp = t_1;
} else if (y <= 1.1e+145) {
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 <= (-5.5d0)) then
tmp = t_1
else if (y <= 1.1d+145) 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 <= -5.5) {
tmp = t_1;
} else if (y <= 1.1e+145) {
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 <= -5.5: tmp = t_1 elif y <= 1.1e+145: 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 <= -5.5) tmp = t_1; elseif (y <= 1.1e+145) 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 <= -5.5) tmp = t_1; elseif (y <= 1.1e+145) 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, -5.5], t$95$1, If[LessEqual[y, 1.1e+145], 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 -5.5:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{+145}:\\
\;\;\;\;x \cdot e^{-a \cdot b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -5.5 or 1.10000000000000004e145 < y Initial program 96.2%
Taylor expanded in y around inf
*-lowering-*.f64N/A
--lowering--.f64N/A
log-lowering-log.f6488.8
Simplified88.8%
Taylor expanded in t around 0
*-lowering-*.f64N/A
pow-lowering-pow.f6463.4
Simplified63.4%
if -5.5 < y < 1.10000000000000004e145Initial program 94.8%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6473.5
Simplified73.5%
(FPCore (x y z t a b) :precision binary64 (if (<= t -3e+98) (* x (fma y (fma 0.5 (* y (* t t)) (- t)) 1.0)) (* x (pow z y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -3e+98) {
tmp = x * fma(y, fma(0.5, (y * (t * t)), -t), 1.0);
} else {
tmp = x * pow(z, y);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -3e+98) tmp = Float64(x * fma(y, fma(0.5, Float64(y * Float64(t * t)), Float64(-t)), 1.0)); else tmp = Float64(x * (z ^ y)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -3e+98], N[(x * N[(y * N[(0.5 * N[(y * N[(t * t), $MachinePrecision]), $MachinePrecision] + (-t)), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3 \cdot 10^{+98}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(0.5, y \cdot \left(t \cdot t\right), -t\right), 1\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot {z}^{y}\\
\end{array}
\end{array}
if t < -3.0000000000000001e98Initial program 98.3%
Taylor expanded in t around inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6486.0
Simplified86.0%
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.f6451.1
Simplified51.1%
if -3.0000000000000001e98 < t Initial program 94.5%
Taylor expanded in y around inf
*-lowering-*.f64N/A
--lowering--.f64N/A
log-lowering-log.f6469.0
Simplified69.0%
Taylor expanded in t around 0
*-lowering-*.f64N/A
pow-lowering-pow.f6463.4
Simplified63.4%
(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 95.4%
Taylor expanded in y around inf
*-lowering-*.f64N/A
--lowering--.f64N/A
log-lowering-log.f6472.9
Simplified72.9%
Taylor expanded in y around 0
Simplified20.7%
herbie shell --seed 2024204
(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))))))