
(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 16 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) (* a (- (log1p (- z)) b))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(fma(y, (log(z) - t), (a * (log1p(-z) - b))));
}
function code(x, y, z, t, a, b) return Float64(x * exp(fma(y, Float64(log(z) - t), Float64(a * Float64(log1p(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[(a * N[(N[Log[1 + (-z)], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{\mathsf{fma}\left(y, \log z - t, a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)\right)}
\end{array}
Initial program 98.4%
fma-define98.8%
sub-neg98.8%
log1p-define99.9%
Simplified99.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -4e+48) (not (<= a 4.9e+98))) (* x (exp (* (- a) (+ z b)))) (* x (exp (* y (- (log z) t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -4e+48) || !(a <= 4.9e+98)) {
tmp = x * exp((-a * (z + b)));
} else {
tmp = x * exp((y * (log(z) - t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-4d+48)) .or. (.not. (a <= 4.9d+98))) then
tmp = x * exp((-a * (z + b)))
else
tmp = x * exp((y * (log(z) - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -4e+48) || !(a <= 4.9e+98)) {
tmp = x * Math.exp((-a * (z + b)));
} else {
tmp = x * Math.exp((y * (Math.log(z) - t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -4e+48) or not (a <= 4.9e+98): tmp = x * math.exp((-a * (z + b))) else: tmp = x * math.exp((y * (math.log(z) - t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -4e+48) || !(a <= 4.9e+98)) tmp = Float64(x * exp(Float64(Float64(-a) * Float64(z + b)))); else tmp = Float64(x * exp(Float64(y * Float64(log(z) - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -4e+48) || ~((a <= 4.9e+98))) tmp = x * exp((-a * (z + b))); else tmp = x * exp((y * (log(z) - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -4e+48], N[Not[LessEqual[a, 4.9e+98]], $MachinePrecision]], N[(x * N[Exp[N[((-a) * N[(z + b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4 \cdot 10^{+48} \lor \neg \left(a \leq 4.9 \cdot 10^{+98}\right):\\
\;\;\;\;x \cdot e^{\left(-a\right) \cdot \left(z + b\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\
\end{array}
\end{array}
if a < -4.00000000000000018e48 or 4.89999999999999979e98 < a Initial program 96.5%
Taylor expanded in z around 0 99.1%
+-commutative99.1%
associate-*r*99.1%
associate-*r*99.1%
distribute-lft-out99.1%
mul-1-neg99.1%
Simplified99.1%
Taylor expanded in y around 0 90.3%
associate-*r*90.3%
mul-1-neg90.3%
+-commutative90.3%
Simplified90.3%
if -4.00000000000000018e48 < a < 4.89999999999999979e98Initial program 99.9%
fma-define99.9%
sub-neg99.9%
log1p-define99.9%
Simplified99.9%
Taylor expanded in a around 0 87.2%
Final simplification88.6%
(FPCore (x y z t a b) :precision binary64 (* x (exp (- (* y (- (log z) t)) (* a (+ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(((y * (log(z) - t)) - (a * (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 * (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 * (z + b))));
}
def code(x, y, z, t, a, b): return x * math.exp(((y * (math.log(z) - t)) - (a * (z + b))))
function code(x, y, z, t, a, b) return Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) - Float64(a * Float64(z + b))))) end
function tmp = code(x, y, z, t, a, b) tmp = x * exp(((y * (log(z) - t)) - (a * (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[(z + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{y \cdot \left(\log z - t\right) - a \cdot \left(z + b\right)}
\end{array}
Initial program 98.4%
Taylor expanded in z around 0 99.6%
+-commutative99.6%
associate-*r*99.6%
associate-*r*99.6%
distribute-lft-out99.6%
mul-1-neg99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -1.3e+31) (not (<= a 8.2e+37))) (* x (exp (* (- a) (+ z b)))) (* x (exp (* t (- y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.3e+31) || !(a <= 8.2e+37)) {
tmp = x * exp((-a * (z + b)));
} else {
tmp = x * exp((t * -y));
}
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 ((a <= (-1.3d+31)) .or. (.not. (a <= 8.2d+37))) then
tmp = x * exp((-a * (z + b)))
else
tmp = x * exp((t * -y))
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 ((a <= -1.3e+31) || !(a <= 8.2e+37)) {
tmp = x * Math.exp((-a * (z + b)));
} else {
tmp = x * Math.exp((t * -y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -1.3e+31) or not (a <= 8.2e+37): tmp = x * math.exp((-a * (z + b))) else: tmp = x * math.exp((t * -y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -1.3e+31) || !(a <= 8.2e+37)) tmp = Float64(x * exp(Float64(Float64(-a) * Float64(z + b)))); else tmp = Float64(x * exp(Float64(t * Float64(-y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -1.3e+31) || ~((a <= 8.2e+37))) tmp = x * exp((-a * (z + b))); else tmp = x * exp((t * -y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1.3e+31], N[Not[LessEqual[a, 8.2e+37]], $MachinePrecision]], N[(x * N[Exp[N[((-a) * N[(z + b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(t * (-y)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.3 \cdot 10^{+31} \lor \neg \left(a \leq 8.2 \cdot 10^{+37}\right):\\
\;\;\;\;x \cdot e^{\left(-a\right) \cdot \left(z + b\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{t \cdot \left(-y\right)}\\
\end{array}
\end{array}
if a < -1.3e31 or 8.1999999999999996e37 < a Initial program 96.8%
Taylor expanded in z around 0 99.2%
+-commutative99.2%
associate-*r*99.2%
associate-*r*99.2%
distribute-lft-out99.2%
mul-1-neg99.2%
Simplified99.2%
Taylor expanded in y around 0 87.3%
associate-*r*87.3%
mul-1-neg87.3%
+-commutative87.3%
Simplified87.3%
if -1.3e31 < a < 8.1999999999999996e37Initial program 99.9%
fma-define99.9%
sub-neg99.9%
log1p-define99.9%
Simplified99.9%
Taylor expanded in a around 0 88.9%
Taylor expanded in t around inf 75.6%
mul-1-neg75.6%
distribute-lft-neg-out75.6%
*-commutative75.6%
Simplified75.6%
Final simplification81.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -1.35e+33) (not (<= a 3.4e+55))) (* x (exp (* a (- b)))) (* x (exp (* t (- y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.35e+33) || !(a <= 3.4e+55)) {
tmp = x * exp((a * -b));
} else {
tmp = x * exp((t * -y));
}
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 ((a <= (-1.35d+33)) .or. (.not. (a <= 3.4d+55))) then
tmp = x * exp((a * -b))
else
tmp = x * exp((t * -y))
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 ((a <= -1.35e+33) || !(a <= 3.4e+55)) {
tmp = x * Math.exp((a * -b));
} else {
tmp = x * Math.exp((t * -y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -1.35e+33) or not (a <= 3.4e+55): tmp = x * math.exp((a * -b)) else: tmp = x * math.exp((t * -y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -1.35e+33) || !(a <= 3.4e+55)) tmp = Float64(x * exp(Float64(a * Float64(-b)))); else tmp = Float64(x * exp(Float64(t * Float64(-y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -1.35e+33) || ~((a <= 3.4e+55))) tmp = x * exp((a * -b)); else tmp = x * exp((t * -y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1.35e+33], N[Not[LessEqual[a, 3.4e+55]], $MachinePrecision]], N[(x * N[Exp[N[(a * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(t * (-y)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.35 \cdot 10^{+33} \lor \neg \left(a \leq 3.4 \cdot 10^{+55}\right):\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{t \cdot \left(-y\right)}\\
\end{array}
\end{array}
if a < -1.34999999999999996e33 or 3.3999999999999998e55 < a Initial program 96.7%
fma-define97.5%
sub-neg97.5%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 80.4%
Taylor expanded in z around 0 80.4%
associate-*r*80.4%
mul-1-neg80.4%
Simplified80.4%
if -1.34999999999999996e33 < a < 3.3999999999999998e55Initial program 99.9%
fma-define99.9%
sub-neg99.9%
log1p-define99.9%
Simplified99.9%
Taylor expanded in a around 0 87.8%
Taylor expanded in t around inf 74.9%
mul-1-neg74.9%
distribute-lft-neg-out74.9%
*-commutative74.9%
Simplified74.9%
Final simplification77.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -145000000.0) (not (<= t 2e-30))) (* x (exp (* t (- y)))) (* x (pow z y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -145000000.0) || !(t <= 2e-30)) {
tmp = x * exp((t * -y));
} else {
tmp = x * pow(z, y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-145000000.0d0)) .or. (.not. (t <= 2d-30))) then
tmp = x * exp((t * -y))
else
tmp = x * (z ** y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -145000000.0) || !(t <= 2e-30)) {
tmp = x * Math.exp((t * -y));
} else {
tmp = x * Math.pow(z, y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -145000000.0) or not (t <= 2e-30): tmp = x * math.exp((t * -y)) else: tmp = x * math.pow(z, y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -145000000.0) || !(t <= 2e-30)) tmp = Float64(x * exp(Float64(t * Float64(-y)))); else tmp = Float64(x * (z ^ y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -145000000.0) || ~((t <= 2e-30))) tmp = x * exp((t * -y)); else tmp = x * (z ^ y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -145000000.0], N[Not[LessEqual[t, 2e-30]], $MachinePrecision]], N[(x * N[Exp[N[(t * (-y)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -145000000 \lor \neg \left(t \leq 2 \cdot 10^{-30}\right):\\
\;\;\;\;x \cdot e^{t \cdot \left(-y\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot {z}^{y}\\
\end{array}
\end{array}
if t < -1.45e8 or 2e-30 < t Initial program 97.8%
fma-define98.5%
sub-neg98.5%
log1p-define100.0%
Simplified100.0%
Taylor expanded in a around 0 73.5%
Taylor expanded in t around inf 73.4%
mul-1-neg73.4%
distribute-lft-neg-out73.4%
*-commutative73.4%
Simplified73.4%
if -1.45e8 < t < 2e-30Initial program 99.1%
fma-define99.1%
sub-neg99.1%
log1p-define99.9%
Simplified99.9%
Taylor expanded in a around 0 63.1%
Taylor expanded in t around 0 63.1%
Final simplification68.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.15e-15) (not (<= y 2.25e-20))) (* x (pow z y)) (* a (- (/ x a) (* x b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.15e-15) || !(y <= 2.25e-20)) {
tmp = x * pow(z, y);
} else {
tmp = a * ((x / a) - (x * 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 <= (-1.15d-15)) .or. (.not. (y <= 2.25d-20))) then
tmp = x * (z ** y)
else
tmp = a * ((x / a) - (x * 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 <= -1.15e-15) || !(y <= 2.25e-20)) {
tmp = x * Math.pow(z, y);
} else {
tmp = a * ((x / a) - (x * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.15e-15) or not (y <= 2.25e-20): tmp = x * math.pow(z, y) else: tmp = a * ((x / a) - (x * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.15e-15) || !(y <= 2.25e-20)) tmp = Float64(x * (z ^ y)); else tmp = Float64(a * Float64(Float64(x / a) - Float64(x * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.15e-15) || ~((y <= 2.25e-20))) tmp = x * (z ^ y); else tmp = a * ((x / a) - (x * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.15e-15], N[Not[LessEqual[y, 2.25e-20]], $MachinePrecision]], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], N[(a * N[(N[(x / a), $MachinePrecision] - N[(x * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.15 \cdot 10^{-15} \lor \neg \left(y \leq 2.25 \cdot 10^{-20}\right):\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(\frac{x}{a} - x \cdot b\right)\\
\end{array}
\end{array}
if y < -1.14999999999999995e-15 or 2.2500000000000001e-20 < y Initial program 99.1%
fma-define99.9%
sub-neg99.9%
log1p-define99.9%
Simplified99.9%
Taylor expanded in a around 0 87.5%
Taylor expanded in t around 0 65.5%
if -1.14999999999999995e-15 < y < 2.2500000000000001e-20Initial program 97.7%
fma-define97.7%
sub-neg97.7%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 79.9%
Taylor expanded in a around 0 41.7%
associate-*r*38.1%
sub-neg38.1%
mul-1-neg38.1%
log1p-define38.1%
mul-1-neg38.1%
Simplified38.1%
Taylor expanded in z around 0 41.7%
associate-*r*41.7%
mul-1-neg41.7%
*-commutative41.7%
Simplified41.7%
Taylor expanded in a around inf 46.0%
+-commutative46.0%
mul-1-neg46.0%
*-commutative46.0%
unsub-neg46.0%
Simplified46.0%
Final simplification55.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -1.55e+217)
(* t (- (/ x t) (* x y)))
(if (<= t -1.6e+27)
(* x (* a (- b)))
(if (<= t 1.35e+234)
(* a (- (/ x a) (* x b)))
(* y (- (/ x y) (* x t)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.55e+217) {
tmp = t * ((x / t) - (x * y));
} else if (t <= -1.6e+27) {
tmp = x * (a * -b);
} else if (t <= 1.35e+234) {
tmp = a * ((x / a) - (x * b));
} else {
tmp = y * ((x / y) - (x * t));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-1.55d+217)) then
tmp = t * ((x / t) - (x * y))
else if (t <= (-1.6d+27)) then
tmp = x * (a * -b)
else if (t <= 1.35d+234) then
tmp = a * ((x / a) - (x * b))
else
tmp = y * ((x / y) - (x * t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.55e+217) {
tmp = t * ((x / t) - (x * y));
} else if (t <= -1.6e+27) {
tmp = x * (a * -b);
} else if (t <= 1.35e+234) {
tmp = a * ((x / a) - (x * b));
} else {
tmp = y * ((x / y) - (x * t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.55e+217: tmp = t * ((x / t) - (x * y)) elif t <= -1.6e+27: tmp = x * (a * -b) elif t <= 1.35e+234: tmp = a * ((x / a) - (x * b)) else: tmp = y * ((x / y) - (x * t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.55e+217) tmp = Float64(t * Float64(Float64(x / t) - Float64(x * y))); elseif (t <= -1.6e+27) tmp = Float64(x * Float64(a * Float64(-b))); elseif (t <= 1.35e+234) tmp = Float64(a * Float64(Float64(x / a) - Float64(x * b))); else tmp = Float64(y * Float64(Float64(x / y) - Float64(x * t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -1.55e+217) tmp = t * ((x / t) - (x * y)); elseif (t <= -1.6e+27) tmp = x * (a * -b); elseif (t <= 1.35e+234) tmp = a * ((x / a) - (x * b)); else tmp = y * ((x / y) - (x * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.55e+217], N[(t * N[(N[(x / t), $MachinePrecision] - N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.6e+27], N[(x * N[(a * (-b)), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.35e+234], N[(a * N[(N[(x / a), $MachinePrecision] - N[(x * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(x / y), $MachinePrecision] - N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.55 \cdot 10^{+217}:\\
\;\;\;\;t \cdot \left(\frac{x}{t} - x \cdot y\right)\\
\mathbf{elif}\;t \leq -1.6 \cdot 10^{+27}:\\
\;\;\;\;x \cdot \left(a \cdot \left(-b\right)\right)\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{+234}:\\
\;\;\;\;a \cdot \left(\frac{x}{a} - x \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(\frac{x}{y} - x \cdot t\right)\\
\end{array}
\end{array}
if t < -1.5500000000000001e217Initial program 100.0%
fma-define100.0%
sub-neg100.0%
log1p-define100.0%
Simplified100.0%
Taylor expanded in a around 0 74.3%
Taylor expanded in t around inf 74.3%
mul-1-neg74.3%
distribute-lft-neg-out74.3%
*-commutative74.3%
Simplified74.3%
Taylor expanded in y around 0 43.5%
mul-1-neg43.5%
*-commutative43.5%
unsub-neg43.5%
*-commutative43.5%
Simplified43.5%
Taylor expanded in t around inf 48.5%
if -1.5500000000000001e217 < t < -1.60000000000000008e27Initial program 92.6%
fma-define95.1%
sub-neg95.1%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 49.5%
Taylor expanded in a around 0 11.0%
associate-*r*11.0%
sub-neg11.0%
mul-1-neg11.0%
log1p-define11.0%
mul-1-neg11.0%
Simplified11.0%
Taylor expanded in z around 0 11.0%
associate-*r*11.0%
mul-1-neg11.0%
*-commutative11.0%
Simplified11.0%
Taylor expanded in a around inf 25.1%
mul-1-neg25.1%
associate-*r*29.7%
*-commutative29.7%
distribute-rgt-neg-in29.7%
*-commutative29.7%
distribute-rgt-neg-in29.7%
Simplified29.7%
if -1.60000000000000008e27 < t < 1.3500000000000001e234Initial program 99.4%
fma-define99.4%
sub-neg99.4%
log1p-define99.9%
Simplified99.9%
Taylor expanded in y around 0 69.3%
Taylor expanded in a around 0 36.6%
associate-*r*32.8%
sub-neg32.8%
mul-1-neg32.8%
log1p-define32.9%
mul-1-neg32.9%
Simplified32.9%
Taylor expanded in z around 0 36.6%
associate-*r*36.6%
mul-1-neg36.6%
*-commutative36.6%
Simplified36.6%
Taylor expanded in a around inf 40.4%
+-commutative40.4%
mul-1-neg40.4%
*-commutative40.4%
unsub-neg40.4%
Simplified40.4%
if 1.3500000000000001e234 < t Initial program 100.0%
fma-define100.0%
sub-neg100.0%
log1p-define100.0%
Simplified100.0%
Taylor expanded in a around 0 90.6%
Taylor expanded in t around inf 90.6%
mul-1-neg90.6%
distribute-lft-neg-out90.6%
*-commutative90.6%
Simplified90.6%
Taylor expanded in y around 0 44.4%
mul-1-neg44.4%
*-commutative44.4%
unsub-neg44.4%
*-commutative44.4%
Simplified44.4%
Taylor expanded in y around inf 44.5%
Final simplification39.7%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -2.5e+219)
(* t (- (/ x t) (* x y)))
(if (<= t -5.5e+35)
(* x (* a (- b)))
(if (<= t 2.5e+236) (* a (- (/ x a) (* x b))) (* x (- 1.0 (* y t)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.5e+219) {
tmp = t * ((x / t) - (x * y));
} else if (t <= -5.5e+35) {
tmp = x * (a * -b);
} else if (t <= 2.5e+236) {
tmp = a * ((x / a) - (x * b));
} else {
tmp = x * (1.0 - (y * t));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-2.5d+219)) then
tmp = t * ((x / t) - (x * y))
else if (t <= (-5.5d+35)) then
tmp = x * (a * -b)
else if (t <= 2.5d+236) then
tmp = a * ((x / a) - (x * b))
else
tmp = x * (1.0d0 - (y * t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.5e+219) {
tmp = t * ((x / t) - (x * y));
} else if (t <= -5.5e+35) {
tmp = x * (a * -b);
} else if (t <= 2.5e+236) {
tmp = a * ((x / a) - (x * b));
} else {
tmp = x * (1.0 - (y * t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -2.5e+219: tmp = t * ((x / t) - (x * y)) elif t <= -5.5e+35: tmp = x * (a * -b) elif t <= 2.5e+236: tmp = a * ((x / a) - (x * b)) else: tmp = x * (1.0 - (y * t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -2.5e+219) tmp = Float64(t * Float64(Float64(x / t) - Float64(x * y))); elseif (t <= -5.5e+35) tmp = Float64(x * Float64(a * Float64(-b))); elseif (t <= 2.5e+236) tmp = Float64(a * Float64(Float64(x / a) - Float64(x * b))); else tmp = Float64(x * Float64(1.0 - Float64(y * t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -2.5e+219) tmp = t * ((x / t) - (x * y)); elseif (t <= -5.5e+35) tmp = x * (a * -b); elseif (t <= 2.5e+236) tmp = a * ((x / a) - (x * b)); else tmp = x * (1.0 - (y * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -2.5e+219], N[(t * N[(N[(x / t), $MachinePrecision] - N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5.5e+35], N[(x * N[(a * (-b)), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.5e+236], N[(a * N[(N[(x / a), $MachinePrecision] - N[(x * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.5 \cdot 10^{+219}:\\
\;\;\;\;t \cdot \left(\frac{x}{t} - x \cdot y\right)\\
\mathbf{elif}\;t \leq -5.5 \cdot 10^{+35}:\\
\;\;\;\;x \cdot \left(a \cdot \left(-b\right)\right)\\
\mathbf{elif}\;t \leq 2.5 \cdot 10^{+236}:\\
\;\;\;\;a \cdot \left(\frac{x}{a} - x \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\end{array}
\end{array}
if t < -2.5e219Initial program 100.0%
fma-define100.0%
sub-neg100.0%
log1p-define100.0%
Simplified100.0%
Taylor expanded in a around 0 74.3%
Taylor expanded in t around inf 74.3%
mul-1-neg74.3%
distribute-lft-neg-out74.3%
*-commutative74.3%
Simplified74.3%
Taylor expanded in y around 0 43.5%
mul-1-neg43.5%
*-commutative43.5%
unsub-neg43.5%
*-commutative43.5%
Simplified43.5%
Taylor expanded in t around inf 48.5%
if -2.5e219 < t < -5.50000000000000001e35Initial program 92.6%
fma-define95.1%
sub-neg95.1%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 49.5%
Taylor expanded in a around 0 11.0%
associate-*r*11.0%
sub-neg11.0%
mul-1-neg11.0%
log1p-define11.0%
mul-1-neg11.0%
Simplified11.0%
Taylor expanded in z around 0 11.0%
associate-*r*11.0%
mul-1-neg11.0%
*-commutative11.0%
Simplified11.0%
Taylor expanded in a around inf 25.1%
mul-1-neg25.1%
associate-*r*29.7%
*-commutative29.7%
distribute-rgt-neg-in29.7%
*-commutative29.7%
distribute-rgt-neg-in29.7%
Simplified29.7%
if -5.50000000000000001e35 < t < 2.49999999999999985e236Initial program 99.4%
fma-define99.4%
sub-neg99.4%
log1p-define99.9%
Simplified99.9%
Taylor expanded in y around 0 69.3%
Taylor expanded in a around 0 36.6%
associate-*r*32.8%
sub-neg32.8%
mul-1-neg32.8%
log1p-define32.9%
mul-1-neg32.9%
Simplified32.9%
Taylor expanded in z around 0 36.6%
associate-*r*36.6%
mul-1-neg36.6%
*-commutative36.6%
Simplified36.6%
Taylor expanded in a around inf 40.4%
+-commutative40.4%
mul-1-neg40.4%
*-commutative40.4%
unsub-neg40.4%
Simplified40.4%
if 2.49999999999999985e236 < t Initial program 100.0%
fma-define100.0%
sub-neg100.0%
log1p-define100.0%
Simplified100.0%
Taylor expanded in a around 0 90.6%
Taylor expanded in t around inf 90.6%
mul-1-neg90.6%
distribute-lft-neg-out90.6%
*-commutative90.6%
Simplified90.6%
Taylor expanded in y around 0 44.4%
mul-1-neg44.4%
*-commutative44.4%
unsub-neg44.4%
*-commutative44.4%
Simplified44.4%
Final simplification39.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -9.6e+222)
(* t (* x (- y)))
(if (<= t -5.2e+35)
(* x (* a (- b)))
(if (<= t 1.05e+234) (* a (- (/ x a) (* x b))) (* x (- 1.0 (* y t)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -9.6e+222) {
tmp = t * (x * -y);
} else if (t <= -5.2e+35) {
tmp = x * (a * -b);
} else if (t <= 1.05e+234) {
tmp = a * ((x / a) - (x * b));
} else {
tmp = x * (1.0 - (y * t));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-9.6d+222)) then
tmp = t * (x * -y)
else if (t <= (-5.2d+35)) then
tmp = x * (a * -b)
else if (t <= 1.05d+234) then
tmp = a * ((x / a) - (x * b))
else
tmp = x * (1.0d0 - (y * t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -9.6e+222) {
tmp = t * (x * -y);
} else if (t <= -5.2e+35) {
tmp = x * (a * -b);
} else if (t <= 1.05e+234) {
tmp = a * ((x / a) - (x * b));
} else {
tmp = x * (1.0 - (y * t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -9.6e+222: tmp = t * (x * -y) elif t <= -5.2e+35: tmp = x * (a * -b) elif t <= 1.05e+234: tmp = a * ((x / a) - (x * b)) else: tmp = x * (1.0 - (y * t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -9.6e+222) tmp = Float64(t * Float64(x * Float64(-y))); elseif (t <= -5.2e+35) tmp = Float64(x * Float64(a * Float64(-b))); elseif (t <= 1.05e+234) tmp = Float64(a * Float64(Float64(x / a) - Float64(x * b))); else tmp = Float64(x * Float64(1.0 - Float64(y * t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -9.6e+222) tmp = t * (x * -y); elseif (t <= -5.2e+35) tmp = x * (a * -b); elseif (t <= 1.05e+234) tmp = a * ((x / a) - (x * b)); else tmp = x * (1.0 - (y * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -9.6e+222], N[(t * N[(x * (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5.2e+35], N[(x * N[(a * (-b)), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.05e+234], N[(a * N[(N[(x / a), $MachinePrecision] - N[(x * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.6 \cdot 10^{+222}:\\
\;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\
\mathbf{elif}\;t \leq -5.2 \cdot 10^{+35}:\\
\;\;\;\;x \cdot \left(a \cdot \left(-b\right)\right)\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{+234}:\\
\;\;\;\;a \cdot \left(\frac{x}{a} - x \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\end{array}
\end{array}
if t < -9.6000000000000004e222Initial program 100.0%
fma-define100.0%
sub-neg100.0%
log1p-define100.0%
Simplified100.0%
Taylor expanded in a around 0 71.2%
Taylor expanded in t around inf 71.2%
mul-1-neg71.2%
distribute-lft-neg-out71.2%
*-commutative71.2%
Simplified71.2%
Taylor expanded in y around 0 42.6%
mul-1-neg42.6%
*-commutative42.6%
unsub-neg42.6%
*-commutative42.6%
Simplified42.6%
Taylor expanded in t around inf 48.3%
associate-*r*48.3%
mul-1-neg48.3%
Simplified48.3%
if -9.6000000000000004e222 < t < -5.20000000000000013e35Initial program 93.0%
fma-define95.4%
sub-neg95.4%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 49.5%
Taylor expanded in a around 0 12.9%
associate-*r*12.9%
sub-neg12.9%
mul-1-neg12.9%
log1p-define12.9%
mul-1-neg12.9%
Simplified12.9%
Taylor expanded in z around 0 12.9%
associate-*r*12.9%
mul-1-neg12.9%
*-commutative12.9%
Simplified12.9%
Taylor expanded in a around inf 24.0%
mul-1-neg24.0%
associate-*r*28.5%
*-commutative28.5%
distribute-rgt-neg-in28.5%
*-commutative28.5%
distribute-rgt-neg-in28.5%
Simplified28.5%
if -5.20000000000000013e35 < t < 1.05e234Initial program 99.4%
fma-define99.4%
sub-neg99.4%
log1p-define99.9%
Simplified99.9%
Taylor expanded in y around 0 69.3%
Taylor expanded in a around 0 36.6%
associate-*r*32.8%
sub-neg32.8%
mul-1-neg32.8%
log1p-define32.9%
mul-1-neg32.9%
Simplified32.9%
Taylor expanded in z around 0 36.6%
associate-*r*36.6%
mul-1-neg36.6%
*-commutative36.6%
Simplified36.6%
Taylor expanded in a around inf 40.4%
+-commutative40.4%
mul-1-neg40.4%
*-commutative40.4%
unsub-neg40.4%
Simplified40.4%
if 1.05e234 < t Initial program 100.0%
fma-define100.0%
sub-neg100.0%
log1p-define100.0%
Simplified100.0%
Taylor expanded in a around 0 90.6%
Taylor expanded in t around inf 90.6%
mul-1-neg90.6%
distribute-lft-neg-out90.6%
*-commutative90.6%
Simplified90.6%
Taylor expanded in y around 0 44.4%
mul-1-neg44.4%
*-commutative44.4%
unsub-neg44.4%
*-commutative44.4%
Simplified44.4%
Final simplification39.3%
(FPCore (x y z t a b) :precision binary64 (if (<= a -1.08e-7) (- x (* x (* a b))) (if (<= a 3.2e+31) (* x (- 1.0 (* y t))) (* a (* x (- b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.08e-7) {
tmp = x - (x * (a * b));
} else if (a <= 3.2e+31) {
tmp = x * (1.0 - (y * t));
} else {
tmp = a * (x * -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 (a <= (-1.08d-7)) then
tmp = x - (x * (a * b))
else if (a <= 3.2d+31) then
tmp = x * (1.0d0 - (y * t))
else
tmp = a * (x * -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 (a <= -1.08e-7) {
tmp = x - (x * (a * b));
} else if (a <= 3.2e+31) {
tmp = x * (1.0 - (y * t));
} else {
tmp = a * (x * -b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.08e-7: tmp = x - (x * (a * b)) elif a <= 3.2e+31: tmp = x * (1.0 - (y * t)) else: tmp = a * (x * -b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.08e-7) tmp = Float64(x - Float64(x * Float64(a * b))); elseif (a <= 3.2e+31) tmp = Float64(x * Float64(1.0 - Float64(y * t))); else tmp = Float64(a * Float64(x * Float64(-b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -1.08e-7) tmp = x - (x * (a * b)); elseif (a <= 3.2e+31) tmp = x * (1.0 - (y * t)); else tmp = a * (x * -b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.08e-7], N[(x - N[(x * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.2e+31], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.08 \cdot 10^{-7}:\\
\;\;\;\;x - x \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;a \leq 3.2 \cdot 10^{+31}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\end{array}
\end{array}
if a < -1.08000000000000001e-7Initial program 95.8%
fma-define97.2%
sub-neg97.2%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 78.0%
Taylor expanded in a around 0 26.2%
associate-*r*22.0%
sub-neg22.0%
mul-1-neg22.0%
log1p-define23.6%
mul-1-neg23.6%
Simplified23.6%
Taylor expanded in z around 0 26.2%
mul-1-neg26.2%
*-commutative26.2%
distribute-lft-neg-in26.2%
distribute-lft-neg-out26.2%
associate-*r*22.0%
*-commutative22.0%
associate-*l*30.1%
Simplified30.1%
if -1.08000000000000001e-7 < a < 3.2000000000000001e31Initial program 99.9%
fma-define99.9%
sub-neg99.9%
log1p-define99.9%
Simplified99.9%
Taylor expanded in a around 0 89.2%
Taylor expanded in t around inf 75.8%
mul-1-neg75.8%
distribute-lft-neg-out75.8%
*-commutative75.8%
Simplified75.8%
Taylor expanded in y around 0 40.1%
mul-1-neg40.1%
*-commutative40.1%
unsub-neg40.1%
*-commutative40.1%
Simplified40.1%
if 3.2000000000000001e31 < a Initial program 98.4%
fma-define98.4%
sub-neg98.4%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 74.0%
Taylor expanded in a around 0 28.7%
associate-*r*28.7%
sub-neg28.7%
mul-1-neg28.7%
log1p-define28.6%
mul-1-neg28.6%
Simplified28.6%
Taylor expanded in z around 0 28.7%
associate-*r*28.7%
mul-1-neg28.7%
*-commutative28.7%
Simplified28.7%
Taylor expanded in a around inf 36.6%
Final simplification36.5%
(FPCore (x y z t a b) :precision binary64 (if (<= a -8.8e-8) (- x (* a (* x b))) (if (<= a 3.2e+31) (* x (- 1.0 (* y t))) (* a (* x (- b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -8.8e-8) {
tmp = x - (a * (x * b));
} else if (a <= 3.2e+31) {
tmp = x * (1.0 - (y * t));
} else {
tmp = a * (x * -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 (a <= (-8.8d-8)) then
tmp = x - (a * (x * b))
else if (a <= 3.2d+31) then
tmp = x * (1.0d0 - (y * t))
else
tmp = a * (x * -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 (a <= -8.8e-8) {
tmp = x - (a * (x * b));
} else if (a <= 3.2e+31) {
tmp = x * (1.0 - (y * t));
} else {
tmp = a * (x * -b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -8.8e-8: tmp = x - (a * (x * b)) elif a <= 3.2e+31: tmp = x * (1.0 - (y * t)) else: tmp = a * (x * -b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -8.8e-8) tmp = Float64(x - Float64(a * Float64(x * b))); elseif (a <= 3.2e+31) tmp = Float64(x * Float64(1.0 - Float64(y * t))); else tmp = Float64(a * Float64(x * Float64(-b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -8.8e-8) tmp = x - (a * (x * b)); elseif (a <= 3.2e+31) tmp = x * (1.0 - (y * t)); else tmp = a * (x * -b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -8.8e-8], N[(x - N[(a * N[(x * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.2e+31], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.8 \cdot 10^{-8}:\\
\;\;\;\;x - a \cdot \left(x \cdot b\right)\\
\mathbf{elif}\;a \leq 3.2 \cdot 10^{+31}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\end{array}
\end{array}
if a < -8.7999999999999994e-8Initial program 95.8%
fma-define97.2%
sub-neg97.2%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 78.0%
Taylor expanded in z around 0 78.0%
associate-*r*78.0%
mul-1-neg78.0%
Simplified78.0%
Taylor expanded in a around 0 26.2%
associate-*r*26.2%
mul-1-neg26.2%
*-commutative26.2%
cancel-sign-sub-inv26.2%
Simplified26.2%
if -8.7999999999999994e-8 < a < 3.2000000000000001e31Initial program 99.9%
fma-define99.9%
sub-neg99.9%
log1p-define99.9%
Simplified99.9%
Taylor expanded in a around 0 89.2%
Taylor expanded in t around inf 75.8%
mul-1-neg75.8%
distribute-lft-neg-out75.8%
*-commutative75.8%
Simplified75.8%
Taylor expanded in y around 0 40.1%
mul-1-neg40.1%
*-commutative40.1%
unsub-neg40.1%
*-commutative40.1%
Simplified40.1%
if 3.2000000000000001e31 < a Initial program 98.4%
fma-define98.4%
sub-neg98.4%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 74.0%
Taylor expanded in a around 0 28.7%
associate-*r*28.7%
sub-neg28.7%
mul-1-neg28.7%
log1p-define28.6%
mul-1-neg28.6%
Simplified28.6%
Taylor expanded in z around 0 28.7%
associate-*r*28.7%
mul-1-neg28.7%
*-commutative28.7%
Simplified28.7%
Taylor expanded in a around inf 36.6%
Final simplification35.4%
(FPCore (x y z t a b) :precision binary64 (if (<= a -62000000.0) (* x (* a (- b))) (if (<= a 3.2e+31) (* x (- 1.0 (* y t))) (* a (* x (- b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -62000000.0) {
tmp = x * (a * -b);
} else if (a <= 3.2e+31) {
tmp = x * (1.0 - (y * t));
} else {
tmp = a * (x * -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 (a <= (-62000000.0d0)) then
tmp = x * (a * -b)
else if (a <= 3.2d+31) then
tmp = x * (1.0d0 - (y * t))
else
tmp = a * (x * -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 (a <= -62000000.0) {
tmp = x * (a * -b);
} else if (a <= 3.2e+31) {
tmp = x * (1.0 - (y * t));
} else {
tmp = a * (x * -b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -62000000.0: tmp = x * (a * -b) elif a <= 3.2e+31: tmp = x * (1.0 - (y * t)) else: tmp = a * (x * -b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -62000000.0) tmp = Float64(x * Float64(a * Float64(-b))); elseif (a <= 3.2e+31) tmp = Float64(x * Float64(1.0 - Float64(y * t))); else tmp = Float64(a * Float64(x * Float64(-b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -62000000.0) tmp = x * (a * -b); elseif (a <= 3.2e+31) tmp = x * (1.0 - (y * t)); else tmp = a * (x * -b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -62000000.0], N[(x * N[(a * (-b)), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.2e+31], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -62000000:\\
\;\;\;\;x \cdot \left(a \cdot \left(-b\right)\right)\\
\mathbf{elif}\;a \leq 3.2 \cdot 10^{+31}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\end{array}
\end{array}
if a < -6.2e7Initial program 95.8%
fma-define97.2%
sub-neg97.2%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 77.7%
Taylor expanded in a around 0 25.1%
associate-*r*20.9%
sub-neg20.9%
mul-1-neg20.9%
log1p-define22.5%
mul-1-neg22.5%
Simplified22.5%
Taylor expanded in z around 0 25.1%
associate-*r*25.1%
mul-1-neg25.1%
*-commutative25.1%
Simplified25.1%
Taylor expanded in a around inf 23.5%
mul-1-neg23.5%
associate-*r*24.8%
*-commutative24.8%
distribute-rgt-neg-in24.8%
*-commutative24.8%
distribute-rgt-neg-in24.8%
Simplified24.8%
if -6.2e7 < a < 3.2000000000000001e31Initial program 99.9%
fma-define99.9%
sub-neg99.9%
log1p-define99.9%
Simplified99.9%
Taylor expanded in a around 0 89.1%
Taylor expanded in t around inf 75.8%
mul-1-neg75.8%
distribute-lft-neg-out75.8%
*-commutative75.8%
Simplified75.8%
Taylor expanded in y around 0 40.4%
mul-1-neg40.4%
*-commutative40.4%
unsub-neg40.4%
*-commutative40.4%
Simplified40.4%
if 3.2000000000000001e31 < a Initial program 98.4%
fma-define98.4%
sub-neg98.4%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 74.0%
Taylor expanded in a around 0 28.7%
associate-*r*28.7%
sub-neg28.7%
mul-1-neg28.7%
log1p-define28.6%
mul-1-neg28.6%
Simplified28.6%
Taylor expanded in z around 0 28.7%
associate-*r*28.7%
mul-1-neg28.7%
*-commutative28.7%
Simplified28.7%
Taylor expanded in a around inf 36.6%
Final simplification35.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -2.4e+26) (not (<= a 3.2e+31))) (- (* x (* a b))) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -2.4e+26) || !(a <= 3.2e+31)) {
tmp = -(x * (a * b));
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-2.4d+26)) .or. (.not. (a <= 3.2d+31))) then
tmp = -(x * (a * b))
else
tmp = x
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 ((a <= -2.4e+26) || !(a <= 3.2e+31)) {
tmp = -(x * (a * b));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -2.4e+26) or not (a <= 3.2e+31): tmp = -(x * (a * b)) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -2.4e+26) || !(a <= 3.2e+31)) tmp = Float64(-Float64(x * Float64(a * b))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -2.4e+26) || ~((a <= 3.2e+31))) tmp = -(x * (a * b)); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -2.4e+26], N[Not[LessEqual[a, 3.2e+31]], $MachinePrecision]], (-N[(x * N[(a * b), $MachinePrecision]), $MachinePrecision]), x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.4 \cdot 10^{+26} \lor \neg \left(a \leq 3.2 \cdot 10^{+31}\right):\\
\;\;\;\;-x \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -2.40000000000000005e26 or 3.2000000000000001e31 < a Initial program 96.9%
fma-define97.7%
sub-neg97.7%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 77.6%
Taylor expanded in a around 0 27.6%
associate-*r*25.2%
sub-neg25.2%
mul-1-neg25.2%
log1p-define26.0%
mul-1-neg26.0%
Simplified26.0%
Taylor expanded in z around 0 27.6%
associate-*r*27.6%
mul-1-neg27.6%
*-commutative27.6%
Simplified27.6%
Taylor expanded in a around inf 30.4%
mul-1-neg30.4%
associate-*r*28.9%
*-commutative28.9%
distribute-rgt-neg-in28.9%
*-commutative28.9%
distribute-rgt-neg-in28.9%
Simplified28.9%
if -2.40000000000000005e26 < a < 3.2000000000000001e31Initial program 99.9%
fma-define99.9%
sub-neg99.9%
log1p-define99.9%
Simplified99.9%
Taylor expanded in a around 0 88.7%
Taylor expanded in y around 0 25.6%
Final simplification27.2%
(FPCore (x y z t a b) :precision binary64 (if (<= a -1.95e+28) (* x (* a (- b))) (if (<= a 3.2e+31) x (* a (* x (- b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.95e+28) {
tmp = x * (a * -b);
} else if (a <= 3.2e+31) {
tmp = x;
} else {
tmp = a * (x * -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 (a <= (-1.95d+28)) then
tmp = x * (a * -b)
else if (a <= 3.2d+31) then
tmp = x
else
tmp = a * (x * -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 (a <= -1.95e+28) {
tmp = x * (a * -b);
} else if (a <= 3.2e+31) {
tmp = x;
} else {
tmp = a * (x * -b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.95e+28: tmp = x * (a * -b) elif a <= 3.2e+31: tmp = x else: tmp = a * (x * -b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.95e+28) tmp = Float64(x * Float64(a * Float64(-b))); elseif (a <= 3.2e+31) tmp = x; else tmp = Float64(a * Float64(x * Float64(-b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -1.95e+28) tmp = x * (a * -b); elseif (a <= 3.2e+31) tmp = x; else tmp = a * (x * -b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.95e+28], N[(x * N[(a * (-b)), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.2e+31], x, N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.95 \cdot 10^{+28}:\\
\;\;\;\;x \cdot \left(a \cdot \left(-b\right)\right)\\
\mathbf{elif}\;a \leq 3.2 \cdot 10^{+31}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\end{array}
\end{array}
if a < -1.9499999999999999e28Initial program 95.5%
fma-define97.0%
sub-neg97.0%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 80.9%
Taylor expanded in a around 0 26.5%
associate-*r*22.0%
sub-neg22.0%
mul-1-neg22.0%
log1p-define23.7%
mul-1-neg23.7%
Simplified23.7%
Taylor expanded in z around 0 26.5%
associate-*r*26.5%
mul-1-neg26.5%
*-commutative26.5%
Simplified26.5%
Taylor expanded in a around inf 24.8%
mul-1-neg24.8%
associate-*r*26.1%
*-commutative26.1%
distribute-rgt-neg-in26.1%
*-commutative26.1%
distribute-rgt-neg-in26.1%
Simplified26.1%
if -1.9499999999999999e28 < a < 3.2000000000000001e31Initial program 99.9%
fma-define99.9%
sub-neg99.9%
log1p-define99.9%
Simplified99.9%
Taylor expanded in a around 0 88.7%
Taylor expanded in y around 0 25.6%
if 3.2000000000000001e31 < a Initial program 98.4%
fma-define98.4%
sub-neg98.4%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 74.0%
Taylor expanded in a around 0 28.7%
associate-*r*28.7%
sub-neg28.7%
mul-1-neg28.7%
log1p-define28.6%
mul-1-neg28.6%
Simplified28.6%
Taylor expanded in z around 0 28.7%
associate-*r*28.7%
mul-1-neg28.7%
*-commutative28.7%
Simplified28.7%
Taylor expanded in a around inf 36.6%
Final simplification28.3%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 98.4%
fma-define98.8%
sub-neg98.8%
log1p-define99.9%
Simplified99.9%
Taylor expanded in a around 0 68.5%
Taylor expanded in y around 0 16.2%
herbie shell --seed 2024141
(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))))))