
(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 17 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 a (- (log1p (- z)) b) (* y (- (log z) t))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(fma(a, (log1p(-z) - b), (y * (log(z) - t))));
}
function code(x, y, z, t, a, b) return Float64(x * exp(fma(a, Float64(log1p(Float64(-z)) - b), Float64(y * Float64(log(z) - t))))) end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(a * N[(N[Log[1 + (-z)], $MachinePrecision] - b), $MachinePrecision] + N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{\mathsf{fma}\left(a, \mathsf{log1p}\left(-z\right) - b, y \cdot \left(\log z - t\right)\right)}
\end{array}
Initial program 94.2%
+-commutative94.2%
fma-def94.6%
sub-neg94.6%
log1p-def99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y z t a b) :precision binary64 (if (<= a -5e+268) (* x (exp (* a (- (- b) z)))) (* 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) {
double tmp;
if (a <= -5e+268) {
tmp = x * exp((a * (-b - z)));
} else {
tmp = x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - 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 <= (-5d+268)) then
tmp = x * exp((a * (-b - z)))
else
tmp = x * exp(((y * (log(z) - t)) + (a * (log((1.0d0 - z)) - 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 <= -5e+268) {
tmp = x * Math.exp((a * (-b - z)));
} else {
tmp = x * Math.exp(((y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -5e+268: tmp = x * math.exp((a * (-b - z))) else: tmp = x * math.exp(((y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b)))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -5e+268) tmp = Float64(x * exp(Float64(a * Float64(Float64(-b) - z)))); else tmp = Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -5e+268) tmp = x * exp((a * (-b - z))); else tmp = x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -5e+268], N[(x * N[Exp[N[(a * N[((-b) - z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 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}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5 \cdot 10^{+268}:\\
\;\;\;\;x \cdot e^{a \cdot \left(\left(-b\right) - z\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}\\
\end{array}
\end{array}
if a < -5.0000000000000002e268Initial program 17.7%
Taylor expanded in y around 0 34.4%
sub-neg34.4%
neg-mul-134.4%
log1p-def100.0%
neg-mul-1100.0%
Simplified100.0%
Taylor expanded in z around 0 100.0%
associate-*r*100.0%
neg-mul-1100.0%
associate-*r*100.0%
neg-mul-1100.0%
distribute-lft-out100.0%
Simplified100.0%
if -5.0000000000000002e268 < a Initial program 96.0%
Final simplification96.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.45e+18) (not (<= y 4.5))) (* x (exp (* y (- (log z) t)))) (* x (exp (* a (- (- b) z))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.45e+18) || !(y <= 4.5)) {
tmp = x * exp((y * (log(z) - t)));
} else {
tmp = x * exp((a * (-b - z)));
}
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.45d+18)) .or. (.not. (y <= 4.5d0))) then
tmp = x * exp((y * (log(z) - t)))
else
tmp = x * exp((a * (-b - z)))
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.45e+18) || !(y <= 4.5)) {
tmp = x * Math.exp((y * (Math.log(z) - t)));
} else {
tmp = x * Math.exp((a * (-b - z)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.45e+18) or not (y <= 4.5): tmp = x * math.exp((y * (math.log(z) - t))) else: tmp = x * math.exp((a * (-b - z))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.45e+18) || !(y <= 4.5)) tmp = Float64(x * exp(Float64(y * Float64(log(z) - t)))); else tmp = Float64(x * exp(Float64(a * Float64(Float64(-b) - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.45e+18) || ~((y <= 4.5))) tmp = x * exp((y * (log(z) - t))); else tmp = x * exp((a * (-b - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.45e+18], N[Not[LessEqual[y, 4.5]], $MachinePrecision]], N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(a * N[((-b) - z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.45 \cdot 10^{+18} \lor \neg \left(y \leq 4.5\right):\\
\;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(\left(-b\right) - z\right)}\\
\end{array}
\end{array}
if y < -1.45e18 or 4.5 < y Initial program 95.7%
Taylor expanded in y around inf 87.3%
if -1.45e18 < y < 4.5Initial program 92.9%
Taylor expanded in y around 0 77.6%
sub-neg77.6%
neg-mul-177.6%
log1p-def86.1%
neg-mul-186.1%
Simplified86.1%
Taylor expanded in z around 0 86.1%
associate-*r*86.1%
neg-mul-186.1%
associate-*r*86.1%
neg-mul-186.1%
distribute-lft-out86.1%
Simplified86.1%
Final simplification86.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -1.9e+15) (not (<= a 1.1e-105))) (* x (exp (* a (- (- b) z)))) (* x (exp (* y (- t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.9e+15) || !(a <= 1.1e-105)) {
tmp = x * exp((a * (-b - z)));
} else {
tmp = x * exp((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 ((a <= (-1.9d+15)) .or. (.not. (a <= 1.1d-105))) then
tmp = x * exp((a * (-b - z)))
else
tmp = x * exp((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 ((a <= -1.9e+15) || !(a <= 1.1e-105)) {
tmp = x * Math.exp((a * (-b - z)));
} else {
tmp = x * Math.exp((y * -t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -1.9e+15) or not (a <= 1.1e-105): tmp = x * math.exp((a * (-b - z))) else: tmp = x * math.exp((y * -t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -1.9e+15) || !(a <= 1.1e-105)) tmp = Float64(x * exp(Float64(a * Float64(Float64(-b) - z)))); else tmp = Float64(x * exp(Float64(y * Float64(-t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -1.9e+15) || ~((a <= 1.1e-105))) tmp = x * exp((a * (-b - z))); else tmp = x * exp((y * -t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1.9e+15], N[Not[LessEqual[a, 1.1e-105]], $MachinePrecision]], N[(x * N[Exp[N[(a * N[((-b) - z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(y * (-t)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.9 \cdot 10^{+15} \lor \neg \left(a \leq 1.1 \cdot 10^{-105}\right):\\
\;\;\;\;x \cdot e^{a \cdot \left(\left(-b\right) - z\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{y \cdot \left(-t\right)}\\
\end{array}
\end{array}
if a < -1.9e15 or 1.10000000000000002e-105 < a Initial program 90.7%
Taylor expanded in y around 0 67.8%
sub-neg67.8%
neg-mul-167.8%
log1p-def79.9%
neg-mul-179.9%
Simplified79.9%
Taylor expanded in z around 0 79.9%
associate-*r*79.9%
neg-mul-179.9%
associate-*r*79.9%
neg-mul-179.9%
distribute-lft-out79.9%
Simplified79.9%
if -1.9e15 < a < 1.10000000000000002e-105Initial program 100.0%
Taylor expanded in t around inf 76.0%
mul-1-neg76.0%
distribute-lft-neg-out76.0%
*-commutative76.0%
Simplified76.0%
Final simplification78.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (pow z y))))
(if (<= y -4.5e+19)
t_1
(if (<= y 5.8e-304)
(* (* x (* z z)) (* a -0.5))
(if (<= y 3.05e-15) (- x (* (+ z b) (* x a))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * pow(z, y);
double tmp;
if (y <= -4.5e+19) {
tmp = t_1;
} else if (y <= 5.8e-304) {
tmp = (x * (z * z)) * (a * -0.5);
} else if (y <= 3.05e-15) {
tmp = x - ((z + b) * (x * a));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x * (z ** y)
if (y <= (-4.5d+19)) then
tmp = t_1
else if (y <= 5.8d-304) then
tmp = (x * (z * z)) * (a * (-0.5d0))
else if (y <= 3.05d-15) then
tmp = x - ((z + b) * (x * a))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * Math.pow(z, y);
double tmp;
if (y <= -4.5e+19) {
tmp = t_1;
} else if (y <= 5.8e-304) {
tmp = (x * (z * z)) * (a * -0.5);
} else if (y <= 3.05e-15) {
tmp = x - ((z + b) * (x * a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * math.pow(z, y) tmp = 0 if y <= -4.5e+19: tmp = t_1 elif y <= 5.8e-304: tmp = (x * (z * z)) * (a * -0.5) elif y <= 3.05e-15: tmp = x - ((z + b) * (x * a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * (z ^ y)) tmp = 0.0 if (y <= -4.5e+19) tmp = t_1; elseif (y <= 5.8e-304) tmp = Float64(Float64(x * Float64(z * z)) * Float64(a * -0.5)); elseif (y <= 3.05e-15) tmp = Float64(x - Float64(Float64(z + b) * Float64(x * a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * (z ^ y); tmp = 0.0; if (y <= -4.5e+19) tmp = t_1; elseif (y <= 5.8e-304) tmp = (x * (z * z)) * (a * -0.5); elseif (y <= 3.05e-15) tmp = x - ((z + b) * (x * a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.5e+19], t$95$1, If[LessEqual[y, 5.8e-304], N[(N[(x * N[(z * z), $MachinePrecision]), $MachinePrecision] * N[(a * -0.5), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.05e-15], N[(x - N[(N[(z + b), $MachinePrecision] * N[(x * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot {z}^{y}\\
\mathbf{if}\;y \leq -4.5 \cdot 10^{+19}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 5.8 \cdot 10^{-304}:\\
\;\;\;\;\left(x \cdot \left(z \cdot z\right)\right) \cdot \left(a \cdot -0.5\right)\\
\mathbf{elif}\;y \leq 3.05 \cdot 10^{-15}:\\
\;\;\;\;x - \left(z + b\right) \cdot \left(x \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -4.5e19 or 3.04999999999999986e-15 < y Initial program 95.8%
Taylor expanded in y around inf 85.7%
Taylor expanded in t around 0 68.0%
if -4.5e19 < y < 5.8e-304Initial program 94.3%
Taylor expanded in y around 0 71.9%
sub-neg71.9%
neg-mul-171.9%
log1p-def80.2%
neg-mul-180.2%
Simplified80.2%
Taylor expanded in a around 0 23.8%
+-commutative23.8%
associate-*r*22.5%
fma-def22.5%
sub-neg22.5%
log1p-def23.9%
Simplified23.9%
Taylor expanded in z around 0 23.8%
neg-mul-123.8%
associate-+r+23.8%
neg-mul-123.8%
distribute-lft-out23.8%
distribute-lft-in25.2%
*-commutative25.2%
distribute-lft-in25.2%
associate-+r+25.2%
Simplified23.9%
Taylor expanded in z around inf 37.6%
associate-*r*37.6%
*-commutative37.6%
unpow237.6%
*-commutative37.6%
Simplified37.6%
if 5.8e-304 < y < 3.04999999999999986e-15Initial program 91.2%
Taylor expanded in y around 0 81.7%
sub-neg81.7%
neg-mul-181.7%
log1p-def90.4%
neg-mul-190.4%
Simplified90.4%
Taylor expanded in z around 0 90.4%
associate-*r*90.4%
neg-mul-190.4%
associate-*r*90.4%
neg-mul-190.4%
distribute-lft-out90.4%
Simplified90.4%
Taylor expanded in a around 0 51.4%
mul-1-neg51.4%
unsub-neg51.4%
*-commutative51.4%
*-commutative51.4%
associate-*l*51.3%
*-commutative51.3%
Simplified51.3%
Final simplification55.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2e+24) (not (<= y 0.7))) (* x (pow z y)) (* x (exp (* a (- b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2e+24) || !(y <= 0.7)) {
tmp = x * pow(z, y);
} else {
tmp = x * exp((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 <= (-2d+24)) .or. (.not. (y <= 0.7d0))) then
tmp = x * (z ** y)
else
tmp = x * exp((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 <= -2e+24) || !(y <= 0.7)) {
tmp = x * Math.pow(z, y);
} else {
tmp = x * Math.exp((a * -b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2e+24) or not (y <= 0.7): tmp = x * math.pow(z, y) else: tmp = x * math.exp((a * -b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -2e+24) || !(y <= 0.7)) tmp = Float64(x * (z ^ y)); else tmp = Float64(x * exp(Float64(a * Float64(-b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -2e+24) || ~((y <= 0.7))) tmp = x * (z ^ y); else tmp = x * exp((a * -b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2e+24], N[Not[LessEqual[y, 0.7]], $MachinePrecision]], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(a * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{+24} \lor \neg \left(y \leq 0.7\right):\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\
\end{array}
\end{array}
if y < -2e24 or 0.69999999999999996 < y Initial program 95.6%
Taylor expanded in y around inf 86.9%
Taylor expanded in t around 0 69.5%
if -2e24 < y < 0.69999999999999996Initial program 93.0%
Taylor expanded in b around inf 74.7%
mul-1-neg74.7%
distribute-rgt-neg-out74.7%
Simplified74.7%
Final simplification72.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -9.4e+47) (not (<= t 1.45e-74))) (* x (exp (* y (- t)))) (* x (exp (* a (- b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -9.4e+47) || !(t <= 1.45e-74)) {
tmp = x * exp((y * -t));
} else {
tmp = x * exp((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 ((t <= (-9.4d+47)) .or. (.not. (t <= 1.45d-74))) then
tmp = x * exp((y * -t))
else
tmp = x * exp((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 ((t <= -9.4e+47) || !(t <= 1.45e-74)) {
tmp = x * Math.exp((y * -t));
} else {
tmp = x * Math.exp((a * -b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -9.4e+47) or not (t <= 1.45e-74): tmp = x * math.exp((y * -t)) else: tmp = x * math.exp((a * -b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -9.4e+47) || !(t <= 1.45e-74)) tmp = Float64(x * exp(Float64(y * Float64(-t)))); else tmp = Float64(x * exp(Float64(a * Float64(-b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -9.4e+47) || ~((t <= 1.45e-74))) tmp = x * exp((y * -t)); else tmp = x * exp((a * -b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -9.4e+47], N[Not[LessEqual[t, 1.45e-74]], $MachinePrecision]], N[(x * N[Exp[N[(y * (-t)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(a * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.4 \cdot 10^{+47} \lor \neg \left(t \leq 1.45 \cdot 10^{-74}\right):\\
\;\;\;\;x \cdot e^{y \cdot \left(-t\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\
\end{array}
\end{array}
if t < -9.39999999999999928e47 or 1.45e-74 < t Initial program 94.6%
Taylor expanded in t around inf 76.2%
mul-1-neg76.2%
distribute-lft-neg-out76.2%
*-commutative76.2%
Simplified76.2%
if -9.39999999999999928e47 < t < 1.45e-74Initial program 93.7%
Taylor expanded in b around inf 70.8%
mul-1-neg70.8%
distribute-rgt-neg-out70.8%
Simplified70.8%
Final simplification73.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (* x (- a)))))
(if (<= y -0.00036)
t_1
(if (<= y -4.6e-217)
x
(if (<= y 5.5e-304) (- (* x (* y t))) (if (<= y 5e+19) x t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (x * -a);
double tmp;
if (y <= -0.00036) {
tmp = t_1;
} else if (y <= -4.6e-217) {
tmp = x;
} else if (y <= 5.5e-304) {
tmp = -(x * (y * t));
} else if (y <= 5e+19) {
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) :: tmp
t_1 = b * (x * -a)
if (y <= (-0.00036d0)) then
tmp = t_1
else if (y <= (-4.6d-217)) then
tmp = x
else if (y <= 5.5d-304) then
tmp = -(x * (y * t))
else if (y <= 5d+19) 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 * (x * -a);
double tmp;
if (y <= -0.00036) {
tmp = t_1;
} else if (y <= -4.6e-217) {
tmp = x;
} else if (y <= 5.5e-304) {
tmp = -(x * (y * t));
} else if (y <= 5e+19) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (x * -a) tmp = 0 if y <= -0.00036: tmp = t_1 elif y <= -4.6e-217: tmp = x elif y <= 5.5e-304: tmp = -(x * (y * t)) elif y <= 5e+19: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(x * Float64(-a))) tmp = 0.0 if (y <= -0.00036) tmp = t_1; elseif (y <= -4.6e-217) tmp = x; elseif (y <= 5.5e-304) tmp = Float64(-Float64(x * Float64(y * t))); elseif (y <= 5e+19) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (x * -a); tmp = 0.0; if (y <= -0.00036) tmp = t_1; elseif (y <= -4.6e-217) tmp = x; elseif (y <= 5.5e-304) tmp = -(x * (y * t)); elseif (y <= 5e+19) 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[(x * (-a)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -0.00036], t$95$1, If[LessEqual[y, -4.6e-217], x, If[LessEqual[y, 5.5e-304], (-N[(x * N[(y * t), $MachinePrecision]), $MachinePrecision]), If[LessEqual[y, 5e+19], x, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(x \cdot \left(-a\right)\right)\\
\mathbf{if}\;y \leq -0.00036:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -4.6 \cdot 10^{-217}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{-304}:\\
\;\;\;\;-x \cdot \left(y \cdot t\right)\\
\mathbf{elif}\;y \leq 5 \cdot 10^{+19}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -3.60000000000000023e-4 or 5e19 < y Initial program 96.6%
Taylor expanded in b around inf 42.0%
mul-1-neg42.0%
distribute-rgt-neg-out42.0%
Simplified42.0%
Taylor expanded in a around 0 9.1%
mul-1-neg9.1%
unsub-neg9.1%
Simplified9.1%
Taylor expanded in a around inf 23.0%
neg-mul-123.0%
*-commutative23.0%
distribute-rgt-neg-in23.0%
Simplified23.0%
Taylor expanded in b around 0 23.0%
mul-1-neg23.0%
*-commutative23.0%
*-commutative23.0%
*-commutative23.0%
associate-*r*23.4%
distribute-rgt-neg-in23.4%
Simplified23.4%
if -3.60000000000000023e-4 < y < -4.6000000000000001e-217 or 5.50000000000000035e-304 < y < 5e19Initial program 92.2%
Taylor expanded in b around inf 73.0%
mul-1-neg73.0%
distribute-rgt-neg-out73.0%
Simplified73.0%
Taylor expanded in a around 0 33.5%
if -4.6000000000000001e-217 < y < 5.50000000000000035e-304Initial program 91.1%
Taylor expanded in t around inf 18.4%
mul-1-neg18.4%
distribute-lft-neg-out18.4%
*-commutative18.4%
Simplified18.4%
Taylor expanded in y around 0 5.1%
associate-*r*5.1%
mul-1-neg5.1%
*-commutative5.1%
Simplified5.1%
distribute-lft-neg-out5.1%
unsub-neg5.1%
add-sqr-sqrt2.9%
sqrt-unprod8.6%
sqr-neg8.6%
sqrt-unprod2.2%
add-sqr-sqrt5.1%
associate-*r*5.0%
add-sqr-sqrt2.2%
sqrt-unprod17.9%
sqr-neg17.9%
sqrt-unprod3.0%
add-sqr-sqrt5.1%
Applied egg-rr5.1%
Taylor expanded in t around inf 32.6%
*-commutative32.6%
associate-*r*34.0%
neg-mul-134.0%
distribute-rgt-neg-in34.0%
distribute-rgt-neg-in34.0%
Simplified34.0%
Final simplification28.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (* x (- a)))))
(if (<= a -6.8e-40)
t_1
(if (<= a 1.35e-291)
x
(if (<= a 9.5e-191) t_1 (if (<= a 5.1e+42) x (* y (* x (- t)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (x * -a);
double tmp;
if (a <= -6.8e-40) {
tmp = t_1;
} else if (a <= 1.35e-291) {
tmp = x;
} else if (a <= 9.5e-191) {
tmp = t_1;
} else if (a <= 5.1e+42) {
tmp = x;
} else {
tmp = 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) :: t_1
real(8) :: tmp
t_1 = b * (x * -a)
if (a <= (-6.8d-40)) then
tmp = t_1
else if (a <= 1.35d-291) then
tmp = x
else if (a <= 9.5d-191) then
tmp = t_1
else if (a <= 5.1d+42) then
tmp = x
else
tmp = 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 t_1 = b * (x * -a);
double tmp;
if (a <= -6.8e-40) {
tmp = t_1;
} else if (a <= 1.35e-291) {
tmp = x;
} else if (a <= 9.5e-191) {
tmp = t_1;
} else if (a <= 5.1e+42) {
tmp = x;
} else {
tmp = y * (x * -t);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (x * -a) tmp = 0 if a <= -6.8e-40: tmp = t_1 elif a <= 1.35e-291: tmp = x elif a <= 9.5e-191: tmp = t_1 elif a <= 5.1e+42: tmp = x else: tmp = y * (x * -t) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(x * Float64(-a))) tmp = 0.0 if (a <= -6.8e-40) tmp = t_1; elseif (a <= 1.35e-291) tmp = x; elseif (a <= 9.5e-191) tmp = t_1; elseif (a <= 5.1e+42) tmp = x; else tmp = Float64(y * Float64(x * Float64(-t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (x * -a); tmp = 0.0; if (a <= -6.8e-40) tmp = t_1; elseif (a <= 1.35e-291) tmp = x; elseif (a <= 9.5e-191) tmp = t_1; elseif (a <= 5.1e+42) tmp = x; else tmp = y * (x * -t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(x * (-a)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -6.8e-40], t$95$1, If[LessEqual[a, 1.35e-291], x, If[LessEqual[a, 9.5e-191], t$95$1, If[LessEqual[a, 5.1e+42], x, N[(y * N[(x * (-t)), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(x \cdot \left(-a\right)\right)\\
\mathbf{if}\;a \leq -6.8 \cdot 10^{-40}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 1.35 \cdot 10^{-291}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 9.5 \cdot 10^{-191}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 5.1 \cdot 10^{+42}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(x \cdot \left(-t\right)\right)\\
\end{array}
\end{array}
if a < -6.79999999999999968e-40 or 1.34999999999999996e-291 < a < 9.4999999999999996e-191Initial program 88.1%
Taylor expanded in b around inf 50.1%
mul-1-neg50.1%
distribute-rgt-neg-out50.1%
Simplified50.1%
Taylor expanded in a around 0 13.4%
mul-1-neg13.4%
unsub-neg13.4%
Simplified13.4%
Taylor expanded in a around inf 21.8%
neg-mul-121.8%
*-commutative21.8%
distribute-rgt-neg-in21.8%
Simplified21.8%
Taylor expanded in b around 0 21.8%
mul-1-neg21.8%
*-commutative21.8%
*-commutative21.8%
*-commutative21.8%
associate-*r*24.2%
distribute-rgt-neg-in24.2%
Simplified24.2%
if -6.79999999999999968e-40 < a < 1.34999999999999996e-291 or 9.4999999999999996e-191 < a < 5.0999999999999999e42Initial program 100.0%
Taylor expanded in b around inf 58.2%
mul-1-neg58.2%
distribute-rgt-neg-out58.2%
Simplified58.2%
Taylor expanded in a around 0 28.1%
if 5.0999999999999999e42 < a Initial program 91.9%
Taylor expanded in t around inf 39.3%
mul-1-neg39.3%
distribute-lft-neg-out39.3%
*-commutative39.3%
Simplified39.3%
Taylor expanded in y around 0 18.1%
associate-*r*18.1%
mul-1-neg18.1%
*-commutative18.1%
Simplified18.1%
distribute-lft-neg-out18.1%
unsub-neg18.1%
add-sqr-sqrt7.6%
sqrt-unprod13.1%
sqr-neg13.1%
sqrt-unprod5.9%
add-sqr-sqrt8.7%
associate-*r*8.7%
add-sqr-sqrt5.9%
sqrt-unprod13.2%
sqr-neg13.2%
sqrt-unprod7.6%
add-sqr-sqrt18.1%
Applied egg-rr18.1%
Taylor expanded in t around inf 26.1%
mul-1-neg26.1%
associate-*r*26.0%
*-commutative26.0%
*-commutative26.0%
distribute-rgt-neg-in26.0%
Simplified26.0%
Final simplification26.3%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -0.00042)
(* b (* x (- a)))
(if (<= y -8.5e-159)
x
(if (<= y 5.5e-304)
(* (- t) (* x y))
(if (<= y 34000000000.0) x (* a (* x (- b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -0.00042) {
tmp = b * (x * -a);
} else if (y <= -8.5e-159) {
tmp = x;
} else if (y <= 5.5e-304) {
tmp = -t * (x * y);
} else if (y <= 34000000000.0) {
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 (y <= (-0.00042d0)) then
tmp = b * (x * -a)
else if (y <= (-8.5d-159)) then
tmp = x
else if (y <= 5.5d-304) then
tmp = -t * (x * y)
else if (y <= 34000000000.0d0) 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 (y <= -0.00042) {
tmp = b * (x * -a);
} else if (y <= -8.5e-159) {
tmp = x;
} else if (y <= 5.5e-304) {
tmp = -t * (x * y);
} else if (y <= 34000000000.0) {
tmp = x;
} else {
tmp = a * (x * -b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -0.00042: tmp = b * (x * -a) elif y <= -8.5e-159: tmp = x elif y <= 5.5e-304: tmp = -t * (x * y) elif y <= 34000000000.0: tmp = x else: tmp = a * (x * -b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -0.00042) tmp = Float64(b * Float64(x * Float64(-a))); elseif (y <= -8.5e-159) tmp = x; elseif (y <= 5.5e-304) tmp = Float64(Float64(-t) * Float64(x * y)); elseif (y <= 34000000000.0) 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 (y <= -0.00042) tmp = b * (x * -a); elseif (y <= -8.5e-159) tmp = x; elseif (y <= 5.5e-304) tmp = -t * (x * y); elseif (y <= 34000000000.0) tmp = x; else tmp = a * (x * -b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -0.00042], N[(b * N[(x * (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -8.5e-159], x, If[LessEqual[y, 5.5e-304], N[((-t) * N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 34000000000.0], x, N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.00042:\\
\;\;\;\;b \cdot \left(x \cdot \left(-a\right)\right)\\
\mathbf{elif}\;y \leq -8.5 \cdot 10^{-159}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{-304}:\\
\;\;\;\;\left(-t\right) \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;y \leq 34000000000:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\end{array}
\end{array}
if y < -4.2000000000000002e-4Initial program 98.2%
Taylor expanded in b around inf 43.8%
mul-1-neg43.8%
distribute-rgt-neg-out43.8%
Simplified43.8%
Taylor expanded in a around 0 10.4%
mul-1-neg10.4%
unsub-neg10.4%
Simplified10.4%
Taylor expanded in a around inf 13.2%
neg-mul-113.2%
*-commutative13.2%
distribute-rgt-neg-in13.2%
Simplified13.2%
Taylor expanded in b around 0 13.2%
mul-1-neg13.2%
*-commutative13.2%
*-commutative13.2%
*-commutative13.2%
associate-*r*18.3%
distribute-rgt-neg-in18.3%
Simplified18.3%
if -4.2000000000000002e-4 < y < -8.4999999999999998e-159 or 5.50000000000000035e-304 < y < 3.4e10Initial program 93.0%
Taylor expanded in b around inf 76.5%
mul-1-neg76.5%
distribute-rgt-neg-out76.5%
Simplified76.5%
Taylor expanded in a around 0 35.0%
if -8.4999999999999998e-159 < y < 5.50000000000000035e-304Initial program 91.4%
Taylor expanded in t around inf 32.9%
mul-1-neg32.9%
distribute-lft-neg-out32.9%
*-commutative32.9%
Simplified32.9%
Taylor expanded in y around 0 13.2%
associate-*r*13.2%
mul-1-neg13.2%
*-commutative13.2%
Simplified13.2%
distribute-lft-neg-out13.2%
unsub-neg13.2%
add-sqr-sqrt5.1%
sqrt-unprod17.7%
sqr-neg17.7%
sqrt-unprod8.2%
add-sqr-sqrt13.3%
associate-*r*13.0%
add-sqr-sqrt8.0%
sqrt-unprod26.8%
sqr-neg26.8%
sqrt-unprod5.1%
add-sqr-sqrt12.9%
Applied egg-rr12.9%
Taylor expanded in t around inf 33.4%
if 3.4e10 < y Initial program 94.0%
Taylor expanded in b around inf 38.8%
mul-1-neg38.8%
distribute-rgt-neg-out38.8%
Simplified38.8%
Taylor expanded in a around 0 7.8%
mul-1-neg7.8%
unsub-neg7.8%
Simplified7.8%
Taylor expanded in a around inf 31.7%
neg-mul-131.7%
*-commutative31.7%
distribute-rgt-neg-in31.7%
Simplified31.7%
Final simplification30.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y 6e-304) (not (<= y 2.4e-62))) (* (* x (* z z)) (* a -0.5)) (- x (* a (* x b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= 6e-304) || !(y <= 2.4e-62)) {
tmp = (x * (z * z)) * (a * -0.5);
} else {
tmp = 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 <= 6d-304) .or. (.not. (y <= 2.4d-62))) then
tmp = (x * (z * z)) * (a * (-0.5d0))
else
tmp = 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 <= 6e-304) || !(y <= 2.4e-62)) {
tmp = (x * (z * z)) * (a * -0.5);
} else {
tmp = x - (a * (x * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= 6e-304) or not (y <= 2.4e-62): tmp = (x * (z * z)) * (a * -0.5) else: tmp = x - (a * (x * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= 6e-304) || !(y <= 2.4e-62)) tmp = Float64(Float64(x * Float64(z * z)) * Float64(a * -0.5)); else tmp = Float64(x - Float64(a * Float64(x * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= 6e-304) || ~((y <= 2.4e-62))) tmp = (x * (z * z)) * (a * -0.5); else tmp = x - (a * (x * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, 6e-304], N[Not[LessEqual[y, 2.4e-62]], $MachinePrecision]], N[(N[(x * N[(z * z), $MachinePrecision]), $MachinePrecision] * N[(a * -0.5), $MachinePrecision]), $MachinePrecision], N[(x - N[(a * N[(x * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 6 \cdot 10^{-304} \lor \neg \left(y \leq 2.4 \cdot 10^{-62}\right):\\
\;\;\;\;\left(x \cdot \left(z \cdot z\right)\right) \cdot \left(a \cdot -0.5\right)\\
\mathbf{else}:\\
\;\;\;\;x - a \cdot \left(x \cdot b\right)\\
\end{array}
\end{array}
if y < 6.0000000000000002e-304 or 2.39999999999999984e-62 < y Initial program 94.9%
Taylor expanded in y around 0 53.2%
sub-neg53.2%
neg-mul-153.2%
log1p-def60.5%
neg-mul-160.5%
Simplified60.5%
Taylor expanded in a around 0 15.2%
+-commutative15.2%
associate-*r*15.6%
fma-def15.6%
sub-neg15.6%
log1p-def17.2%
Simplified17.2%
Taylor expanded in z around 0 16.7%
neg-mul-116.7%
associate-+r+16.7%
neg-mul-116.7%
distribute-lft-out16.7%
distribute-lft-in17.2%
*-commutative17.2%
distribute-lft-in17.2%
associate-+r+17.2%
Simplified17.2%
Taylor expanded in z around inf 39.2%
associate-*r*39.2%
*-commutative39.2%
unpow239.2%
*-commutative39.2%
Simplified39.2%
if 6.0000000000000002e-304 < y < 2.39999999999999984e-62Initial program 91.6%
Taylor expanded in b around inf 83.4%
mul-1-neg83.4%
distribute-rgt-neg-out83.4%
Simplified83.4%
Taylor expanded in a around 0 51.5%
mul-1-neg51.5%
unsub-neg51.5%
Simplified51.5%
Final simplification42.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y 5.6e-304) (not (<= y 1.1e-49))) (* (* x (* z z)) (* a -0.5)) (- x (* (+ z b) (* x a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= 5.6e-304) || !(y <= 1.1e-49)) {
tmp = (x * (z * z)) * (a * -0.5);
} else {
tmp = x - ((z + b) * (x * a));
}
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 <= 5.6d-304) .or. (.not. (y <= 1.1d-49))) then
tmp = (x * (z * z)) * (a * (-0.5d0))
else
tmp = x - ((z + b) * (x * a))
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 <= 5.6e-304) || !(y <= 1.1e-49)) {
tmp = (x * (z * z)) * (a * -0.5);
} else {
tmp = x - ((z + b) * (x * a));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= 5.6e-304) or not (y <= 1.1e-49): tmp = (x * (z * z)) * (a * -0.5) else: tmp = x - ((z + b) * (x * a)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= 5.6e-304) || !(y <= 1.1e-49)) tmp = Float64(Float64(x * Float64(z * z)) * Float64(a * -0.5)); else tmp = Float64(x - Float64(Float64(z + b) * Float64(x * a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= 5.6e-304) || ~((y <= 1.1e-49))) tmp = (x * (z * z)) * (a * -0.5); else tmp = x - ((z + b) * (x * a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, 5.6e-304], N[Not[LessEqual[y, 1.1e-49]], $MachinePrecision]], N[(N[(x * N[(z * z), $MachinePrecision]), $MachinePrecision] * N[(a * -0.5), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(z + b), $MachinePrecision] * N[(x * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 5.6 \cdot 10^{-304} \lor \neg \left(y \leq 1.1 \cdot 10^{-49}\right):\\
\;\;\;\;\left(x \cdot \left(z \cdot z\right)\right) \cdot \left(a \cdot -0.5\right)\\
\mathbf{else}:\\
\;\;\;\;x - \left(z + b\right) \cdot \left(x \cdot a\right)\\
\end{array}
\end{array}
if y < 5.5999999999999997e-304 or 1.09999999999999995e-49 < y Initial program 94.9%
Taylor expanded in y around 0 53.1%
sub-neg53.1%
neg-mul-153.1%
log1p-def60.5%
neg-mul-160.5%
Simplified60.5%
Taylor expanded in a around 0 14.6%
+-commutative14.6%
associate-*r*15.1%
fma-def15.1%
sub-neg15.1%
log1p-def16.6%
Simplified16.6%
Taylor expanded in z around 0 16.0%
neg-mul-116.0%
associate-+r+16.0%
neg-mul-116.0%
distribute-lft-out16.0%
distribute-lft-in16.6%
*-commutative16.6%
distribute-lft-in16.6%
associate-+r+16.6%
Simplified16.6%
Taylor expanded in z around inf 39.2%
associate-*r*39.2%
*-commutative39.2%
unpow239.2%
*-commutative39.2%
Simplified39.2%
if 5.5999999999999997e-304 < y < 1.09999999999999995e-49Initial program 91.8%
Taylor expanded in y around 0 81.2%
sub-neg81.2%
neg-mul-181.2%
log1p-def89.4%
neg-mul-189.4%
Simplified89.4%
Taylor expanded in z around 0 89.4%
associate-*r*89.4%
neg-mul-189.4%
associate-*r*89.4%
neg-mul-189.4%
distribute-lft-out89.4%
Simplified89.4%
Taylor expanded in a around 0 53.9%
mul-1-neg53.9%
unsub-neg53.9%
*-commutative53.9%
*-commutative53.9%
associate-*l*53.8%
*-commutative53.8%
Simplified53.8%
Final simplification42.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -0.0019) (not (<= y 5e+19))) (* b (* x (- a))) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -0.0019) || !(y <= 5e+19)) {
tmp = b * (x * -a);
} 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 ((y <= (-0.0019d0)) .or. (.not. (y <= 5d+19))) then
tmp = b * (x * -a)
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 ((y <= -0.0019) || !(y <= 5e+19)) {
tmp = b * (x * -a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -0.0019) or not (y <= 5e+19): tmp = b * (x * -a) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -0.0019) || !(y <= 5e+19)) tmp = Float64(b * Float64(x * Float64(-a))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -0.0019) || ~((y <= 5e+19))) tmp = b * (x * -a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -0.0019], N[Not[LessEqual[y, 5e+19]], $MachinePrecision]], N[(b * N[(x * (-a)), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.0019 \lor \neg \left(y \leq 5 \cdot 10^{+19}\right):\\
\;\;\;\;b \cdot \left(x \cdot \left(-a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -0.0019 or 5e19 < y Initial program 96.6%
Taylor expanded in b around inf 42.0%
mul-1-neg42.0%
distribute-rgt-neg-out42.0%
Simplified42.0%
Taylor expanded in a around 0 9.1%
mul-1-neg9.1%
unsub-neg9.1%
Simplified9.1%
Taylor expanded in a around inf 23.0%
neg-mul-123.0%
*-commutative23.0%
distribute-rgt-neg-in23.0%
Simplified23.0%
Taylor expanded in b around 0 23.0%
mul-1-neg23.0%
*-commutative23.0%
*-commutative23.0%
*-commutative23.0%
associate-*r*23.4%
distribute-rgt-neg-in23.4%
Simplified23.4%
if -0.0019 < y < 5e19Initial program 92.0%
Taylor expanded in b around inf 73.0%
mul-1-neg73.0%
distribute-rgt-neg-out73.0%
Simplified73.0%
Taylor expanded in a around 0 29.0%
Final simplification26.4%
(FPCore (x y z t a b) :precision binary64 (if (<= x -2.2e-137) x (if (<= x 1.7e-94) (* a (* x (- b))) (- (* x (* y t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -2.2e-137) {
tmp = x;
} else if (x <= 1.7e-94) {
tmp = a * (x * -b);
} else {
tmp = -(x * (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 (x <= (-2.2d-137)) then
tmp = x
else if (x <= 1.7d-94) then
tmp = a * (x * -b)
else
tmp = -(x * (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 (x <= -2.2e-137) {
tmp = x;
} else if (x <= 1.7e-94) {
tmp = a * (x * -b);
} else {
tmp = -(x * (y * t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -2.2e-137: tmp = x elif x <= 1.7e-94: tmp = a * (x * -b) else: tmp = -(x * (y * t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -2.2e-137) tmp = x; elseif (x <= 1.7e-94) tmp = Float64(a * Float64(x * Float64(-b))); else tmp = Float64(-Float64(x * Float64(y * t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -2.2e-137) tmp = x; elseif (x <= 1.7e-94) tmp = a * (x * -b); else tmp = -(x * (y * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -2.2e-137], x, If[LessEqual[x, 1.7e-94], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision], (-N[(x * N[(y * t), $MachinePrecision]), $MachinePrecision])]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.2 \cdot 10^{-137}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 1.7 \cdot 10^{-94}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;-x \cdot \left(y \cdot t\right)\\
\end{array}
\end{array}
if x < -2.2000000000000001e-137Initial program 93.2%
Taylor expanded in b around inf 61.8%
mul-1-neg61.8%
distribute-rgt-neg-out61.8%
Simplified61.8%
Taylor expanded in a around 0 21.7%
if -2.2000000000000001e-137 < x < 1.6999999999999999e-94Initial program 97.6%
Taylor expanded in b around inf 56.1%
mul-1-neg56.1%
distribute-rgt-neg-out56.1%
Simplified56.1%
Taylor expanded in a around 0 17.8%
mul-1-neg17.8%
unsub-neg17.8%
Simplified17.8%
Taylor expanded in a around inf 33.4%
neg-mul-133.4%
*-commutative33.4%
distribute-rgt-neg-in33.4%
Simplified33.4%
if 1.6999999999999999e-94 < x Initial program 92.0%
Taylor expanded in t around inf 59.5%
mul-1-neg59.5%
distribute-lft-neg-out59.5%
*-commutative59.5%
Simplified59.5%
Taylor expanded in y around 0 25.6%
associate-*r*25.6%
mul-1-neg25.6%
*-commutative25.6%
Simplified25.6%
distribute-lft-neg-out25.6%
unsub-neg25.6%
add-sqr-sqrt8.5%
sqrt-unprod20.3%
sqr-neg20.3%
sqrt-unprod9.8%
add-sqr-sqrt13.5%
associate-*r*13.5%
add-sqr-sqrt9.8%
sqrt-unprod19.3%
sqr-neg19.3%
sqrt-unprod7.5%
add-sqr-sqrt23.4%
Applied egg-rr23.4%
Taylor expanded in t around inf 19.5%
*-commutative19.5%
associate-*r*18.8%
neg-mul-118.8%
distribute-rgt-neg-in18.8%
distribute-rgt-neg-in18.8%
Simplified18.8%
Final simplification24.4%
(FPCore (x y z t a b) :precision binary64 (if (<= y 34000000000.0) (* x (- 1.0 (* a b))) (* a (* x (- b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 34000000000.0) {
tmp = x * (1.0 - (a * b));
} 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 (y <= 34000000000.0d0) then
tmp = x * (1.0d0 - (a * b))
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 (y <= 34000000000.0) {
tmp = x * (1.0 - (a * b));
} else {
tmp = a * (x * -b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 34000000000.0: tmp = x * (1.0 - (a * b)) else: tmp = a * (x * -b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 34000000000.0) tmp = Float64(x * Float64(1.0 - Float64(a * b))); 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 (y <= 34000000000.0) tmp = x * (1.0 - (a * b)); else tmp = a * (x * -b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 34000000000.0], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 34000000000:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\end{array}
\end{array}
if y < 3.4e10Initial program 94.2%
Taylor expanded in b around inf 65.7%
mul-1-neg65.7%
distribute-rgt-neg-out65.7%
Simplified65.7%
Taylor expanded in a around 0 27.6%
mul-1-neg27.6%
unsub-neg27.6%
Simplified27.6%
Taylor expanded in x around 0 29.0%
if 3.4e10 < y Initial program 94.0%
Taylor expanded in b around inf 38.8%
mul-1-neg38.8%
distribute-rgt-neg-out38.8%
Simplified38.8%
Taylor expanded in a around 0 7.8%
mul-1-neg7.8%
unsub-neg7.8%
Simplified7.8%
Taylor expanded in a around inf 31.7%
neg-mul-131.7%
*-commutative31.7%
distribute-rgt-neg-in31.7%
Simplified31.7%
Final simplification29.7%
(FPCore (x y z t a b) :precision binary64 (if (<= y 35000000000.0) (- x (* x (* a b))) (* a (* x (- b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 35000000000.0) {
tmp = x - (x * (a * b));
} 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 (y <= 35000000000.0d0) then
tmp = x - (x * (a * b))
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 (y <= 35000000000.0) {
tmp = x - (x * (a * b));
} else {
tmp = a * (x * -b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 35000000000.0: tmp = x - (x * (a * b)) else: tmp = a * (x * -b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 35000000000.0) tmp = Float64(x - Float64(x * Float64(a * b))); 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 (y <= 35000000000.0) tmp = x - (x * (a * b)); else tmp = a * (x * -b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 35000000000.0], N[(x - N[(x * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 35000000000:\\
\;\;\;\;x - x \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\end{array}
\end{array}
if y < 3.5e10Initial program 94.2%
Taylor expanded in y around 0 67.2%
sub-neg67.2%
neg-mul-167.2%
log1p-def75.9%
neg-mul-175.9%
Simplified75.9%
Taylor expanded in a around 0 28.6%
+-commutative28.6%
associate-*r*29.0%
fma-def29.0%
sub-neg29.0%
log1p-def31.2%
Simplified31.2%
Taylor expanded in z around 0 30.2%
neg-mul-130.2%
associate-+r+30.2%
neg-mul-130.2%
distribute-lft-out30.2%
distribute-lft-in31.3%
*-commutative31.3%
distribute-lft-in31.3%
associate-+r+31.3%
Simplified31.2%
Taylor expanded in z around 0 27.6%
associate-*r*29.0%
*-commutative29.0%
Simplified29.0%
if 3.5e10 < y Initial program 94.0%
Taylor expanded in b around inf 38.8%
mul-1-neg38.8%
distribute-rgt-neg-out38.8%
Simplified38.8%
Taylor expanded in a around 0 7.8%
mul-1-neg7.8%
unsub-neg7.8%
Simplified7.8%
Taylor expanded in a around inf 31.7%
neg-mul-131.7%
*-commutative31.7%
distribute-rgt-neg-in31.7%
Simplified31.7%
Final simplification29.7%
(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 94.2%
Taylor expanded in b around inf 58.7%
mul-1-neg58.7%
distribute-rgt-neg-out58.7%
Simplified58.7%
Taylor expanded in a around 0 17.5%
Final simplification17.5%
herbie shell --seed 2023279
(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))))))