
(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 22 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 (fma y (- (log z) t) (* (- 0.0 a) (+ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(fma(y, (log(z) - t), ((0.0 - a) * (z + b))));
}
function code(x, y, z, t, a, b) return Float64(x * exp(fma(y, Float64(log(z) - t), Float64(Float64(0.0 - a) * Float64(z + b))))) end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] + N[(N[(0.0 - a), $MachinePrecision] * N[(z + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{\mathsf{fma}\left(y, \log z - t, \left(0 - a\right) \cdot \left(z + b\right)\right)}
\end{array}
Initial program 95.4%
Taylor expanded in z around 0
associate-+r+N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
log-lowering-log.f64N/A
mul-1-negN/A
unsub-negN/A
mul-1-negN/A
distribute-rgt-neg-inN/A
distribute-lft-out--N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
neg-sub0N/A
--lowering--.f6499.6
Simplified99.6%
Final simplification99.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))
(if (<= t_1 -4e+230)
(* y (/ x y))
(if (<= t_1 -10000000.0)
(- 0.0 (* x (* y t)))
(if (<= t_1 2.0)
(* x (- 1.0 (* y t)))
(if (<= t_1 2e+288)
(* t (- (/ x t) (* x y)))
(* x (- 1.0 (* a b)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
double tmp;
if (t_1 <= -4e+230) {
tmp = y * (x / y);
} else if (t_1 <= -10000000.0) {
tmp = 0.0 - (x * (y * t));
} else if (t_1 <= 2.0) {
tmp = x * (1.0 - (y * t));
} else if (t_1 <= 2e+288) {
tmp = t * ((x / t) - (x * y));
} 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) :: t_1
real(8) :: tmp
t_1 = (y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))
if (t_1 <= (-4d+230)) then
tmp = y * (x / y)
else if (t_1 <= (-10000000.0d0)) then
tmp = 0.0d0 - (x * (y * t))
else if (t_1 <= 2.0d0) then
tmp = x * (1.0d0 - (y * t))
else if (t_1 <= 2d+288) then
tmp = t * ((x / t) - (x * y))
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 t_1 = (y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b));
double tmp;
if (t_1 <= -4e+230) {
tmp = y * (x / y);
} else if (t_1 <= -10000000.0) {
tmp = 0.0 - (x * (y * t));
} else if (t_1 <= 2.0) {
tmp = x * (1.0 - (y * t));
} else if (t_1 <= 2e+288) {
tmp = t * ((x / t) - (x * y));
} else {
tmp = x * (1.0 - (a * b));
}
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 <= -4e+230: tmp = y * (x / y) elif t_1 <= -10000000.0: tmp = 0.0 - (x * (y * t)) elif t_1 <= 2.0: tmp = x * (1.0 - (y * t)) elif t_1 <= 2e+288: tmp = t * ((x / t) - (x * y)) else: tmp = x * (1.0 - (a * b)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))) tmp = 0.0 if (t_1 <= -4e+230) tmp = Float64(y * Float64(x / y)); elseif (t_1 <= -10000000.0) tmp = Float64(0.0 - Float64(x * Float64(y * t))); elseif (t_1 <= 2.0) tmp = Float64(x * Float64(1.0 - Float64(y * t))); elseif (t_1 <= 2e+288) tmp = Float64(t * Float64(Float64(x / t) - Float64(x * y))); else tmp = Float64(x * Float64(1.0 - Float64(a * b))); 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 <= -4e+230) tmp = y * (x / y); elseif (t_1 <= -10000000.0) tmp = 0.0 - (x * (y * t)); elseif (t_1 <= 2.0) tmp = x * (1.0 - (y * t)); elseif (t_1 <= 2e+288) tmp = t * ((x / t) - (x * y)); else tmp = x * (1.0 - (a * b)); 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, -4e+230], N[(y * N[(x / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -10000000.0], N[(0.0 - N[(x * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2.0], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+288], N[(t * N[(N[(x / t), $MachinePrecision] - N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(a * b), $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 -4 \cdot 10^{+230}:\\
\;\;\;\;y \cdot \frac{x}{y}\\
\mathbf{elif}\;t\_1 \leq -10000000:\\
\;\;\;\;0 - x \cdot \left(y \cdot t\right)\\
\mathbf{elif}\;t\_1 \leq 2:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+288}:\\
\;\;\;\;t \cdot \left(\frac{x}{t} - x \cdot y\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))) < -4.0000000000000004e230Initial program 100.0%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6455.7
Simplified55.7%
Taylor expanded in y around 0
+-commutativeN/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f642.6
Simplified2.6%
Taylor expanded in y around inf
*-lowering-*.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
/-lowering-/.f646.9
Simplified6.9%
Taylor expanded in t around 0
/-lowering-/.f6427.4
Simplified27.4%
if -4.0000000000000004e230 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -1e7Initial program 94.2%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6439.2
Simplified39.2%
Taylor expanded in y around 0
+-commutativeN/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f644.8
Simplified4.8%
Taylor expanded in y around inf
*-lowering-*.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
/-lowering-/.f644.7
Simplified4.7%
Taylor expanded in y around inf
mul-1-negN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-commutativeN/A
distribute-rgt-neg-outN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
distribute-rgt-neg-outN/A
*-commutativeN/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f6420.2
Simplified20.2%
if -1e7 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 2Initial program 92.7%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6489.5
Simplified89.5%
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-sub0N/A
--lowering--.f6482.4
Simplified82.4%
Taylor expanded in y around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6489.5
Simplified89.5%
if 2 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 2e288Initial program 97.2%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6441.6
Simplified41.6%
Taylor expanded in y around 0
+-commutativeN/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6415.7
Simplified15.7%
Taylor expanded in t around inf
*-lowering-*.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6423.7
Simplified23.7%
if 2e288 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 91.9%
Taylor expanded in b around inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6473.8
Simplified73.8%
Taylor expanded in b around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f6455.9
Simplified55.9%
Final simplification42.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 -10000000.0)
(* x (* y (* y (* t (* t 0.5)))))
(if (<= t_1 2.0)
(* x (- 1.0 (* y t)))
(if (<= t_1 2e+125)
(* y (fma t (- 0.0 x) (/ x y)))
(* 0.5 (* t (* x (* y (* 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 <= -10000000.0) {
tmp = x * (y * (y * (t * (t * 0.5))));
} else if (t_1 <= 2.0) {
tmp = x * (1.0 - (y * t));
} else if (t_1 <= 2e+125) {
tmp = y * fma(t, (0.0 - x), (x / y));
} else {
tmp = 0.5 * (t * (x * (y * (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 <= -10000000.0) tmp = Float64(x * Float64(y * Float64(y * Float64(t * Float64(t * 0.5))))); elseif (t_1 <= 2.0) tmp = Float64(x * Float64(1.0 - Float64(y * t))); elseif (t_1 <= 2e+125) tmp = Float64(y * fma(t, Float64(0.0 - x), Float64(x / y))); else tmp = Float64(0.5 * Float64(t * Float64(x * Float64(y * 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, -10000000.0], N[(x * N[(y * N[(y * N[(t * N[(t * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2.0], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+125], N[(y * N[(t * N[(0.0 - x), $MachinePrecision] + N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(t * N[(x * N[(y * N[(y * 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 -10000000:\\
\;\;\;\;x \cdot \left(y \cdot \left(y \cdot \left(t \cdot \left(t \cdot 0.5\right)\right)\right)\right)\\
\mathbf{elif}\;t\_1 \leq 2:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+125}:\\
\;\;\;\;y \cdot \mathsf{fma}\left(t, 0 - x, \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(t \cdot \left(x \cdot \left(y \cdot \left(y \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))) < -1e7Initial program 96.9%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6446.8
Simplified46.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-sub0N/A
--lowering--.f642.4
Simplified2.4%
Taylor expanded in y around inf
unpow2N/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6437.0
Simplified37.0%
if -1e7 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 2Initial program 92.7%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6489.5
Simplified89.5%
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-sub0N/A
--lowering--.f6482.4
Simplified82.4%
Taylor expanded in y around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6489.5
Simplified89.5%
if 2 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 1.9999999999999998e125Initial program 96.8%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6431.3
Simplified31.3%
Taylor expanded in y around 0
+-commutativeN/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f646.5
Simplified6.5%
Taylor expanded in y around inf
*-lowering-*.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
/-lowering-/.f6431.0
Simplified31.0%
if 1.9999999999999998e125 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 94.8%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6452.7
Simplified52.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-sub0N/A
--lowering--.f6459.6
Simplified59.6%
Taylor expanded in y around inf
*-lowering-*.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6464.0
Simplified64.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (* y (* y (* t (* t 0.5))))))
(t_2 (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))
(if (<= t_2 -10000000.0)
t_1
(if (<= t_2 2.0)
(* x (- 1.0 (* y t)))
(if (<= t_2 1e+141) t_1 (* 0.5 (* t (* x (* y (* y t))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * (y * (y * (t * (t * 0.5))));
double t_2 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
double tmp;
if (t_2 <= -10000000.0) {
tmp = t_1;
} else if (t_2 <= 2.0) {
tmp = x * (1.0 - (y * t));
} else if (t_2 <= 1e+141) {
tmp = t_1;
} else {
tmp = 0.5 * (t * (x * (y * (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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * (y * (y * (t * (t * 0.5d0))))
t_2 = (y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))
if (t_2 <= (-10000000.0d0)) then
tmp = t_1
else if (t_2 <= 2.0d0) then
tmp = x * (1.0d0 - (y * t))
else if (t_2 <= 1d+141) then
tmp = t_1
else
tmp = 0.5d0 * (t * (x * (y * (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 t_1 = x * (y * (y * (t * (t * 0.5))));
double t_2 = (y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b));
double tmp;
if (t_2 <= -10000000.0) {
tmp = t_1;
} else if (t_2 <= 2.0) {
tmp = x * (1.0 - (y * t));
} else if (t_2 <= 1e+141) {
tmp = t_1;
} else {
tmp = 0.5 * (t * (x * (y * (y * t))));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * (y * (y * (t * (t * 0.5)))) t_2 = (y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b)) tmp = 0 if t_2 <= -10000000.0: tmp = t_1 elif t_2 <= 2.0: tmp = x * (1.0 - (y * t)) elif t_2 <= 1e+141: tmp = t_1 else: tmp = 0.5 * (t * (x * (y * (y * t)))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * Float64(y * Float64(y * Float64(t * Float64(t * 0.5))))) t_2 = Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))) tmp = 0.0 if (t_2 <= -10000000.0) tmp = t_1; elseif (t_2 <= 2.0) tmp = Float64(x * Float64(1.0 - Float64(y * t))); elseif (t_2 <= 1e+141) tmp = t_1; else tmp = Float64(0.5 * Float64(t * Float64(x * Float64(y * Float64(y * t))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * (y * (y * (t * (t * 0.5)))); t_2 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b)); tmp = 0.0; if (t_2 <= -10000000.0) tmp = t_1; elseif (t_2 <= 2.0) tmp = x * (1.0 - (y * t)); elseif (t_2 <= 1e+141) tmp = t_1; else tmp = 0.5 * (t * (x * (y * (y * t)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(y * N[(y * N[(t * N[(t * 0.5), $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, -10000000.0], t$95$1, If[LessEqual[t$95$2, 2.0], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+141], t$95$1, N[(0.5 * N[(t * N[(x * N[(y * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot \left(y \cdot \left(t \cdot \left(t \cdot 0.5\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 -10000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 2:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\mathbf{elif}\;t\_2 \leq 10^{+141}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(t \cdot \left(x \cdot \left(y \cdot \left(y \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))) < -1e7 or 2 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 1.00000000000000002e141Initial program 96.9%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6443.9
Simplified43.9%
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-sub0N/A
--lowering--.f648.8
Simplified8.8%
Taylor expanded in y around inf
unpow2N/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6435.0
Simplified35.0%
if -1e7 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 2Initial program 92.7%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6489.5
Simplified89.5%
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-sub0N/A
--lowering--.f6482.4
Simplified82.4%
Taylor expanded in y around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6489.5
Simplified89.5%
if 1.00000000000000002e141 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 94.6%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6451.4
Simplified51.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-sub0N/A
--lowering--.f6459.8
Simplified59.8%
Taylor expanded in y around inf
*-lowering-*.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6465.6
Simplified65.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))
(if (<= t_1 -4e+230)
(* y (/ x y))
(if (<= t_1 -10000000.0)
(- 0.0 (* x (* y t)))
(if (<= t_1 5e+250) (* x (- 1.0 (* y t))) (* x (- 1.0 (* a b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
double tmp;
if (t_1 <= -4e+230) {
tmp = y * (x / y);
} else if (t_1 <= -10000000.0) {
tmp = 0.0 - (x * (y * t));
} else if (t_1 <= 5e+250) {
tmp = x * (1.0 - (y * t));
} 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) :: t_1
real(8) :: tmp
t_1 = (y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))
if (t_1 <= (-4d+230)) then
tmp = y * (x / y)
else if (t_1 <= (-10000000.0d0)) then
tmp = 0.0d0 - (x * (y * t))
else if (t_1 <= 5d+250) then
tmp = x * (1.0d0 - (y * t))
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 t_1 = (y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b));
double tmp;
if (t_1 <= -4e+230) {
tmp = y * (x / y);
} else if (t_1 <= -10000000.0) {
tmp = 0.0 - (x * (y * t));
} else if (t_1 <= 5e+250) {
tmp = x * (1.0 - (y * t));
} else {
tmp = x * (1.0 - (a * b));
}
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 <= -4e+230: tmp = y * (x / y) elif t_1 <= -10000000.0: tmp = 0.0 - (x * (y * t)) elif t_1 <= 5e+250: tmp = x * (1.0 - (y * t)) else: tmp = x * (1.0 - (a * b)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))) tmp = 0.0 if (t_1 <= -4e+230) tmp = Float64(y * Float64(x / y)); elseif (t_1 <= -10000000.0) tmp = Float64(0.0 - Float64(x * Float64(y * t))); elseif (t_1 <= 5e+250) tmp = Float64(x * Float64(1.0 - Float64(y * t))); else tmp = Float64(x * Float64(1.0 - Float64(a * b))); 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 <= -4e+230) tmp = y * (x / y); elseif (t_1 <= -10000000.0) tmp = 0.0 - (x * (y * t)); elseif (t_1 <= 5e+250) tmp = x * (1.0 - (y * t)); else tmp = x * (1.0 - (a * b)); 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, -4e+230], N[(y * N[(x / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -10000000.0], N[(0.0 - N[(x * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+250], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(a * b), $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 -4 \cdot 10^{+230}:\\
\;\;\;\;y \cdot \frac{x}{y}\\
\mathbf{elif}\;t\_1 \leq -10000000:\\
\;\;\;\;0 - x \cdot \left(y \cdot t\right)\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+250}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\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))) < -4.0000000000000004e230Initial program 100.0%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6455.7
Simplified55.7%
Taylor expanded in y around 0
+-commutativeN/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f642.6
Simplified2.6%
Taylor expanded in y around inf
*-lowering-*.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
/-lowering-/.f646.9
Simplified6.9%
Taylor expanded in t around 0
/-lowering-/.f6427.4
Simplified27.4%
if -4.0000000000000004e230 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -1e7Initial program 94.2%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6439.2
Simplified39.2%
Taylor expanded in y around 0
+-commutativeN/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f644.8
Simplified4.8%
Taylor expanded in y around inf
*-lowering-*.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
/-lowering-/.f644.7
Simplified4.7%
Taylor expanded in y around inf
mul-1-negN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-commutativeN/A
distribute-rgt-neg-outN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
distribute-rgt-neg-outN/A
*-commutativeN/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f6420.2
Simplified20.2%
if -1e7 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 5.0000000000000002e250Initial program 94.6%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6464.8
Simplified64.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-sub0N/A
--lowering--.f6458.9
Simplified58.9%
Taylor expanded in y around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6451.8
Simplified51.8%
if 5.0000000000000002e250 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 94.1%
Taylor expanded in b around inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6469.6
Simplified69.6%
Taylor expanded in b around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f6445.6
Simplified45.6%
Final simplification40.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- 0.0 (* x (* y t))))
(t_2 (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))
(if (<= t_2 -10000000.0)
t_1
(if (<= t_2 2e+32) x (if (<= t_2 5e+250) t_1 (- 0.0 (* x (* a b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 0.0 - (x * (y * t));
double t_2 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
double tmp;
if (t_2 <= -10000000.0) {
tmp = t_1;
} else if (t_2 <= 2e+32) {
tmp = x;
} else if (t_2 <= 5e+250) {
tmp = t_1;
} else {
tmp = 0.0 - (x * (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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 0.0d0 - (x * (y * t))
t_2 = (y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))
if (t_2 <= (-10000000.0d0)) then
tmp = t_1
else if (t_2 <= 2d+32) then
tmp = x
else if (t_2 <= 5d+250) then
tmp = t_1
else
tmp = 0.0d0 - (x * (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 t_1 = 0.0 - (x * (y * t));
double t_2 = (y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b));
double tmp;
if (t_2 <= -10000000.0) {
tmp = t_1;
} else if (t_2 <= 2e+32) {
tmp = x;
} else if (t_2 <= 5e+250) {
tmp = t_1;
} else {
tmp = 0.0 - (x * (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = 0.0 - (x * (y * t)) t_2 = (y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b)) tmp = 0 if t_2 <= -10000000.0: tmp = t_1 elif t_2 <= 2e+32: tmp = x elif t_2 <= 5e+250: tmp = t_1 else: tmp = 0.0 - (x * (a * b)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(0.0 - Float64(x * Float64(y * 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 <= -10000000.0) tmp = t_1; elseif (t_2 <= 2e+32) tmp = x; elseif (t_2 <= 5e+250) tmp = t_1; else tmp = Float64(0.0 - Float64(x * Float64(a * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = 0.0 - (x * (y * t)); t_2 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b)); tmp = 0.0; if (t_2 <= -10000000.0) tmp = t_1; elseif (t_2 <= 2e+32) tmp = x; elseif (t_2 <= 5e+250) tmp = t_1; else tmp = 0.0 - (x * (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(0.0 - N[(x * N[(y * t), $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, -10000000.0], t$95$1, If[LessEqual[t$95$2, 2e+32], x, If[LessEqual[t$95$2, 5e+250], t$95$1, N[(0.0 - N[(x * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0 - x \cdot \left(y \cdot t\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 -10000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+32}:\\
\;\;\;\;x\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+250}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;0 - x \cdot \left(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))) < -1e7 or 2.00000000000000011e32 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 5.0000000000000002e250Initial program 96.6%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6445.3
Simplified45.3%
Taylor expanded in y around 0
+-commutativeN/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f648.3
Simplified8.3%
Taylor expanded in y around inf
*-lowering-*.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
/-lowering-/.f6414.1
Simplified14.1%
Taylor expanded in y around inf
mul-1-negN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-commutativeN/A
distribute-rgt-neg-outN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
distribute-rgt-neg-outN/A
*-commutativeN/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f6418.2
Simplified18.2%
if -1e7 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 2.00000000000000011e32Initial program 93.5%
Taylor expanded in b around inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6484.0
Simplified84.0%
Taylor expanded in b around 0
Simplified79.5%
if 5.0000000000000002e250 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 94.1%
Taylor expanded in b around inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6469.6
Simplified69.6%
Taylor expanded in b around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f6445.6
Simplified45.6%
Taylor expanded in a around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f6445.1
Simplified45.1%
Final simplification38.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- 0.0 (* x a))))
(t_2 (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))
(if (<= t_2 -500000000.0)
t_1
(if (<= t_2 5e+14) x (if (<= t_2 5e+190) t_1 (- 0.0 (* x (* a b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (0.0 - (x * a));
double t_2 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
double tmp;
if (t_2 <= -500000000.0) {
tmp = t_1;
} else if (t_2 <= 5e+14) {
tmp = x;
} else if (t_2 <= 5e+190) {
tmp = t_1;
} else {
tmp = 0.0 - (x * (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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = b * (0.0d0 - (x * a))
t_2 = (y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))
if (t_2 <= (-500000000.0d0)) then
tmp = t_1
else if (t_2 <= 5d+14) then
tmp = x
else if (t_2 <= 5d+190) then
tmp = t_1
else
tmp = 0.0d0 - (x * (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 t_1 = b * (0.0 - (x * a));
double t_2 = (y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b));
double tmp;
if (t_2 <= -500000000.0) {
tmp = t_1;
} else if (t_2 <= 5e+14) {
tmp = x;
} else if (t_2 <= 5e+190) {
tmp = t_1;
} else {
tmp = 0.0 - (x * (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (0.0 - (x * a)) t_2 = (y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b)) tmp = 0 if t_2 <= -500000000.0: tmp = t_1 elif t_2 <= 5e+14: tmp = x elif t_2 <= 5e+190: tmp = t_1 else: tmp = 0.0 - (x * (a * b)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(0.0 - Float64(x * a))) t_2 = Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))) tmp = 0.0 if (t_2 <= -500000000.0) tmp = t_1; elseif (t_2 <= 5e+14) tmp = x; elseif (t_2 <= 5e+190) tmp = t_1; else tmp = Float64(0.0 - Float64(x * Float64(a * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (0.0 - (x * a)); t_2 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b)); tmp = 0.0; if (t_2 <= -500000000.0) tmp = t_1; elseif (t_2 <= 5e+14) tmp = x; elseif (t_2 <= 5e+190) tmp = t_1; else tmp = 0.0 - (x * (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(0.0 - N[(x * a), $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, -500000000.0], t$95$1, If[LessEqual[t$95$2, 5e+14], x, If[LessEqual[t$95$2, 5e+190], t$95$1, N[(0.0 - N[(x * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(0 - x \cdot a\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 -500000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+14}:\\
\;\;\;\;x\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+190}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;0 - x \cdot \left(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))) < -5e8 or 5e14 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 5.00000000000000036e190Initial program 97.0%
Taylor expanded in b around inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6447.5
Simplified47.5%
Taylor expanded in b around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f644.5
Simplified4.5%
Taylor expanded in a around inf
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f6417.9
Simplified17.9%
if -5e8 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 5e14Initial program 93.3%
Taylor expanded in b around inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6486.7
Simplified86.7%
Taylor expanded in b around 0
Simplified82.0%
if 5.00000000000000036e190 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 94.0%
Taylor expanded in b around inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6460.3
Simplified60.3%
Taylor expanded in b around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f6435.9
Simplified35.9%
Taylor expanded in a around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f6435.3
Simplified35.3%
Final simplification37.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 -10000000.0)
(* x (* y (* y (* t (* t 0.5)))))
(if (<= t_1 4e+118)
(*
x
(fma
b
(fma b (* a (* a (fma a (* b -0.16666666666666666) 0.5))) (- 0.0 a))
1.0))
(* t (* t (fma y (- 0.0 (/ x t)) (* x (* 0.5 (* y y))))))))))
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 <= -10000000.0) {
tmp = x * (y * (y * (t * (t * 0.5))));
} else if (t_1 <= 4e+118) {
tmp = x * fma(b, fma(b, (a * (a * fma(a, (b * -0.16666666666666666), 0.5))), (0.0 - a)), 1.0);
} else {
tmp = t * (t * fma(y, (0.0 - (x / t)), (x * (0.5 * (y * y)))));
}
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 <= -10000000.0) tmp = Float64(x * Float64(y * Float64(y * Float64(t * Float64(t * 0.5))))); elseif (t_1 <= 4e+118) tmp = Float64(x * fma(b, fma(b, Float64(a * Float64(a * fma(a, Float64(b * -0.16666666666666666), 0.5))), Float64(0.0 - a)), 1.0)); else tmp = Float64(t * Float64(t * fma(y, Float64(0.0 - Float64(x / t)), Float64(x * Float64(0.5 * Float64(y * y)))))); 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, -10000000.0], N[(x * N[(y * N[(y * N[(t * N[(t * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 4e+118], N[(x * N[(b * N[(b * N[(a * N[(a * N[(a * N[(b * -0.16666666666666666), $MachinePrecision] + 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.0 - a), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(t * N[(t * N[(y * N[(0.0 - N[(x / t), $MachinePrecision]), $MachinePrecision] + N[(x * N[(0.5 * N[(y * y), $MachinePrecision]), $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 -10000000:\\
\;\;\;\;x \cdot \left(y \cdot \left(y \cdot \left(t \cdot \left(t \cdot 0.5\right)\right)\right)\right)\\
\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+118}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, a \cdot \left(a \cdot \mathsf{fma}\left(a, b \cdot -0.16666666666666666, 0.5\right)\right), 0 - a\right), 1\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(t \cdot \mathsf{fma}\left(y, 0 - \frac{x}{t}, x \cdot \left(0.5 \cdot \left(y \cdot y\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))) < -1e7Initial program 96.9%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6446.8
Simplified46.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-sub0N/A
--lowering--.f642.4
Simplified2.4%
Taylor expanded in y around inf
unpow2N/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6437.0
Simplified37.0%
if -1e7 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 3.99999999999999987e118Initial program 94.1%
Taylor expanded in b around inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6475.5
Simplified75.5%
Taylor expanded in b around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified68.5%
Taylor expanded in a around 0
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6473.2
Simplified73.2%
if 3.99999999999999987e118 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 94.9%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6452.6
Simplified52.6%
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-sub0N/A
--lowering--.f6459.4
Simplified59.4%
Taylor expanded in t around inf
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6468.6
Simplified68.6%
Final simplification58.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 -10000000.0)
(* x (* y (* y (* t (* t 0.5)))))
(if (<= t_1 4e+118)
(*
x
(fma
b
(fma b (* a (* a (fma a (* b -0.16666666666666666) 0.5))) (- 0.0 a))
1.0))
(* x (fma t (- (* t (* 0.5 (* 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 <= -10000000.0) {
tmp = x * (y * (y * (t * (t * 0.5))));
} else if (t_1 <= 4e+118) {
tmp = x * fma(b, fma(b, (a * (a * fma(a, (b * -0.16666666666666666), 0.5))), (0.0 - a)), 1.0);
} else {
tmp = x * fma(t, ((t * (0.5 * (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 <= -10000000.0) tmp = Float64(x * Float64(y * Float64(y * Float64(t * Float64(t * 0.5))))); elseif (t_1 <= 4e+118) tmp = Float64(x * fma(b, fma(b, Float64(a * Float64(a * fma(a, Float64(b * -0.16666666666666666), 0.5))), Float64(0.0 - a)), 1.0)); else tmp = Float64(x * fma(t, Float64(Float64(t * Float64(0.5 * 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, -10000000.0], N[(x * N[(y * N[(y * N[(t * N[(t * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 4e+118], N[(x * N[(b * N[(b * N[(a * N[(a * N[(a * N[(b * -0.16666666666666666), $MachinePrecision] + 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.0 - a), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(x * N[(t * N[(N[(t * N[(0.5 * 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 -10000000:\\
\;\;\;\;x \cdot \left(y \cdot \left(y \cdot \left(t \cdot \left(t \cdot 0.5\right)\right)\right)\right)\\
\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+118}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, a \cdot \left(a \cdot \mathsf{fma}\left(a, b \cdot -0.16666666666666666, 0.5\right)\right), 0 - a\right), 1\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(t, t \cdot \left(0.5 \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))) < -1e7Initial program 96.9%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6446.8
Simplified46.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-sub0N/A
--lowering--.f642.4
Simplified2.4%
Taylor expanded in y around inf
unpow2N/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6437.0
Simplified37.0%
if -1e7 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 3.99999999999999987e118Initial program 94.1%
Taylor expanded in b around inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6475.5
Simplified75.5%
Taylor expanded in b around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified68.5%
Taylor expanded in a around 0
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6473.2
Simplified73.2%
if 3.99999999999999987e118 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 94.9%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6452.6
Simplified52.6%
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-sub0N/A
--lowering--.f6459.4
Simplified59.4%
Taylor expanded in y around 0
mul-1-negN/A
distribute-rgt-inN/A
mul-1-negN/A
associate-*r*N/A
associate-+r+N/A
associate-*l*N/A
associate-*r*N/A
unpow2N/A
*-commutativeN/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
Simplified67.9%
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 -10000000.0)
(* x (* y (* y (* t (* t 0.5)))))
(if (<= t_1 4e+118)
(*
x
(fma
b
(* a (fma a (* b (fma a (* b -0.16666666666666666) 0.5)) -1.0))
1.0))
(* x (fma t (- (* t (* 0.5 (* 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 <= -10000000.0) {
tmp = x * (y * (y * (t * (t * 0.5))));
} else if (t_1 <= 4e+118) {
tmp = x * fma(b, (a * fma(a, (b * fma(a, (b * -0.16666666666666666), 0.5)), -1.0)), 1.0);
} else {
tmp = x * fma(t, ((t * (0.5 * (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 <= -10000000.0) tmp = Float64(x * Float64(y * Float64(y * Float64(t * Float64(t * 0.5))))); elseif (t_1 <= 4e+118) tmp = Float64(x * fma(b, Float64(a * fma(a, Float64(b * fma(a, Float64(b * -0.16666666666666666), 0.5)), -1.0)), 1.0)); else tmp = Float64(x * fma(t, Float64(Float64(t * Float64(0.5 * 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, -10000000.0], N[(x * N[(y * N[(y * N[(t * N[(t * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 4e+118], N[(x * N[(b * N[(a * N[(a * N[(b * N[(a * N[(b * -0.16666666666666666), $MachinePrecision] + 0.5), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(x * N[(t * N[(N[(t * N[(0.5 * 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 -10000000:\\
\;\;\;\;x \cdot \left(y \cdot \left(y \cdot \left(t \cdot \left(t \cdot 0.5\right)\right)\right)\right)\\
\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+118}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(b, a \cdot \mathsf{fma}\left(a, b \cdot \mathsf{fma}\left(a, b \cdot -0.16666666666666666, 0.5\right), -1\right), 1\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(t, t \cdot \left(0.5 \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))) < -1e7Initial program 96.9%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6446.8
Simplified46.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-sub0N/A
--lowering--.f642.4
Simplified2.4%
Taylor expanded in y around inf
unpow2N/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6437.0
Simplified37.0%
if -1e7 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 3.99999999999999987e118Initial program 94.1%
Taylor expanded in b around inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6475.5
Simplified75.5%
sub0-negN/A
neg-lowering-neg.f6475.5
Applied egg-rr75.5%
Taylor expanded in b around 0
Simplified69.9%
if 3.99999999999999987e118 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 94.9%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6452.6
Simplified52.6%
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-sub0N/A
--lowering--.f6459.4
Simplified59.4%
Taylor expanded in y around 0
mul-1-negN/A
distribute-rgt-inN/A
mul-1-negN/A
associate-*r*N/A
associate-+r+N/A
associate-*l*N/A
associate-*r*N/A
unpow2N/A
*-commutativeN/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
Simplified67.9%
(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 -10000000.0)
(* x (* y (* y (* t (* t 0.5)))))
(if (<= t_1 2e+125)
(* x (fma a (- (* 0.5 (* a (* b b))) b) 1.0))
(* x (fma t (- (* t (* 0.5 (* 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 <= -10000000.0) {
tmp = x * (y * (y * (t * (t * 0.5))));
} else if (t_1 <= 2e+125) {
tmp = x * fma(a, ((0.5 * (a * (b * b))) - b), 1.0);
} else {
tmp = x * fma(t, ((t * (0.5 * (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 <= -10000000.0) tmp = Float64(x * Float64(y * Float64(y * Float64(t * Float64(t * 0.5))))); elseif (t_1 <= 2e+125) tmp = Float64(x * fma(a, Float64(Float64(0.5 * Float64(a * Float64(b * b))) - b), 1.0)); else tmp = Float64(x * fma(t, Float64(Float64(t * Float64(0.5 * 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, -10000000.0], N[(x * N[(y * N[(y * N[(t * N[(t * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+125], N[(x * N[(a * N[(N[(0.5 * N[(a * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(x * N[(t * N[(N[(t * N[(0.5 * 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 -10000000:\\
\;\;\;\;x \cdot \left(y \cdot \left(y \cdot \left(t \cdot \left(t \cdot 0.5\right)\right)\right)\right)\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+125}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(a, 0.5 \cdot \left(a \cdot \left(b \cdot b\right)\right) - b, 1\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(t, t \cdot \left(0.5 \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))) < -1e7Initial program 96.9%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6446.8
Simplified46.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-sub0N/A
--lowering--.f642.4
Simplified2.4%
Taylor expanded in y around inf
unpow2N/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6437.0
Simplified37.0%
if -1e7 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 1.9999999999999998e125Initial program 94.2%
Taylor expanded in b around inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6474.9
Simplified74.9%
Taylor expanded in b around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified68.1%
Taylor expanded in b around 0
+-commutativeN/A
distribute-rgt-inN/A
associate-+l+N/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
associate-+l+N/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-inN/A
Simplified67.3%
if 1.9999999999999998e125 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 94.8%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6452.7
Simplified52.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-sub0N/A
--lowering--.f6459.6
Simplified59.6%
Taylor expanded in y around 0
mul-1-negN/A
distribute-rgt-inN/A
mul-1-negN/A
associate-*r*N/A
associate-+r+N/A
associate-*l*N/A
associate-*r*N/A
unpow2N/A
*-commutativeN/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
Simplified68.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* 0.5 (* t (* x (* y (* y t))))))
(t_2 (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))
(if (<= t_2 -10000000.0)
t_1
(if (<= t_2 5e+19) (* x (- 1.0 (* y t))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 0.5 * (t * (x * (y * (y * t))));
double t_2 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
double tmp;
if (t_2 <= -10000000.0) {
tmp = t_1;
} else if (t_2 <= 5e+19) {
tmp = x * (1.0 - (y * t));
} 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 = 0.5d0 * (t * (x * (y * (y * t))))
t_2 = (y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))
if (t_2 <= (-10000000.0d0)) then
tmp = t_1
else if (t_2 <= 5d+19) then
tmp = x * (1.0d0 - (y * t))
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 = 0.5 * (t * (x * (y * (y * t))));
double t_2 = (y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b));
double tmp;
if (t_2 <= -10000000.0) {
tmp = t_1;
} else if (t_2 <= 5e+19) {
tmp = x * (1.0 - (y * t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = 0.5 * (t * (x * (y * (y * t)))) t_2 = (y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b)) tmp = 0 if t_2 <= -10000000.0: tmp = t_1 elif t_2 <= 5e+19: tmp = x * (1.0 - (y * t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(0.5 * Float64(t * Float64(x * Float64(y * Float64(y * 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 <= -10000000.0) tmp = t_1; elseif (t_2 <= 5e+19) tmp = Float64(x * Float64(1.0 - Float64(y * t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = 0.5 * (t * (x * (y * (y * t)))); t_2 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b)); tmp = 0.0; if (t_2 <= -10000000.0) tmp = t_1; elseif (t_2 <= 5e+19) tmp = x * (1.0 - (y * t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(0.5 * N[(t * N[(x * N[(y * N[(y * 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, -10000000.0], t$95$1, If[LessEqual[t$95$2, 5e+19], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.5 \cdot \left(t \cdot \left(x \cdot \left(y \cdot \left(y \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 -10000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+19}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\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))) < -1e7 or 5e19 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 96.0%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6447.2
Simplified47.2%
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-sub0N/A
--lowering--.f6427.1
Simplified27.1%
Taylor expanded in y around inf
*-lowering-*.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6440.0
Simplified40.0%
if -1e7 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 5e19Initial program 93.3%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6483.8
Simplified83.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-sub0N/A
--lowering--.f6479.0
Simplified79.0%
Taylor expanded in y around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6482.3
Simplified82.3%
(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 -10000000.0)
(- 0.0 (* x (* y t)))
(if (<= t_1 5e+250) (* x (- 1.0 (* y t))) (* x (- 1.0 (* a b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
double tmp;
if (t_1 <= -10000000.0) {
tmp = 0.0 - (x * (y * t));
} else if (t_1 <= 5e+250) {
tmp = x * (1.0 - (y * t));
} 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) :: t_1
real(8) :: tmp
t_1 = (y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))
if (t_1 <= (-10000000.0d0)) then
tmp = 0.0d0 - (x * (y * t))
else if (t_1 <= 5d+250) then
tmp = x * (1.0d0 - (y * t))
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 t_1 = (y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b));
double tmp;
if (t_1 <= -10000000.0) {
tmp = 0.0 - (x * (y * t));
} else if (t_1 <= 5e+250) {
tmp = x * (1.0 - (y * t));
} else {
tmp = x * (1.0 - (a * b));
}
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 <= -10000000.0: tmp = 0.0 - (x * (y * t)) elif t_1 <= 5e+250: tmp = x * (1.0 - (y * t)) else: tmp = x * (1.0 - (a * b)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))) tmp = 0.0 if (t_1 <= -10000000.0) tmp = Float64(0.0 - Float64(x * Float64(y * t))); elseif (t_1 <= 5e+250) tmp = Float64(x * Float64(1.0 - Float64(y * t))); else tmp = Float64(x * Float64(1.0 - Float64(a * b))); 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 <= -10000000.0) tmp = 0.0 - (x * (y * t)); elseif (t_1 <= 5e+250) tmp = x * (1.0 - (y * t)); else tmp = x * (1.0 - (a * b)); 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, -10000000.0], N[(0.0 - N[(x * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+250], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(a * b), $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 -10000000:\\
\;\;\;\;0 - x \cdot \left(y \cdot t\right)\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+250}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\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))) < -1e7Initial program 96.9%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6446.8
Simplified46.8%
Taylor expanded in y around 0
+-commutativeN/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f643.7
Simplified3.7%
Taylor expanded in y around inf
*-lowering-*.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
/-lowering-/.f645.7
Simplified5.7%
Taylor expanded in y around inf
mul-1-negN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-commutativeN/A
distribute-rgt-neg-outN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
distribute-rgt-neg-outN/A
*-commutativeN/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f6418.1
Simplified18.1%
if -1e7 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 5.0000000000000002e250Initial program 94.6%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6464.8
Simplified64.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-sub0N/A
--lowering--.f6458.9
Simplified58.9%
Taylor expanded in y around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6451.8
Simplified51.8%
if 5.0000000000000002e250 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 94.1%
Taylor expanded in b around inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6469.6
Simplified69.6%
Taylor expanded in b around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f6445.6
Simplified45.6%
Final simplification38.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- 0.0 (* x a))))
(t_2 (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))
(if (<= t_2 -500000000.0) t_1 (if (<= t_2 5e+14) x t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (0.0 - (x * a));
double t_2 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
double tmp;
if (t_2 <= -500000000.0) {
tmp = t_1;
} else if (t_2 <= 5e+14) {
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 = b * (0.0d0 - (x * a))
t_2 = (y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))
if (t_2 <= (-500000000.0d0)) then
tmp = t_1
else if (t_2 <= 5d+14) 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 = b * (0.0 - (x * a));
double t_2 = (y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b));
double tmp;
if (t_2 <= -500000000.0) {
tmp = t_1;
} else if (t_2 <= 5e+14) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (0.0 - (x * a)) t_2 = (y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b)) tmp = 0 if t_2 <= -500000000.0: tmp = t_1 elif t_2 <= 5e+14: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(0.0 - Float64(x * a))) t_2 = Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))) tmp = 0.0 if (t_2 <= -500000000.0) tmp = t_1; elseif (t_2 <= 5e+14) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (0.0 - (x * a)); t_2 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b)); tmp = 0.0; if (t_2 <= -500000000.0) tmp = t_1; elseif (t_2 <= 5e+14) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(0.0 - N[(x * a), $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, -500000000.0], t$95$1, If[LessEqual[t$95$2, 5e+14], x, t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(0 - x \cdot a\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 -500000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+14}:\\
\;\;\;\;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))) < -5e8 or 5e14 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 96.0%
Taylor expanded in b around inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6451.8
Simplified51.8%
Taylor expanded in b around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f6415.1
Simplified15.1%
Taylor expanded in a around inf
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f6420.9
Simplified20.9%
if -5e8 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 5e14Initial program 93.3%
Taylor expanded in b around inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6486.7
Simplified86.7%
Taylor expanded in b around 0
Simplified82.0%
Final simplification35.0%
(FPCore (x y z t a b) :precision binary64 (if (<= (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))) -10000000.0) (* x (* y (* y (* t (* t 0.5))))) (* x (fma a (- (* 0.5 (* a (* b b))) b) 1.0))))
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))) <= -10000000.0) {
tmp = x * (y * (y * (t * (t * 0.5))));
} else {
tmp = x * fma(a, ((0.5 * (a * (b * b))) - b), 1.0);
}
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))) <= -10000000.0) tmp = Float64(x * Float64(y * Float64(y * Float64(t * Float64(t * 0.5))))); else tmp = Float64(x * fma(a, Float64(Float64(0.5 * Float64(a * Float64(b * b))) - b), 1.0)); 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], -10000000.0], N[(x * N[(y * N[(y * N[(t * N[(t * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(a * N[(N[(0.5 * N[(a * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision] + 1.0), $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 -10000000:\\
\;\;\;\;x \cdot \left(y \cdot \left(y \cdot \left(t \cdot \left(t \cdot 0.5\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(a, 0.5 \cdot \left(a \cdot \left(b \cdot b\right)\right) - b, 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))) < -1e7Initial program 96.9%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6446.8
Simplified46.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-sub0N/A
--lowering--.f642.4
Simplified2.4%
Taylor expanded in y around inf
unpow2N/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6437.0
Simplified37.0%
if -1e7 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 94.5%
Taylor expanded in b around inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6465.7
Simplified65.7%
Taylor expanded in b around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified60.9%
Taylor expanded in b around 0
+-commutativeN/A
distribute-rgt-inN/A
associate-+l+N/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
associate-+l+N/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-inN/A
Simplified64.8%
(FPCore (x y z t a b) :precision binary64 (if (<= (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))) -10000000.0) (- 0.0 (* x (* y t))) (* 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))) <= -10000000.0) {
tmp = 0.0 - (x * (y * t));
} 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))) <= (-10000000.0d0)) then
tmp = 0.0d0 - (x * (y * t))
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))) <= -10000000.0) {
tmp = 0.0 - (x * (y * t));
} 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))) <= -10000000.0: tmp = 0.0 - (x * (y * t)) 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))) <= -10000000.0) tmp = Float64(0.0 - Float64(x * Float64(y * t))); 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))) <= -10000000.0) tmp = 0.0 - (x * (y * t)); 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], -10000000.0], N[(0.0 - N[(x * N[(y * t), $MachinePrecision]), $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 -10000000:\\
\;\;\;\;0 - x \cdot \left(y \cdot t\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))) < -1e7Initial program 96.9%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6446.8
Simplified46.8%
Taylor expanded in y around 0
+-commutativeN/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f643.7
Simplified3.7%
Taylor expanded in y around inf
*-lowering-*.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
/-lowering-/.f645.7
Simplified5.7%
Taylor expanded in y around inf
mul-1-negN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-commutativeN/A
distribute-rgt-neg-outN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
distribute-rgt-neg-outN/A
*-commutativeN/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f6418.1
Simplified18.1%
if -1e7 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 94.5%
Taylor expanded in b around inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6465.7
Simplified65.7%
Taylor expanded in b around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f6446.9
Simplified46.9%
Final simplification36.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (exp (* y (- (log z) t))))))
(if (<= y -7e-93)
t_1
(if (<= y 2.9e-53) (* x (exp (* a (- (log (- 1.0 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 <= -7e-93) {
tmp = t_1;
} else if (y <= 2.9e-53) {
tmp = x * exp((a * (log((1.0 - 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 <= (-7d-93)) then
tmp = t_1
else if (y <= 2.9d-53) then
tmp = x * exp((a * (log((1.0d0 - 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 <= -7e-93) {
tmp = t_1;
} else if (y <= 2.9e-53) {
tmp = x * Math.exp((a * (Math.log((1.0 - 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 <= -7e-93: tmp = t_1 elif y <= 2.9e-53: tmp = x * math.exp((a * (math.log((1.0 - 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 <= -7e-93) tmp = t_1; elseif (y <= 2.9e-53) tmp = Float64(x * exp(Float64(a * Float64(log(Float64(1.0 - 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 <= -7e-93) tmp = t_1; elseif (y <= 2.9e-53) tmp = x * exp((a * (log((1.0 - 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, -7e-93], t$95$1, If[LessEqual[y, 2.9e-53], N[(x * N[Exp[N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - 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 -7 \cdot 10^{-93}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{-53}:\\
\;\;\;\;x \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -7e-93 or 2.8999999999999998e-53 < y Initial program 96.6%
Taylor expanded in y around inf
*-lowering-*.f64N/A
--lowering--.f64N/A
log-lowering-log.f6485.3
Simplified85.3%
if -7e-93 < y < 2.8999999999999998e-53Initial program 93.7%
Taylor expanded in y around 0
*-lowering-*.f64N/A
--lowering--.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-logN/A
--lowering--.f6483.9
Simplified83.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (exp (* y (- (log z) t))))))
(if (<= y -8.5e-179)
t_1
(if (<= y 3.6e-54) (* x (exp (- 0.0 (* a 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 <= -8.5e-179) {
tmp = t_1;
} else if (y <= 3.6e-54) {
tmp = x * exp((0.0 - (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((y * (log(z) - t)))
if (y <= (-8.5d-179)) then
tmp = t_1
else if (y <= 3.6d-54) then
tmp = x * exp((0.0d0 - (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((y * (Math.log(z) - t)));
double tmp;
if (y <= -8.5e-179) {
tmp = t_1;
} else if (y <= 3.6e-54) {
tmp = x * Math.exp((0.0 - (a * 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 <= -8.5e-179: tmp = t_1 elif y <= 3.6e-54: tmp = x * math.exp((0.0 - (a * 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 <= -8.5e-179) tmp = t_1; elseif (y <= 3.6e-54) tmp = Float64(x * exp(Float64(0.0 - 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((y * (log(z) - t))); tmp = 0.0; if (y <= -8.5e-179) tmp = t_1; elseif (y <= 3.6e-54) tmp = x * exp((0.0 - (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[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -8.5e-179], t$95$1, If[LessEqual[y, 3.6e-54], N[(x * N[Exp[N[(0.0 - N[(a * 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 -8.5 \cdot 10^{-179}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 3.6 \cdot 10^{-54}:\\
\;\;\;\;x \cdot e^{0 - a \cdot b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -8.49999999999999932e-179 or 3.59999999999999976e-54 < y Initial program 97.0%
Taylor expanded in y around inf
*-lowering-*.f64N/A
--lowering--.f64N/A
log-lowering-log.f6483.4
Simplified83.4%
if -8.49999999999999932e-179 < y < 3.59999999999999976e-54Initial program 92.4%
Taylor expanded in b around inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6486.0
Simplified86.0%
sub0-negN/A
neg-lowering-neg.f6486.0
Applied egg-rr86.0%
Final simplification84.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (exp (- 0.0 (* y t))))))
(if (<= t -4.5e+23)
t_1
(if (<= t 7.8e-165) (* x (exp (- 0.0 (* a b)))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * exp((0.0 - (y * t)));
double tmp;
if (t <= -4.5e+23) {
tmp = t_1;
} else if (t <= 7.8e-165) {
tmp = x * exp((0.0 - (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((0.0d0 - (y * t)))
if (t <= (-4.5d+23)) then
tmp = t_1
else if (t <= 7.8d-165) then
tmp = x * exp((0.0d0 - (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((0.0 - (y * t)));
double tmp;
if (t <= -4.5e+23) {
tmp = t_1;
} else if (t <= 7.8e-165) {
tmp = x * Math.exp((0.0 - (a * b)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * math.exp((0.0 - (y * t))) tmp = 0 if t <= -4.5e+23: tmp = t_1 elif t <= 7.8e-165: tmp = x * math.exp((0.0 - (a * b))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * exp(Float64(0.0 - Float64(y * t)))) tmp = 0.0 if (t <= -4.5e+23) tmp = t_1; elseif (t <= 7.8e-165) tmp = Float64(x * exp(Float64(0.0 - 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((0.0 - (y * t))); tmp = 0.0; if (t <= -4.5e+23) tmp = t_1; elseif (t <= 7.8e-165) tmp = x * exp((0.0 - (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[(0.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.5e+23], t$95$1, If[LessEqual[t, 7.8e-165], N[(x * N[Exp[N[(0.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot e^{0 - y \cdot t}\\
\mathbf{if}\;t \leq -4.5 \cdot 10^{+23}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 7.8 \cdot 10^{-165}:\\
\;\;\;\;x \cdot e^{0 - a \cdot b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -4.49999999999999979e23 or 7.7999999999999997e-165 < t Initial program 96.7%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6479.3
Simplified79.3%
if -4.49999999999999979e23 < t < 7.7999999999999997e-165Initial program 93.5%
Taylor expanded in b around inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6466.2
Simplified66.2%
sub0-negN/A
neg-lowering-neg.f6466.2
Applied egg-rr66.2%
Final simplification73.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (pow z y))))
(if (<= y -2.3e-7)
t_1
(if (<= y 1.86e+109) (* x (exp (- 0.0 (* 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.3e-7) {
tmp = t_1;
} else if (y <= 1.86e+109) {
tmp = x * exp((0.0 - (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.3d-7)) then
tmp = t_1
else if (y <= 1.86d+109) then
tmp = x * exp((0.0d0 - (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.3e-7) {
tmp = t_1;
} else if (y <= 1.86e+109) {
tmp = x * Math.exp((0.0 - (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.3e-7: tmp = t_1 elif y <= 1.86e+109: tmp = x * math.exp((0.0 - (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.3e-7) tmp = t_1; elseif (y <= 1.86e+109) tmp = Float64(x * exp(Float64(0.0 - 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.3e-7) tmp = t_1; elseif (y <= 1.86e+109) tmp = x * exp((0.0 - (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.3e-7], t$95$1, If[LessEqual[y, 1.86e+109], N[(x * N[Exp[N[(0.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot {z}^{y}\\
\mathbf{if}\;y \leq -2.3 \cdot 10^{-7}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.86 \cdot 10^{+109}:\\
\;\;\;\;x \cdot e^{0 - a \cdot b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.29999999999999995e-7 or 1.86000000000000008e109 < y Initial program 97.2%
Taylor expanded in y around inf
*-lowering-*.f64N/A
--lowering--.f64N/A
log-lowering-log.f6490.8
Simplified90.8%
Taylor expanded in t around 0
*-lowering-*.f64N/A
pow-lowering-pow.f6467.8
Simplified67.8%
if -2.29999999999999995e-7 < y < 1.86000000000000008e109Initial program 94.1%
Taylor expanded in b around inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6476.9
Simplified76.9%
sub0-negN/A
neg-lowering-neg.f6476.9
Applied egg-rr76.9%
Final simplification73.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (pow z y))))
(if (<= y -2.5e-10)
t_1
(if (<= y 320000000000.0)
(*
x
(fma
a
(fma
a
(fma 0.5 (* b b) (* (* a -0.16666666666666666) (* b (* b b))))
(- 0.0 b))
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 <= -2.5e-10) {
tmp = t_1;
} else if (y <= 320000000000.0) {
tmp = x * fma(a, fma(a, fma(0.5, (b * b), ((a * -0.16666666666666666) * (b * (b * b)))), (0.0 - b)), 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 <= -2.5e-10) tmp = t_1; elseif (y <= 320000000000.0) tmp = Float64(x * fma(a, fma(a, fma(0.5, Float64(b * b), Float64(Float64(a * -0.16666666666666666) * Float64(b * Float64(b * b)))), Float64(0.0 - b)), 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, -2.5e-10], t$95$1, If[LessEqual[y, 320000000000.0], N[(x * N[(a * N[(a * N[(0.5 * N[(b * b), $MachinePrecision] + N[(N[(a * -0.16666666666666666), $MachinePrecision] * N[(b * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.0 - b), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot {z}^{y}\\
\mathbf{if}\;y \leq -2.5 \cdot 10^{-10}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 320000000000:\\
\;\;\;\;x \cdot \mathsf{fma}\left(a, \mathsf{fma}\left(a, \mathsf{fma}\left(0.5, b \cdot b, \left(a \cdot -0.16666666666666666\right) \cdot \left(b \cdot \left(b \cdot b\right)\right)\right), 0 - b\right), 1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.50000000000000016e-10 or 3.2e11 < y Initial program 96.8%
Taylor expanded in y around inf
*-lowering-*.f64N/A
--lowering--.f64N/A
log-lowering-log.f6486.4
Simplified86.4%
Taylor expanded in t around 0
*-lowering-*.f64N/A
pow-lowering-pow.f6465.6
Simplified65.6%
if -2.50000000000000016e-10 < y < 3.2e11Initial program 94.1%
Taylor expanded in b around inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6477.8
Simplified77.8%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified57.1%
Final simplification61.2%
(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 b around inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6459.9
Simplified59.9%
Taylor expanded in b around 0
Simplified21.8%
herbie shell --seed 2024195
(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))))))