
(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 97.3%
fma-def97.7%
sub-neg97.7%
log1p-def100.0%
Simplified100.0%
Final simplification100.0%
(FPCore (x y z t a b) :precision binary64 (* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b))));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x * exp(((y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x * Math.exp(((y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b))));
}
def code(x, y, z, t, a, b): return x * math.exp(((y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b))))
function code(x, y, z, t, a, b) return Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))))) end
function tmp = code(x, y, z, t, a, b) tmp = x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b)))); end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}
\end{array}
Initial program 97.3%
Final simplification97.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -3.35e-12) (not (<= y 8.2e-91))) (* x (exp (* y (- (log z) t)))) (* x (exp (- (* a (- b)) (* z a))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.35e-12) || !(y <= 8.2e-91)) {
tmp = x * exp((y * (log(z) - t)));
} else {
tmp = x * exp(((a * -b) - (z * 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 <= (-3.35d-12)) .or. (.not. (y <= 8.2d-91))) then
tmp = x * exp((y * (log(z) - t)))
else
tmp = x * exp(((a * -b) - (z * 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 <= -3.35e-12) || !(y <= 8.2e-91)) {
tmp = x * Math.exp((y * (Math.log(z) - t)));
} else {
tmp = x * Math.exp(((a * -b) - (z * a)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -3.35e-12) or not (y <= 8.2e-91): tmp = x * math.exp((y * (math.log(z) - t))) else: tmp = x * math.exp(((a * -b) - (z * a))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -3.35e-12) || !(y <= 8.2e-91)) tmp = Float64(x * exp(Float64(y * Float64(log(z) - t)))); else tmp = Float64(x * exp(Float64(Float64(a * Float64(-b)) - Float64(z * a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -3.35e-12) || ~((y <= 8.2e-91))) tmp = x * exp((y * (log(z) - t))); else tmp = x * exp(((a * -b) - (z * a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -3.35e-12], N[Not[LessEqual[y, 8.2e-91]], $MachinePrecision]], N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(N[(a * (-b)), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.35 \cdot 10^{-12} \lor \neg \left(y \leq 8.2 \cdot 10^{-91}\right):\\
\;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right) - z \cdot a}\\
\end{array}
\end{array}
if y < -3.3500000000000001e-12 or 8.20000000000000048e-91 < y Initial program 97.3%
Taylor expanded in y around inf 86.6%
if -3.3500000000000001e-12 < y < 8.20000000000000048e-91Initial program 97.2%
Taylor expanded in y around 0 86.7%
sub-neg86.7%
neg-mul-186.7%
log1p-def89.4%
neg-mul-189.4%
Simplified89.4%
Taylor expanded in z around 0 89.4%
mul-1-neg89.4%
unsub-neg89.4%
mul-1-neg89.4%
distribute-rgt-neg-in89.4%
Simplified89.4%
Final simplification87.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (exp (- (* a (- b)) (* z a)))))
(t_2 (* x (exp (* t (- y))))))
(if (<= t -5e+44)
t_2
(if (<= t -3.7e-212)
t_1
(if (<= t 1.6e-293) (* x (pow z y)) (if (<= t 4.1e+31) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * exp(((a * -b) - (z * a)));
double t_2 = x * exp((t * -y));
double tmp;
if (t <= -5e+44) {
tmp = t_2;
} else if (t <= -3.7e-212) {
tmp = t_1;
} else if (t <= 1.6e-293) {
tmp = x * pow(z, y);
} else if (t <= 4.1e+31) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * exp(((a * -b) - (z * a)))
t_2 = x * exp((t * -y))
if (t <= (-5d+44)) then
tmp = t_2
else if (t <= (-3.7d-212)) then
tmp = t_1
else if (t <= 1.6d-293) then
tmp = x * (z ** y)
else if (t <= 4.1d+31) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * Math.exp(((a * -b) - (z * a)));
double t_2 = x * Math.exp((t * -y));
double tmp;
if (t <= -5e+44) {
tmp = t_2;
} else if (t <= -3.7e-212) {
tmp = t_1;
} else if (t <= 1.6e-293) {
tmp = x * Math.pow(z, y);
} else if (t <= 4.1e+31) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * math.exp(((a * -b) - (z * a))) t_2 = x * math.exp((t * -y)) tmp = 0 if t <= -5e+44: tmp = t_2 elif t <= -3.7e-212: tmp = t_1 elif t <= 1.6e-293: tmp = x * math.pow(z, y) elif t <= 4.1e+31: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * exp(Float64(Float64(a * Float64(-b)) - Float64(z * a)))) t_2 = Float64(x * exp(Float64(t * Float64(-y)))) tmp = 0.0 if (t <= -5e+44) tmp = t_2; elseif (t <= -3.7e-212) tmp = t_1; elseif (t <= 1.6e-293) tmp = Float64(x * (z ^ y)); elseif (t <= 4.1e+31) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * exp(((a * -b) - (z * a))); t_2 = x * exp((t * -y)); tmp = 0.0; if (t <= -5e+44) tmp = t_2; elseif (t <= -3.7e-212) tmp = t_1; elseif (t <= 1.6e-293) tmp = x * (z ^ y); elseif (t <= 4.1e+31) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Exp[N[(N[(a * (-b)), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[Exp[N[(t * (-y)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5e+44], t$95$2, If[LessEqual[t, -3.7e-212], t$95$1, If[LessEqual[t, 1.6e-293], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.1e+31], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot e^{a \cdot \left(-b\right) - z \cdot a}\\
t_2 := x \cdot e^{t \cdot \left(-y\right)}\\
\mathbf{if}\;t \leq -5 \cdot 10^{+44}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -3.7 \cdot 10^{-212}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{-293}:\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{elif}\;t \leq 4.1 \cdot 10^{+31}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -4.9999999999999996e44 or 4.1000000000000002e31 < t Initial program 97.3%
Taylor expanded in t around inf 84.3%
mul-1-neg84.3%
distribute-lft-neg-out84.3%
*-commutative84.3%
Simplified84.3%
if -4.9999999999999996e44 < t < -3.6999999999999999e-212 or 1.60000000000000003e-293 < t < 4.1000000000000002e31Initial program 97.3%
Taylor expanded in y around 0 76.2%
sub-neg76.2%
neg-mul-176.2%
log1p-def78.8%
neg-mul-178.8%
Simplified78.8%
Taylor expanded in z around 0 78.8%
mul-1-neg78.8%
unsub-neg78.8%
mul-1-neg78.8%
distribute-rgt-neg-in78.8%
Simplified78.8%
if -3.6999999999999999e-212 < t < 1.60000000000000003e-293Initial program 96.9%
Taylor expanded in y around inf 84.8%
Taylor expanded in t around 0 84.8%
Final simplification81.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (exp (* a (- b))))) (t_2 (* x (exp (* t (- y))))))
(if (<= t -5e+42)
t_2
(if (<= t -1.5e-213)
t_1
(if (<= t 4.8e-227) (* x (pow z y)) (if (<= t 6e+30) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * exp((a * -b));
double t_2 = x * exp((t * -y));
double tmp;
if (t <= -5e+42) {
tmp = t_2;
} else if (t <= -1.5e-213) {
tmp = t_1;
} else if (t <= 4.8e-227) {
tmp = x * pow(z, y);
} else if (t <= 6e+30) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * exp((a * -b))
t_2 = x * exp((t * -y))
if (t <= (-5d+42)) then
tmp = t_2
else if (t <= (-1.5d-213)) then
tmp = t_1
else if (t <= 4.8d-227) then
tmp = x * (z ** y)
else if (t <= 6d+30) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * Math.exp((a * -b));
double t_2 = x * Math.exp((t * -y));
double tmp;
if (t <= -5e+42) {
tmp = t_2;
} else if (t <= -1.5e-213) {
tmp = t_1;
} else if (t <= 4.8e-227) {
tmp = x * Math.pow(z, y);
} else if (t <= 6e+30) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * math.exp((a * -b)) t_2 = x * math.exp((t * -y)) tmp = 0 if t <= -5e+42: tmp = t_2 elif t <= -1.5e-213: tmp = t_1 elif t <= 4.8e-227: tmp = x * math.pow(z, y) elif t <= 6e+30: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * exp(Float64(a * Float64(-b)))) t_2 = Float64(x * exp(Float64(t * Float64(-y)))) tmp = 0.0 if (t <= -5e+42) tmp = t_2; elseif (t <= -1.5e-213) tmp = t_1; elseif (t <= 4.8e-227) tmp = Float64(x * (z ^ y)); elseif (t <= 6e+30) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * exp((a * -b)); t_2 = x * exp((t * -y)); tmp = 0.0; if (t <= -5e+42) tmp = t_2; elseif (t <= -1.5e-213) tmp = t_1; elseif (t <= 4.8e-227) tmp = x * (z ^ y); elseif (t <= 6e+30) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Exp[N[(a * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[Exp[N[(t * (-y)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5e+42], t$95$2, If[LessEqual[t, -1.5e-213], t$95$1, If[LessEqual[t, 4.8e-227], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6e+30], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot e^{a \cdot \left(-b\right)}\\
t_2 := x \cdot e^{t \cdot \left(-y\right)}\\
\mathbf{if}\;t \leq -5 \cdot 10^{+42}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1.5 \cdot 10^{-213}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4.8 \cdot 10^{-227}:\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{elif}\;t \leq 6 \cdot 10^{+30}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -5.00000000000000007e42 or 5.99999999999999956e30 < t Initial program 97.3%
Taylor expanded in t around inf 84.3%
mul-1-neg84.3%
distribute-lft-neg-out84.3%
*-commutative84.3%
Simplified84.3%
if -5.00000000000000007e42 < t < -1.49999999999999993e-213 or 4.7999999999999999e-227 < t < 5.99999999999999956e30Initial program 98.0%
Taylor expanded in b around inf 77.4%
mul-1-neg77.4%
distribute-rgt-neg-out77.4%
Simplified77.4%
if -1.49999999999999993e-213 < t < 4.7999999999999999e-227Initial program 95.4%
Taylor expanded in y around inf 77.5%
Taylor expanded in t around 0 77.5%
Final simplification80.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -5.2e+76) (not (<= y 0.000235))) (* 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 <= -5.2e+76) || !(y <= 0.000235)) {
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 <= (-5.2d+76)) .or. (.not. (y <= 0.000235d0))) 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 <= -5.2e+76) || !(y <= 0.000235)) {
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 <= -5.2e+76) or not (y <= 0.000235): 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 <= -5.2e+76) || !(y <= 0.000235)) 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 <= -5.2e+76) || ~((y <= 0.000235))) 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, -5.2e+76], N[Not[LessEqual[y, 0.000235]], $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 -5.2 \cdot 10^{+76} \lor \neg \left(y \leq 0.000235\right):\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\
\end{array}
\end{array}
if y < -5.1999999999999999e76 or 2.34999999999999993e-4 < y Initial program 98.1%
Taylor expanded in y around inf 90.4%
Taylor expanded in t around 0 71.3%
if -5.1999999999999999e76 < y < 2.34999999999999993e-4Initial program 96.7%
Taylor expanded in b around inf 76.4%
mul-1-neg76.4%
distribute-rgt-neg-out76.4%
Simplified76.4%
Final simplification74.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -6e-26) (not (<= y 8.8e-38))) (* x (pow z y)) (/ x (exp (* z a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -6e-26) || !(y <= 8.8e-38)) {
tmp = x * pow(z, y);
} else {
tmp = x / exp((z * 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 <= (-6d-26)) .or. (.not. (y <= 8.8d-38))) then
tmp = x * (z ** y)
else
tmp = x / exp((z * 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 <= -6e-26) || !(y <= 8.8e-38)) {
tmp = x * Math.pow(z, y);
} else {
tmp = x / Math.exp((z * a));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -6e-26) or not (y <= 8.8e-38): tmp = x * math.pow(z, y) else: tmp = x / math.exp((z * a)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -6e-26) || !(y <= 8.8e-38)) tmp = Float64(x * (z ^ y)); else tmp = Float64(x / exp(Float64(z * a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -6e-26) || ~((y <= 8.8e-38))) tmp = x * (z ^ y); else tmp = x / exp((z * a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -6e-26], N[Not[LessEqual[y, 8.8e-38]], $MachinePrecision]], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], N[(x / N[Exp[N[(z * a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6 \cdot 10^{-26} \lor \neg \left(y \leq 8.8 \cdot 10^{-38}\right):\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{e^{z \cdot a}}\\
\end{array}
\end{array}
if y < -6.00000000000000023e-26 or 8.80000000000000029e-38 < y Initial program 97.8%
Taylor expanded in y around inf 87.1%
Taylor expanded in t around 0 63.6%
if -6.00000000000000023e-26 < y < 8.80000000000000029e-38Initial program 96.6%
Taylor expanded in y around 0 81.3%
sub-neg81.3%
neg-mul-181.3%
log1p-def84.5%
neg-mul-184.5%
Simplified84.5%
Taylor expanded in z around 0 84.5%
mul-1-neg84.5%
unsub-neg84.5%
mul-1-neg84.5%
distribute-rgt-neg-in84.5%
Simplified84.5%
Taylor expanded in b around 0 49.1%
exp-neg49.1%
exp-prod57.6%
associate-*r/57.6%
*-rgt-identity57.6%
exp-prod49.1%
Simplified49.1%
Final simplification56.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -6.1e-56) (not (<= y 3.2e-15))) (* x (pow z y)) (* x (- 1.0 (* a (+ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -6.1e-56) || !(y <= 3.2e-15)) {
tmp = x * pow(z, y);
} else {
tmp = x * (1.0 - (a * (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 ((y <= (-6.1d-56)) .or. (.not. (y <= 3.2d-15))) then
tmp = x * (z ** y)
else
tmp = x * (1.0d0 - (a * (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 ((y <= -6.1e-56) || !(y <= 3.2e-15)) {
tmp = x * Math.pow(z, y);
} else {
tmp = x * (1.0 - (a * (z + b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -6.1e-56) or not (y <= 3.2e-15): tmp = x * math.pow(z, y) else: tmp = x * (1.0 - (a * (z + b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -6.1e-56) || !(y <= 3.2e-15)) tmp = Float64(x * (z ^ y)); else tmp = Float64(x * Float64(1.0 - Float64(a * Float64(z + b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -6.1e-56) || ~((y <= 3.2e-15))) tmp = x * (z ^ y); else tmp = x * (1.0 - (a * (z + b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -6.1e-56], N[Not[LessEqual[y, 3.2e-15]], $MachinePrecision]], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(a * N[(z + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.1 \cdot 10^{-56} \lor \neg \left(y \leq 3.2 \cdot 10^{-15}\right):\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - a \cdot \left(z + b\right)\right)\\
\end{array}
\end{array}
if y < -6.0999999999999998e-56 or 3.1999999999999999e-15 < y Initial program 97.8%
Taylor expanded in y around inf 86.3%
Taylor expanded in t around 0 63.4%
if -6.0999999999999998e-56 < y < 3.1999999999999999e-15Initial program 96.6%
Taylor expanded in y around 0 80.7%
sub-neg80.7%
neg-mul-180.7%
log1p-def83.9%
neg-mul-183.9%
Simplified83.9%
Taylor expanded in z around 0 83.9%
mul-1-neg83.9%
unsub-neg83.9%
mul-1-neg83.9%
distribute-rgt-neg-in83.9%
Simplified83.9%
Taylor expanded in a around 0 42.2%
mul-1-neg42.2%
Simplified42.2%
Final simplification53.5%
(FPCore (x y z t a b) :precision binary64 (if (<= t -5.2e+71) (* x (- 1.0 (* y t))) (if (<= t 1.1e+82) (* x (- 1.0 (* a (+ z b)))) (* t (* x (- y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -5.2e+71) {
tmp = x * (1.0 - (y * t));
} else if (t <= 1.1e+82) {
tmp = x * (1.0 - (a * (z + b)));
} else {
tmp = t * (x * -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 <= (-5.2d+71)) then
tmp = x * (1.0d0 - (y * t))
else if (t <= 1.1d+82) then
tmp = x * (1.0d0 - (a * (z + b)))
else
tmp = t * (x * -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 <= -5.2e+71) {
tmp = x * (1.0 - (y * t));
} else if (t <= 1.1e+82) {
tmp = x * (1.0 - (a * (z + b)));
} else {
tmp = t * (x * -y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -5.2e+71: tmp = x * (1.0 - (y * t)) elif t <= 1.1e+82: tmp = x * (1.0 - (a * (z + b))) else: tmp = t * (x * -y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -5.2e+71) tmp = Float64(x * Float64(1.0 - Float64(y * t))); elseif (t <= 1.1e+82) tmp = Float64(x * Float64(1.0 - Float64(a * Float64(z + b)))); else tmp = Float64(t * Float64(x * Float64(-y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -5.2e+71) tmp = x * (1.0 - (y * t)); elseif (t <= 1.1e+82) tmp = x * (1.0 - (a * (z + b))); else tmp = t * (x * -y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -5.2e+71], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.1e+82], N[(x * N[(1.0 - N[(a * N[(z + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(x * (-y)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.2 \cdot 10^{+71}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{+82}:\\
\;\;\;\;x \cdot \left(1 - a \cdot \left(z + b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\
\end{array}
\end{array}
if t < -5.19999999999999983e71Initial program 98.2%
Taylor expanded in t around inf 86.0%
mul-1-neg86.0%
distribute-lft-neg-out86.0%
*-commutative86.0%
Simplified86.0%
Taylor expanded in y around 0 25.7%
mul-1-neg25.7%
unsub-neg25.7%
*-commutative25.7%
Simplified25.7%
Taylor expanded in x around 0 30.6%
if -5.19999999999999983e71 < t < 1.1000000000000001e82Initial program 97.4%
Taylor expanded in y around 0 68.6%
sub-neg68.6%
neg-mul-168.6%
log1p-def71.1%
neg-mul-171.1%
Simplified71.1%
Taylor expanded in z around 0 71.1%
mul-1-neg71.1%
unsub-neg71.1%
mul-1-neg71.1%
distribute-rgt-neg-in71.1%
Simplified71.1%
Taylor expanded in a around 0 35.7%
mul-1-neg35.7%
Simplified35.7%
if 1.1000000000000001e82 < t Initial program 95.6%
Taylor expanded in t around inf 80.5%
mul-1-neg80.5%
distribute-lft-neg-out80.5%
*-commutative80.5%
Simplified80.5%
Taylor expanded in y around 0 24.7%
mul-1-neg24.7%
unsub-neg24.7%
*-commutative24.7%
Simplified24.7%
Taylor expanded in t around inf 30.6%
mul-1-neg30.6%
distribute-rgt-neg-out30.6%
distribute-rgt-neg-in30.6%
Simplified30.6%
Final simplification33.7%
(FPCore (x y z t a b) :precision binary64 (if (<= t -2.3e+141) (* x (* t (- y))) (if (<= t 1.1e+82) (* x (- 1.0 (* a b))) (* t (* x (- y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.3e+141) {
tmp = x * (t * -y);
} else if (t <= 1.1e+82) {
tmp = x * (1.0 - (a * b));
} else {
tmp = t * (x * -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 <= (-2.3d+141)) then
tmp = x * (t * -y)
else if (t <= 1.1d+82) then
tmp = x * (1.0d0 - (a * b))
else
tmp = t * (x * -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 <= -2.3e+141) {
tmp = x * (t * -y);
} else if (t <= 1.1e+82) {
tmp = x * (1.0 - (a * b));
} else {
tmp = t * (x * -y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -2.3e+141: tmp = x * (t * -y) elif t <= 1.1e+82: tmp = x * (1.0 - (a * b)) else: tmp = t * (x * -y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -2.3e+141) tmp = Float64(x * Float64(t * Float64(-y))); elseif (t <= 1.1e+82) tmp = Float64(x * Float64(1.0 - Float64(a * b))); else tmp = Float64(t * Float64(x * Float64(-y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -2.3e+141) tmp = x * (t * -y); elseif (t <= 1.1e+82) tmp = x * (1.0 - (a * b)); else tmp = t * (x * -y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -2.3e+141], N[(x * N[(t * (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.1e+82], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(x * (-y)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.3 \cdot 10^{+141}:\\
\;\;\;\;x \cdot \left(t \cdot \left(-y\right)\right)\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{+82}:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\
\end{array}
\end{array}
if t < -2.3000000000000002e141Initial program 97.8%
Taylor expanded in t around inf 87.0%
mul-1-neg87.0%
distribute-lft-neg-out87.0%
*-commutative87.0%
Simplified87.0%
Taylor expanded in y around 0 20.4%
mul-1-neg20.4%
unsub-neg20.4%
*-commutative20.4%
Simplified20.4%
Taylor expanded in t around inf 20.0%
mul-1-neg20.0%
distribute-rgt-neg-out20.0%
distribute-rgt-neg-in20.0%
Simplified20.0%
Taylor expanded in t around 0 20.0%
mul-1-neg20.0%
*-commutative20.0%
associate-*r*22.0%
distribute-lft-neg-in22.0%
Simplified22.0%
if -2.3000000000000002e141 < t < 1.1000000000000001e82Initial program 97.6%
Taylor expanded in b around inf 67.8%
mul-1-neg67.8%
distribute-rgt-neg-out67.8%
Simplified67.8%
Taylor expanded in a around 0 35.2%
mul-1-neg35.2%
unsub-neg35.2%
Simplified35.2%
if 1.1000000000000001e82 < t Initial program 95.6%
Taylor expanded in t around inf 80.5%
mul-1-neg80.5%
distribute-lft-neg-out80.5%
*-commutative80.5%
Simplified80.5%
Taylor expanded in y around 0 24.7%
mul-1-neg24.7%
unsub-neg24.7%
*-commutative24.7%
Simplified24.7%
Taylor expanded in t around inf 30.6%
mul-1-neg30.6%
distribute-rgt-neg-out30.6%
distribute-rgt-neg-in30.6%
Simplified30.6%
Final simplification32.1%
(FPCore (x y z t a b) :precision binary64 (if (<= t -7.5e+69) (* x (- 1.0 (* y t))) (if (<= t 2e+81) (* x (- 1.0 (* a b))) (* t (* x (- y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -7.5e+69) {
tmp = x * (1.0 - (y * t));
} else if (t <= 2e+81) {
tmp = x * (1.0 - (a * b));
} else {
tmp = t * (x * -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 <= (-7.5d+69)) then
tmp = x * (1.0d0 - (y * t))
else if (t <= 2d+81) then
tmp = x * (1.0d0 - (a * b))
else
tmp = t * (x * -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 <= -7.5e+69) {
tmp = x * (1.0 - (y * t));
} else if (t <= 2e+81) {
tmp = x * (1.0 - (a * b));
} else {
tmp = t * (x * -y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -7.5e+69: tmp = x * (1.0 - (y * t)) elif t <= 2e+81: tmp = x * (1.0 - (a * b)) else: tmp = t * (x * -y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -7.5e+69) tmp = Float64(x * Float64(1.0 - Float64(y * t))); elseif (t <= 2e+81) tmp = Float64(x * Float64(1.0 - Float64(a * b))); else tmp = Float64(t * Float64(x * Float64(-y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -7.5e+69) tmp = x * (1.0 - (y * t)); elseif (t <= 2e+81) tmp = x * (1.0 - (a * b)); else tmp = t * (x * -y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -7.5e+69], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2e+81], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(x * (-y)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.5 \cdot 10^{+69}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\mathbf{elif}\;t \leq 2 \cdot 10^{+81}:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\
\end{array}
\end{array}
if t < -7.49999999999999939e69Initial program 98.2%
Taylor expanded in t around inf 86.0%
mul-1-neg86.0%
distribute-lft-neg-out86.0%
*-commutative86.0%
Simplified86.0%
Taylor expanded in y around 0 25.7%
mul-1-neg25.7%
unsub-neg25.7%
*-commutative25.7%
Simplified25.7%
Taylor expanded in x around 0 30.6%
if -7.49999999999999939e69 < t < 1.99999999999999984e81Initial program 97.4%
Taylor expanded in b around inf 68.0%
mul-1-neg68.0%
distribute-rgt-neg-out68.0%
Simplified68.0%
Taylor expanded in a around 0 35.6%
mul-1-neg35.6%
unsub-neg35.6%
Simplified35.6%
if 1.99999999999999984e81 < t Initial program 95.6%
Taylor expanded in t around inf 80.5%
mul-1-neg80.5%
distribute-lft-neg-out80.5%
*-commutative80.5%
Simplified80.5%
Taylor expanded in y around 0 24.7%
mul-1-neg24.7%
unsub-neg24.7%
*-commutative24.7%
Simplified24.7%
Taylor expanded in t around inf 30.6%
mul-1-neg30.6%
distribute-rgt-neg-out30.6%
distribute-rgt-neg-in30.6%
Simplified30.6%
Final simplification33.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -6e+140) (not (<= t 9.4e+80))) (* t (* x (- y))) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -6e+140) || !(t <= 9.4e+80)) {
tmp = t * (x * -y);
} 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 ((t <= (-6d+140)) .or. (.not. (t <= 9.4d+80))) then
tmp = t * (x * -y)
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 ((t <= -6e+140) || !(t <= 9.4e+80)) {
tmp = t * (x * -y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -6e+140) or not (t <= 9.4e+80): tmp = t * (x * -y) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -6e+140) || !(t <= 9.4e+80)) tmp = Float64(t * Float64(x * Float64(-y))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -6e+140) || ~((t <= 9.4e+80))) tmp = t * (x * -y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -6e+140], N[Not[LessEqual[t, 9.4e+80]], $MachinePrecision]], N[(t * N[(x * (-y)), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6 \cdot 10^{+140} \lor \neg \left(t \leq 9.4 \cdot 10^{+80}\right):\\
\;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -5.99999999999999993e140 or 9.40000000000000019e80 < t Initial program 96.7%
Taylor expanded in t around inf 83.8%
mul-1-neg83.8%
distribute-lft-neg-out83.8%
*-commutative83.8%
Simplified83.8%
Taylor expanded in y around 0 22.5%
mul-1-neg22.5%
unsub-neg22.5%
*-commutative22.5%
Simplified22.5%
Taylor expanded in t around inf 25.3%
mul-1-neg25.3%
distribute-rgt-neg-out25.3%
distribute-rgt-neg-in25.3%
Simplified25.3%
if -5.99999999999999993e140 < t < 9.40000000000000019e80Initial program 97.6%
Taylor expanded in t around inf 41.3%
mul-1-neg41.3%
distribute-lft-neg-out41.3%
*-commutative41.3%
Simplified41.3%
Taylor expanded in y around 0 24.1%
Final simplification24.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -5.8e-15) (not (<= y 0.0042))) (* x (* t (- y))) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -5.8e-15) || !(y <= 0.0042)) {
tmp = x * (t * -y);
} 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 <= (-5.8d-15)) .or. (.not. (y <= 0.0042d0))) then
tmp = x * (t * -y)
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 <= -5.8e-15) || !(y <= 0.0042)) {
tmp = x * (t * -y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -5.8e-15) or not (y <= 0.0042): tmp = x * (t * -y) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -5.8e-15) || !(y <= 0.0042)) tmp = Float64(x * Float64(t * Float64(-y))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -5.8e-15) || ~((y <= 0.0042))) tmp = x * (t * -y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -5.8e-15], N[Not[LessEqual[y, 0.0042]], $MachinePrecision]], N[(x * N[(t * (-y)), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.8 \cdot 10^{-15} \lor \neg \left(y \leq 0.0042\right):\\
\;\;\;\;x \cdot \left(t \cdot \left(-y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -5.80000000000000037e-15 or 0.00419999999999999974 < y Initial program 97.6%
Taylor expanded in t around inf 55.9%
mul-1-neg55.9%
distribute-lft-neg-out55.9%
*-commutative55.9%
Simplified55.9%
Taylor expanded in y around 0 14.5%
mul-1-neg14.5%
unsub-neg14.5%
*-commutative14.5%
Simplified14.5%
Taylor expanded in t around inf 17.4%
mul-1-neg17.4%
distribute-rgt-neg-out17.4%
distribute-rgt-neg-in17.4%
Simplified17.4%
Taylor expanded in t around 0 17.4%
mul-1-neg17.4%
*-commutative17.4%
associate-*r*19.7%
distribute-lft-neg-in19.7%
Simplified19.7%
if -5.80000000000000037e-15 < y < 0.00419999999999999974Initial program 97.0%
Taylor expanded in t around inf 56.5%
mul-1-neg56.5%
distribute-lft-neg-out56.5%
*-commutative56.5%
Simplified56.5%
Taylor expanded in y around 0 30.6%
Final simplification25.4%
(FPCore (x y z t a b) :precision binary64 (if (<= a -6.8e+90) (* x (* y t)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -6.8e+90) {
tmp = x * (y * t);
} 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 <= (-6.8d+90)) then
tmp = x * (y * t)
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 <= -6.8e+90) {
tmp = x * (y * t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -6.8e+90: tmp = x * (y * t) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -6.8e+90) tmp = Float64(x * Float64(y * t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -6.8e+90) tmp = x * (y * t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -6.8e+90], N[(x * N[(y * t), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.8 \cdot 10^{+90}:\\
\;\;\;\;x \cdot \left(y \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -6.80000000000000036e90Initial program 89.3%
Taylor expanded in t around inf 30.8%
mul-1-neg30.8%
distribute-lft-neg-out30.8%
*-commutative30.8%
Simplified30.8%
Taylor expanded in y around 0 7.4%
mul-1-neg7.4%
unsub-neg7.4%
*-commutative7.4%
Simplified7.4%
Taylor expanded in t around inf 21.6%
mul-1-neg21.6%
distribute-rgt-neg-out21.6%
distribute-rgt-neg-in21.6%
Simplified21.6%
expm1-log1p-u21.2%
expm1-udef37.7%
*-commutative37.7%
associate-*l*37.7%
distribute-lft-neg-in37.7%
*-commutative37.7%
*-commutative37.7%
distribute-lft-neg-in37.7%
add-sqr-sqrt22.1%
sqrt-unprod40.0%
sqr-neg40.0%
sqrt-unprod15.9%
add-sqr-sqrt33.7%
Applied egg-rr33.7%
expm1-def19.3%
expm1-log1p19.6%
Simplified19.6%
if -6.80000000000000036e90 < a Initial program 99.0%
Taylor expanded in t around inf 61.8%
mul-1-neg61.8%
distribute-lft-neg-out61.8%
*-commutative61.8%
Simplified61.8%
Taylor expanded in y around 0 20.8%
Final simplification20.6%
(FPCore (x y z t a b) :precision binary64 (if (<= a -4.5e+16) (* y (* x t)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -4.5e+16) {
tmp = y * (x * t);
} 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 <= (-4.5d+16)) then
tmp = y * (x * t)
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 <= -4.5e+16) {
tmp = y * (x * t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -4.5e+16: tmp = y * (x * t) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -4.5e+16) tmp = Float64(y * Float64(x * t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -4.5e+16) tmp = y * (x * t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -4.5e+16], N[(y * N[(x * t), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.5 \cdot 10^{+16}:\\
\;\;\;\;y \cdot \left(x \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -4.5e16Initial program 92.1%
Taylor expanded in t around inf 33.0%
mul-1-neg33.0%
distribute-lft-neg-out33.0%
*-commutative33.0%
Simplified33.0%
Taylor expanded in y around 0 8.0%
mul-1-neg8.0%
unsub-neg8.0%
*-commutative8.0%
Simplified8.0%
Taylor expanded in t around inf 18.3%
mul-1-neg18.3%
distribute-rgt-neg-out18.3%
distribute-rgt-neg-in18.3%
Simplified18.3%
expm1-log1p-u17.8%
expm1-udef33.1%
*-commutative33.1%
associate-*l*33.1%
distribute-lft-neg-in33.1%
*-commutative33.1%
*-commutative33.1%
distribute-lft-neg-in33.1%
add-sqr-sqrt18.2%
sqrt-unprod34.8%
sqr-neg34.8%
sqrt-unprod15.1%
add-sqr-sqrt28.4%
Applied egg-rr28.4%
expm1-def14.6%
expm1-log1p15.1%
associate-*r*15.0%
*-commutative15.0%
associate-*r*18.1%
Simplified18.1%
if -4.5e16 < a Initial program 98.9%
Taylor expanded in t around inf 63.6%
mul-1-neg63.6%
distribute-lft-neg-out63.6%
*-commutative63.6%
Simplified63.6%
Taylor expanded in y around 0 22.2%
Final simplification21.2%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 97.3%
Taylor expanded in t around inf 56.2%
mul-1-neg56.2%
distribute-lft-neg-out56.2%
*-commutative56.2%
Simplified56.2%
Taylor expanded in y around 0 17.8%
Final simplification17.8%
herbie shell --seed 2024027
(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))))))