
(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 96.5%
fma-define97.7%
sub-neg97.7%
log1p-define100.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 96.5%
Final simplification96.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -8e+15) (not (<= y 5.2e+98))) (* x (exp (* y (- (log z) t)))) (* x (exp (- (* a (- b)) (* y t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -8e+15) || !(y <= 5.2e+98)) {
tmp = x * exp((y * (log(z) - t)));
} else {
tmp = x * exp(((a * -b) - (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 ((y <= (-8d+15)) .or. (.not. (y <= 5.2d+98))) then
tmp = x * exp((y * (log(z) - t)))
else
tmp = x * exp(((a * -b) - (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 ((y <= -8e+15) || !(y <= 5.2e+98)) {
tmp = x * Math.exp((y * (Math.log(z) - t)));
} else {
tmp = x * Math.exp(((a * -b) - (y * t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -8e+15) or not (y <= 5.2e+98): tmp = x * math.exp((y * (math.log(z) - t))) else: tmp = x * math.exp(((a * -b) - (y * t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -8e+15) || !(y <= 5.2e+98)) tmp = Float64(x * exp(Float64(y * Float64(log(z) - t)))); else tmp = Float64(x * exp(Float64(Float64(a * Float64(-b)) - Float64(y * t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -8e+15) || ~((y <= 5.2e+98))) tmp = x * exp((y * (log(z) - t))); else tmp = x * exp(((a * -b) - (y * t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -8e+15], N[Not[LessEqual[y, 5.2e+98]], $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[(y * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{+15} \lor \neg \left(y \leq 5.2 \cdot 10^{+98}\right):\\
\;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right) - y \cdot t}\\
\end{array}
\end{array}
if y < -8e15 or 5.1999999999999999e98 < y Initial program 96.0%
Taylor expanded in y around inf 89.0%
if -8e15 < y < 5.1999999999999999e98Initial program 96.9%
Taylor expanded in z around 0 96.2%
Taylor expanded in t around inf 94.2%
neg-mul-194.2%
Simplified94.2%
Taylor expanded in x around 0 94.2%
*-commutative94.2%
distribute-lft-out94.2%
Simplified94.2%
Final simplification92.2%
(FPCore (x y z t a b) :precision binary64 (* x (exp (- (* y (- (log z) t)) (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(((y * (log(z) - t)) - (a * 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 * 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 * b)));
}
def code(x, y, z, t, a, b): return x * math.exp(((y * (math.log(z) - t)) - (a * b)))
function code(x, y, z, t, a, b) return Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) - Float64(a * b)))) end
function tmp = code(x, y, z, t, a, b) tmp = x * exp(((y * (log(z) - t)) - (a * 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 * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{y \cdot \left(\log z - t\right) - a \cdot b}
\end{array}
Initial program 96.5%
Taylor expanded in z around 0 96.1%
Final simplification96.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (pow z y))))
(if (<= y -6e+15)
t_1
(if (<= y 5.5e+47)
(* x (exp (* a (- b))))
(if (<= y 2.5e+130) t_1 (* x (exp (* y (- t)))))))))
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 <= -6e+15) {
tmp = t_1;
} else if (y <= 5.5e+47) {
tmp = x * exp((a * -b));
} else if (y <= 2.5e+130) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x * (z ** y)
if (y <= (-6d+15)) then
tmp = t_1
else if (y <= 5.5d+47) then
tmp = x * exp((a * -b))
else if (y <= 2.5d+130) then
tmp = t_1
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 t_1 = x * Math.pow(z, y);
double tmp;
if (y <= -6e+15) {
tmp = t_1;
} else if (y <= 5.5e+47) {
tmp = x * Math.exp((a * -b));
} else if (y <= 2.5e+130) {
tmp = t_1;
} else {
tmp = x * Math.exp((y * -t));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * math.pow(z, y) tmp = 0 if y <= -6e+15: tmp = t_1 elif y <= 5.5e+47: tmp = x * math.exp((a * -b)) elif y <= 2.5e+130: tmp = t_1 else: tmp = x * math.exp((y * -t)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * (z ^ y)) tmp = 0.0 if (y <= -6e+15) tmp = t_1; elseif (y <= 5.5e+47) tmp = Float64(x * exp(Float64(a * Float64(-b)))); elseif (y <= 2.5e+130) tmp = t_1; else tmp = Float64(x * exp(Float64(y * Float64(-t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * (z ^ y); tmp = 0.0; if (y <= -6e+15) tmp = t_1; elseif (y <= 5.5e+47) tmp = x * exp((a * -b)); elseif (y <= 2.5e+130) tmp = t_1; else tmp = x * exp((y * -t)); 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, -6e+15], t$95$1, If[LessEqual[y, 5.5e+47], N[(x * N[Exp[N[(a * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.5e+130], t$95$1, N[(x * N[Exp[N[(y * (-t)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot {z}^{y}\\
\mathbf{if}\;y \leq -6 \cdot 10^{+15}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{+47}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{+130}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{y \cdot \left(-t\right)}\\
\end{array}
\end{array}
if y < -6e15 or 5.4999999999999998e47 < y < 2.4999999999999998e130Initial program 92.7%
Taylor expanded in y around inf 83.2%
Taylor expanded in t around 0 71.2%
if -6e15 < y < 5.4999999999999998e47Initial program 98.0%
Taylor expanded in b around inf 82.7%
mul-1-neg82.7%
distribute-rgt-neg-out82.7%
Simplified82.7%
if 2.4999999999999998e130 < y Initial program 100.0%
Taylor expanded in t around inf 76.3%
mul-1-neg76.3%
distribute-lft-neg-out76.3%
*-commutative76.3%
Simplified76.3%
Final simplification78.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (pow z y))))
(if (<= y -1.95e+19)
t_1
(if (<= y 1.05e+75)
(* x (exp (* (- a) (+ z b))))
(if (<= y 4e+130) t_1 (* x (exp (* y (- t)))))))))
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 <= -1.95e+19) {
tmp = t_1;
} else if (y <= 1.05e+75) {
tmp = x * exp((-a * (z + b)));
} else if (y <= 4e+130) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x * (z ** y)
if (y <= (-1.95d+19)) then
tmp = t_1
else if (y <= 1.05d+75) then
tmp = x * exp((-a * (z + b)))
else if (y <= 4d+130) then
tmp = t_1
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 t_1 = x * Math.pow(z, y);
double tmp;
if (y <= -1.95e+19) {
tmp = t_1;
} else if (y <= 1.05e+75) {
tmp = x * Math.exp((-a * (z + b)));
} else if (y <= 4e+130) {
tmp = t_1;
} else {
tmp = x * Math.exp((y * -t));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * math.pow(z, y) tmp = 0 if y <= -1.95e+19: tmp = t_1 elif y <= 1.05e+75: tmp = x * math.exp((-a * (z + b))) elif y <= 4e+130: tmp = t_1 else: tmp = x * math.exp((y * -t)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * (z ^ y)) tmp = 0.0 if (y <= -1.95e+19) tmp = t_1; elseif (y <= 1.05e+75) tmp = Float64(x * exp(Float64(Float64(-a) * Float64(z + b)))); elseif (y <= 4e+130) tmp = t_1; else tmp = Float64(x * exp(Float64(y * Float64(-t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * (z ^ y); tmp = 0.0; if (y <= -1.95e+19) tmp = t_1; elseif (y <= 1.05e+75) tmp = x * exp((-a * (z + b))); elseif (y <= 4e+130) tmp = t_1; else tmp = x * exp((y * -t)); 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, -1.95e+19], t$95$1, If[LessEqual[y, 1.05e+75], N[(x * N[Exp[N[((-a) * N[(z + b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4e+130], t$95$1, N[(x * N[Exp[N[(y * (-t)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot {z}^{y}\\
\mathbf{if}\;y \leq -1.95 \cdot 10^{+19}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.05 \cdot 10^{+75}:\\
\;\;\;\;x \cdot e^{\left(-a\right) \cdot \left(z + b\right)}\\
\mathbf{elif}\;y \leq 4 \cdot 10^{+130}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{y \cdot \left(-t\right)}\\
\end{array}
\end{array}
if y < -1.95e19 or 1.04999999999999999e75 < y < 4.0000000000000002e130Initial program 93.5%
Taylor expanded in y around inf 84.7%
Taylor expanded in t around 0 71.9%
if -1.95e19 < y < 1.04999999999999999e75Initial program 97.4%
Taylor expanded in y around 0 81.9%
sub-neg81.9%
mul-1-neg81.9%
log1p-define85.1%
mul-1-neg85.1%
Simplified85.1%
Taylor expanded in z around 0 85.1%
+-commutative85.1%
associate-*r*85.1%
associate-*r*85.1%
distribute-lft-out85.1%
neg-mul-185.1%
Simplified85.1%
if 4.0000000000000002e130 < y Initial program 100.0%
Taylor expanded in t around inf 76.3%
mul-1-neg76.3%
distribute-lft-neg-out76.3%
*-commutative76.3%
Simplified76.3%
Final simplification80.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2.75e+17) (not (<= y 6.8e+47))) (* 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 <= -2.75e+17) || !(y <= 6.8e+47)) {
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 <= (-2.75d+17)) .or. (.not. (y <= 6.8d+47))) 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 <= -2.75e+17) || !(y <= 6.8e+47)) {
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 <= -2.75e+17) or not (y <= 6.8e+47): 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 <= -2.75e+17) || !(y <= 6.8e+47)) 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 <= -2.75e+17) || ~((y <= 6.8e+47))) 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, -2.75e+17], N[Not[LessEqual[y, 6.8e+47]], $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.75 \cdot 10^{+17} \lor \neg \left(y \leq 6.8 \cdot 10^{+47}\right):\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\
\end{array}
\end{array}
if y < -2.75e17 or 6.7999999999999996e47 < y Initial program 94.6%
Taylor expanded in y around inf 85.8%
Taylor expanded in t around 0 67.2%
if -2.75e17 < y < 6.7999999999999996e47Initial program 98.0%
Taylor expanded in b around inf 82.7%
mul-1-neg82.7%
distribute-rgt-neg-out82.7%
Simplified82.7%
Final simplification75.9%
(FPCore (x y z t a b) :precision binary64 (* x (exp (- (* a (- b)) (* y t)))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(((a * -b) - (y * t)));
}
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(((a * -b) - (y * t)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x * Math.exp(((a * -b) - (y * t)));
}
def code(x, y, z, t, a, b): return x * math.exp(((a * -b) - (y * t)))
function code(x, y, z, t, a, b) return Float64(x * exp(Float64(Float64(a * Float64(-b)) - Float64(y * t)))) end
function tmp = code(x, y, z, t, a, b) tmp = x * exp(((a * -b) - (y * t))); end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(N[(a * (-b)), $MachinePrecision] - N[(y * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{a \cdot \left(-b\right) - y \cdot t}
\end{array}
Initial program 96.5%
Taylor expanded in z around 0 96.1%
Taylor expanded in t around inf 84.2%
neg-mul-184.2%
Simplified84.2%
Taylor expanded in x around 0 84.2%
*-commutative84.2%
distribute-lft-out84.2%
Simplified84.2%
Final simplification84.2%
(FPCore (x y z t a b) :precision binary64 (if (<= t -0.102) (* x (- 1.0 (* y t))) (* x (pow z y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -0.102) {
tmp = x * (1.0 - (y * t));
} else {
tmp = x * pow(z, y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-0.102d0)) then
tmp = x * (1.0d0 - (y * t))
else
tmp = x * (z ** y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -0.102) {
tmp = x * (1.0 - (y * t));
} else {
tmp = x * Math.pow(z, y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -0.102: tmp = x * (1.0 - (y * t)) else: tmp = x * math.pow(z, y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -0.102) tmp = Float64(x * Float64(1.0 - Float64(y * t))); else tmp = Float64(x * (z ^ y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -0.102) tmp = x * (1.0 - (y * t)); else tmp = x * (z ^ y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -0.102], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -0.102:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot {z}^{y}\\
\end{array}
\end{array}
if t < -0.101999999999999993Initial program 96.8%
Taylor expanded in t around inf 75.8%
mul-1-neg75.8%
distribute-lft-neg-out75.8%
*-commutative75.8%
Simplified75.8%
Taylor expanded in y around 0 37.1%
associate-*r*37.1%
mul-1-neg37.1%
Simplified37.1%
*-commutative37.1%
distribute-rgt-neg-out37.1%
unsub-neg37.1%
Applied egg-rr37.1%
if -0.101999999999999993 < t Initial program 96.4%
Taylor expanded in y around inf 70.4%
Taylor expanded in t around 0 61.0%
Final simplification55.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (* x (- z)))) (t_2 (* t (* x (- y)))))
(if (<= y -5.2e+106)
t_2
(if (<= y -1.1e+24)
t_1
(if (<= y 4.5e-37) x (if (<= y 3.05e+155) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (x * -z);
double t_2 = t * (x * -y);
double tmp;
if (y <= -5.2e+106) {
tmp = t_2;
} else if (y <= -1.1e+24) {
tmp = t_1;
} else if (y <= 4.5e-37) {
tmp = x;
} else if (y <= 3.05e+155) {
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 = a * (x * -z)
t_2 = t * (x * -y)
if (y <= (-5.2d+106)) then
tmp = t_2
else if (y <= (-1.1d+24)) then
tmp = t_1
else if (y <= 4.5d-37) then
tmp = x
else if (y <= 3.05d+155) 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 = a * (x * -z);
double t_2 = t * (x * -y);
double tmp;
if (y <= -5.2e+106) {
tmp = t_2;
} else if (y <= -1.1e+24) {
tmp = t_1;
} else if (y <= 4.5e-37) {
tmp = x;
} else if (y <= 3.05e+155) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (x * -z) t_2 = t * (x * -y) tmp = 0 if y <= -5.2e+106: tmp = t_2 elif y <= -1.1e+24: tmp = t_1 elif y <= 4.5e-37: tmp = x elif y <= 3.05e+155: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(x * Float64(-z))) t_2 = Float64(t * Float64(x * Float64(-y))) tmp = 0.0 if (y <= -5.2e+106) tmp = t_2; elseif (y <= -1.1e+24) tmp = t_1; elseif (y <= 4.5e-37) tmp = x; elseif (y <= 3.05e+155) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (x * -z); t_2 = t * (x * -y); tmp = 0.0; if (y <= -5.2e+106) tmp = t_2; elseif (y <= -1.1e+24) tmp = t_1; elseif (y <= 4.5e-37) tmp = x; elseif (y <= 3.05e+155) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(x * (-z)), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(x * (-y)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.2e+106], t$95$2, If[LessEqual[y, -1.1e+24], t$95$1, If[LessEqual[y, 4.5e-37], x, If[LessEqual[y, 3.05e+155], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(x \cdot \left(-z\right)\right)\\
t_2 := t \cdot \left(x \cdot \left(-y\right)\right)\\
\mathbf{if}\;y \leq -5.2 \cdot 10^{+106}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -1.1 \cdot 10^{+24}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{-37}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 3.05 \cdot 10^{+155}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -5.20000000000000039e106 or 3.04999999999999978e155 < y Initial program 95.6%
Taylor expanded in t around inf 62.7%
mul-1-neg62.7%
distribute-lft-neg-out62.7%
*-commutative62.7%
Simplified62.7%
Taylor expanded in y around 0 33.9%
associate-*r*33.9%
mul-1-neg33.9%
Simplified33.9%
Taylor expanded in t around inf 33.9%
mul-1-neg33.9%
*-commutative33.9%
Simplified33.9%
if -5.20000000000000039e106 < y < -1.10000000000000001e24 or 4.5000000000000004e-37 < y < 3.04999999999999978e155Initial program 94.6%
Taylor expanded in y around 0 43.9%
sub-neg43.9%
mul-1-neg43.9%
log1p-define45.6%
mul-1-neg45.6%
Simplified45.6%
Taylor expanded in b around 0 5.6%
Taylor expanded in z around 0 7.0%
mul-1-neg7.0%
unsub-neg7.0%
Simplified7.0%
Taylor expanded in a around inf 32.8%
mul-1-neg32.8%
distribute-rgt-neg-in32.8%
distribute-lft-neg-in32.8%
Simplified32.8%
if -1.10000000000000001e24 < y < 4.5000000000000004e-37Initial program 97.8%
Taylor expanded in t around inf 55.6%
mul-1-neg55.6%
distribute-lft-neg-out55.6%
*-commutative55.6%
Simplified55.6%
Taylor expanded in y around 0 36.5%
Final simplification35.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (* x (- z)))))
(if (<= y -1.7e+105)
(* t (* x (- y)))
(if (<= y -2.25e+24)
t_1
(if (<= y 6.6e-45) x (if (<= y 2.6e+155) t_1 (* x (* y (- t)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (x * -z);
double tmp;
if (y <= -1.7e+105) {
tmp = t * (x * -y);
} else if (y <= -2.25e+24) {
tmp = t_1;
} else if (y <= 6.6e-45) {
tmp = x;
} else if (y <= 2.6e+155) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = a * (x * -z)
if (y <= (-1.7d+105)) then
tmp = t * (x * -y)
else if (y <= (-2.25d+24)) then
tmp = t_1
else if (y <= 6.6d-45) then
tmp = x
else if (y <= 2.6d+155) then
tmp = t_1
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 t_1 = a * (x * -z);
double tmp;
if (y <= -1.7e+105) {
tmp = t * (x * -y);
} else if (y <= -2.25e+24) {
tmp = t_1;
} else if (y <= 6.6e-45) {
tmp = x;
} else if (y <= 2.6e+155) {
tmp = t_1;
} else {
tmp = x * (y * -t);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (x * -z) tmp = 0 if y <= -1.7e+105: tmp = t * (x * -y) elif y <= -2.25e+24: tmp = t_1 elif y <= 6.6e-45: tmp = x elif y <= 2.6e+155: tmp = t_1 else: tmp = x * (y * -t) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(x * Float64(-z))) tmp = 0.0 if (y <= -1.7e+105) tmp = Float64(t * Float64(x * Float64(-y))); elseif (y <= -2.25e+24) tmp = t_1; elseif (y <= 6.6e-45) tmp = x; elseif (y <= 2.6e+155) tmp = t_1; else tmp = Float64(x * Float64(y * Float64(-t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (x * -z); tmp = 0.0; if (y <= -1.7e+105) tmp = t * (x * -y); elseif (y <= -2.25e+24) tmp = t_1; elseif (y <= 6.6e-45) tmp = x; elseif (y <= 2.6e+155) tmp = t_1; else tmp = x * (y * -t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(x * (-z)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.7e+105], N[(t * N[(x * (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.25e+24], t$95$1, If[LessEqual[y, 6.6e-45], x, If[LessEqual[y, 2.6e+155], t$95$1, N[(x * N[(y * (-t)), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(x \cdot \left(-z\right)\right)\\
\mathbf{if}\;y \leq -1.7 \cdot 10^{+105}:\\
\;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\
\mathbf{elif}\;y \leq -2.25 \cdot 10^{+24}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 6.6 \cdot 10^{-45}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{+155}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\
\end{array}
\end{array}
if y < -1.7e105Initial program 93.1%
Taylor expanded in t around inf 57.0%
mul-1-neg57.0%
distribute-lft-neg-out57.0%
*-commutative57.0%
Simplified57.0%
Taylor expanded in y around 0 27.3%
associate-*r*27.3%
mul-1-neg27.3%
Simplified27.3%
Taylor expanded in t around inf 29.4%
mul-1-neg29.4%
*-commutative29.4%
Simplified29.4%
if -1.7e105 < y < -2.2500000000000001e24 or 6.6000000000000001e-45 < y < 2.6000000000000002e155Initial program 94.6%
Taylor expanded in y around 0 43.9%
sub-neg43.9%
mul-1-neg43.9%
log1p-define45.6%
mul-1-neg45.6%
Simplified45.6%
Taylor expanded in b around 0 5.6%
Taylor expanded in z around 0 7.0%
mul-1-neg7.0%
unsub-neg7.0%
Simplified7.0%
Taylor expanded in a around inf 32.8%
mul-1-neg32.8%
distribute-rgt-neg-in32.8%
distribute-lft-neg-in32.8%
Simplified32.8%
if -2.2500000000000001e24 < y < 6.6000000000000001e-45Initial program 97.8%
Taylor expanded in t around inf 55.6%
mul-1-neg55.6%
distribute-lft-neg-out55.6%
*-commutative55.6%
Simplified55.6%
Taylor expanded in y around 0 36.5%
if 2.6000000000000002e155 < y Initial program 100.0%
Taylor expanded in t around inf 72.5%
mul-1-neg72.5%
distribute-lft-neg-out72.5%
*-commutative72.5%
Simplified72.5%
Taylor expanded in y around 0 45.4%
associate-*r*45.4%
mul-1-neg45.4%
Simplified45.4%
Taylor expanded in t around inf 41.6%
associate-*r*41.6%
*-commutative41.6%
associate-*r*45.4%
associate-*r*45.4%
mul-1-neg45.4%
Simplified45.4%
Final simplification35.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -2.3e+107)
(* t (* x (- y)))
(if (<= y 1.85e-37)
(* x (- 1.0 (* z a)))
(if (<= y 1.75e+155) (* a (* x (- z))) (* x (* y (- t)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.3e+107) {
tmp = t * (x * -y);
} else if (y <= 1.85e-37) {
tmp = x * (1.0 - (z * a));
} else if (y <= 1.75e+155) {
tmp = a * (x * -z);
} 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 (y <= (-2.3d+107)) then
tmp = t * (x * -y)
else if (y <= 1.85d-37) then
tmp = x * (1.0d0 - (z * a))
else if (y <= 1.75d+155) then
tmp = a * (x * -z)
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 (y <= -2.3e+107) {
tmp = t * (x * -y);
} else if (y <= 1.85e-37) {
tmp = x * (1.0 - (z * a));
} else if (y <= 1.75e+155) {
tmp = a * (x * -z);
} else {
tmp = x * (y * -t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2.3e+107: tmp = t * (x * -y) elif y <= 1.85e-37: tmp = x * (1.0 - (z * a)) elif y <= 1.75e+155: tmp = a * (x * -z) else: tmp = x * (y * -t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2.3e+107) tmp = Float64(t * Float64(x * Float64(-y))); elseif (y <= 1.85e-37) tmp = Float64(x * Float64(1.0 - Float64(z * a))); elseif (y <= 1.75e+155) tmp = Float64(a * Float64(x * Float64(-z))); else tmp = Float64(x * Float64(y * Float64(-t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -2.3e+107) tmp = t * (x * -y); elseif (y <= 1.85e-37) tmp = x * (1.0 - (z * a)); elseif (y <= 1.75e+155) tmp = a * (x * -z); else tmp = x * (y * -t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.3e+107], N[(t * N[(x * (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.85e-37], N[(x * N[(1.0 - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.75e+155], N[(a * N[(x * (-z)), $MachinePrecision]), $MachinePrecision], N[(x * N[(y * (-t)), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.3 \cdot 10^{+107}:\\
\;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\
\mathbf{elif}\;y \leq 1.85 \cdot 10^{-37}:\\
\;\;\;\;x \cdot \left(1 - z \cdot a\right)\\
\mathbf{elif}\;y \leq 1.75 \cdot 10^{+155}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\
\end{array}
\end{array}
if y < -2.3e107Initial program 92.9%
Taylor expanded in t around inf 58.2%
mul-1-neg58.2%
distribute-lft-neg-out58.2%
*-commutative58.2%
Simplified58.2%
Taylor expanded in y around 0 27.8%
associate-*r*27.8%
mul-1-neg27.8%
Simplified27.8%
Taylor expanded in t around inf 30.1%
mul-1-neg30.1%
*-commutative30.1%
Simplified30.1%
if -2.3e107 < y < 1.85e-37Initial program 98.0%
Taylor expanded in y around 0 80.9%
sub-neg80.9%
mul-1-neg80.9%
log1p-define83.4%
mul-1-neg83.4%
Simplified83.4%
Taylor expanded in b around 0 35.1%
Taylor expanded in z around 0 34.8%
mul-1-neg34.8%
unsub-neg34.8%
Simplified34.8%
if 1.85e-37 < y < 1.74999999999999992e155Initial program 93.1%
Taylor expanded in y around 0 43.7%
sub-neg43.7%
mul-1-neg43.7%
log1p-define46.0%
mul-1-neg46.0%
Simplified46.0%
Taylor expanded in b around 0 5.7%
Taylor expanded in z around 0 5.5%
mul-1-neg5.5%
unsub-neg5.5%
Simplified5.5%
Taylor expanded in a around inf 30.0%
mul-1-neg30.0%
distribute-rgt-neg-in30.0%
distribute-lft-neg-in30.0%
Simplified30.0%
if 1.74999999999999992e155 < y Initial program 100.0%
Taylor expanded in t around inf 72.5%
mul-1-neg72.5%
distribute-lft-neg-out72.5%
*-commutative72.5%
Simplified72.5%
Taylor expanded in y around 0 45.4%
associate-*r*45.4%
mul-1-neg45.4%
Simplified45.4%
Taylor expanded in t around inf 41.6%
associate-*r*41.6%
*-commutative41.6%
associate-*r*45.4%
associate-*r*45.4%
mul-1-neg45.4%
Simplified45.4%
Final simplification34.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -3.8e+107) (not (<= y 5.2e+35))) (* t (* x (- y))) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.8e+107) || !(y <= 5.2e+35)) {
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 ((y <= (-3.8d+107)) .or. (.not. (y <= 5.2d+35))) 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 ((y <= -3.8e+107) || !(y <= 5.2e+35)) {
tmp = t * (x * -y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -3.8e+107) or not (y <= 5.2e+35): tmp = t * (x * -y) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -3.8e+107) || !(y <= 5.2e+35)) 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 ((y <= -3.8e+107) || ~((y <= 5.2e+35))) tmp = t * (x * -y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -3.8e+107], N[Not[LessEqual[y, 5.2e+35]], $MachinePrecision]], N[(t * N[(x * (-y)), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.8 \cdot 10^{+107} \lor \neg \left(y \leq 5.2 \cdot 10^{+35}\right):\\
\;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -3.7999999999999998e107 or 5.20000000000000013e35 < y Initial program 93.9%
Taylor expanded in t around inf 58.8%
mul-1-neg58.8%
distribute-lft-neg-out58.8%
*-commutative58.8%
Simplified58.8%
Taylor expanded in y around 0 26.5%
associate-*r*26.5%
mul-1-neg26.5%
Simplified26.5%
Taylor expanded in t around inf 26.3%
mul-1-neg26.3%
*-commutative26.3%
Simplified26.3%
if -3.7999999999999998e107 < y < 5.20000000000000013e35Initial program 98.1%
Taylor expanded in t around inf 55.5%
mul-1-neg55.5%
distribute-lft-neg-out55.5%
*-commutative55.5%
Simplified55.5%
Taylor expanded in y around 0 31.3%
Final simplification29.4%
(FPCore (x y z t a b) :precision binary64 (if (<= x 4.3e-86) (* a (* x (- z))) (* x (- 1.0 (* y t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= 4.3e-86) {
tmp = a * (x * -z);
} else {
tmp = x * (1.0 - (y * t));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (x <= 4.3d-86) then
tmp = a * (x * -z)
else
tmp = x * (1.0d0 - (y * t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= 4.3e-86) {
tmp = a * (x * -z);
} else {
tmp = x * (1.0 - (y * t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= 4.3e-86: tmp = a * (x * -z) else: tmp = x * (1.0 - (y * t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= 4.3e-86) tmp = Float64(a * Float64(x * Float64(-z))); else tmp = Float64(x * Float64(1.0 - Float64(y * t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= 4.3e-86) tmp = a * (x * -z); else tmp = x * (1.0 - (y * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, 4.3e-86], N[(a * N[(x * (-z)), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 4.3 \cdot 10^{-86}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\end{array}
\end{array}
if x < 4.30000000000000013e-86Initial program 96.0%
Taylor expanded in y around 0 61.1%
sub-neg61.1%
mul-1-neg61.1%
log1p-define63.2%
mul-1-neg63.2%
Simplified63.2%
Taylor expanded in b around 0 19.7%
Taylor expanded in z around 0 19.9%
mul-1-neg19.9%
unsub-neg19.9%
Simplified19.9%
Taylor expanded in a around inf 22.6%
mul-1-neg22.6%
distribute-rgt-neg-in22.6%
distribute-lft-neg-in22.6%
Simplified22.6%
if 4.30000000000000013e-86 < x Initial program 97.6%
Taylor expanded in t around inf 56.4%
mul-1-neg56.4%
distribute-lft-neg-out56.4%
*-commutative56.4%
Simplified56.4%
Taylor expanded in y around 0 34.8%
associate-*r*34.8%
mul-1-neg34.8%
Simplified34.8%
*-commutative34.8%
distribute-rgt-neg-out34.8%
unsub-neg34.8%
Applied egg-rr34.8%
Final simplification26.5%
(FPCore (x y z t a b) :precision binary64 (if (<= x 5.5e-86) (* a (* x (- z))) (- x (* t (* x y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= 5.5e-86) {
tmp = a * (x * -z);
} else {
tmp = x - (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 (x <= 5.5d-86) then
tmp = a * (x * -z)
else
tmp = x - (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 (x <= 5.5e-86) {
tmp = a * (x * -z);
} else {
tmp = x - (t * (x * y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= 5.5e-86: tmp = a * (x * -z) else: tmp = x - (t * (x * y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= 5.5e-86) tmp = Float64(a * Float64(x * Float64(-z))); else tmp = Float64(x - Float64(t * Float64(x * y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= 5.5e-86) tmp = a * (x * -z); else tmp = x - (t * (x * y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, 5.5e-86], N[(a * N[(x * (-z)), $MachinePrecision]), $MachinePrecision], N[(x - N[(t * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 5.5 \cdot 10^{-86}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x - t \cdot \left(x \cdot y\right)\\
\end{array}
\end{array}
if x < 5.5e-86Initial program 96.0%
Taylor expanded in y around 0 61.1%
sub-neg61.1%
mul-1-neg61.1%
log1p-define63.2%
mul-1-neg63.2%
Simplified63.2%
Taylor expanded in b around 0 19.7%
Taylor expanded in z around 0 19.9%
mul-1-neg19.9%
unsub-neg19.9%
Simplified19.9%
Taylor expanded in a around inf 22.6%
mul-1-neg22.6%
distribute-rgt-neg-in22.6%
distribute-lft-neg-in22.6%
Simplified22.6%
if 5.5e-86 < x Initial program 97.6%
Taylor expanded in t around inf 56.4%
mul-1-neg56.4%
distribute-lft-neg-out56.4%
*-commutative56.4%
Simplified56.4%
Taylor expanded in y around 0 35.9%
associate-*r*35.9%
mul-1-neg35.9%
*-commutative35.9%
Simplified35.9%
Final simplification26.8%
(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 96.5%
Taylor expanded in t around inf 56.8%
mul-1-neg56.8%
distribute-lft-neg-out56.8%
*-commutative56.8%
Simplified56.8%
Taylor expanded in y around 0 20.8%
Final simplification20.8%
herbie shell --seed 2024043
(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))))))