
(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 13 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.1%
fma-def96.5%
sub-neg96.5%
log1p-def98.8%
Simplified98.8%
Final simplification98.8%
(FPCore (x y z t a b) :precision binary64 (if (<= a 4.9e+150) (* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))))) (* x (exp (* a (- (+ z b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= 4.9e+150) {
tmp = x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b))));
} else {
tmp = x * exp((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 (a <= 4.9d+150) then
tmp = x * exp(((y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))))
else
tmp = x * exp((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 (a <= 4.9e+150) {
tmp = x * Math.exp(((y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b))));
} else {
tmp = x * Math.exp((a * -(z + b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= 4.9e+150: tmp = x * math.exp(((y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b)))) else: tmp = x * math.exp((a * -(z + b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= 4.9e+150) tmp = Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))))); else tmp = Float64(x * exp(Float64(a * Float64(-Float64(z + b))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= 4.9e+150) tmp = x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b)))); else tmp = x * exp((a * -(z + b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, 4.9e+150], 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], N[(x * N[Exp[N[(a * (-N[(z + b), $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 4.9 \cdot 10^{+150}:\\
\;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-\left(z + b\right)\right)}\\
\end{array}
\end{array}
if a < 4.90000000000000007e150Initial program 98.2%
if 4.90000000000000007e150 < a Initial program 83.2%
Taylor expanded in y around 0 86.1%
sub-neg86.1%
neg-mul-186.1%
log1p-def97.2%
neg-mul-197.2%
Simplified97.2%
Taylor expanded in z around 0 97.2%
associate-*r*97.2%
associate-*r*97.2%
distribute-lft-out97.2%
neg-mul-197.2%
Simplified97.2%
Final simplification98.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.7e-38) (not (<= y 5.2e-26))) (* x (exp (* y (- (log z) t)))) (* x (exp (* a (- (+ z b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.7e-38) || !(y <= 5.2e-26)) {
tmp = x * exp((y * (log(z) - t)));
} else {
tmp = x * exp((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 <= (-1.7d-38)) .or. (.not. (y <= 5.2d-26))) then
tmp = x * exp((y * (log(z) - t)))
else
tmp = x * exp((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 <= -1.7e-38) || !(y <= 5.2e-26)) {
tmp = x * Math.exp((y * (Math.log(z) - t)));
} else {
tmp = x * Math.exp((a * -(z + b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.7e-38) or not (y <= 5.2e-26): tmp = x * math.exp((y * (math.log(z) - t))) else: tmp = x * math.exp((a * -(z + b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.7e-38) || !(y <= 5.2e-26)) tmp = Float64(x * exp(Float64(y * Float64(log(z) - t)))); else tmp = Float64(x * exp(Float64(a * Float64(-Float64(z + b))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.7e-38) || ~((y <= 5.2e-26))) tmp = x * exp((y * (log(z) - t))); else tmp = x * exp((a * -(z + b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.7e-38], N[Not[LessEqual[y, 5.2e-26]], $MachinePrecision]], N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(a * (-N[(z + b), $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.7 \cdot 10^{-38} \lor \neg \left(y \leq 5.2 \cdot 10^{-26}\right):\\
\;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-\left(z + b\right)\right)}\\
\end{array}
\end{array}
if y < -1.7000000000000001e-38 or 5.2000000000000002e-26 < y Initial program 96.3%
Taylor expanded in y around inf 87.8%
if -1.7000000000000001e-38 < y < 5.2000000000000002e-26Initial program 95.9%
Taylor expanded in y around 0 88.7%
sub-neg88.7%
neg-mul-188.7%
log1p-def93.6%
neg-mul-193.6%
Simplified93.6%
Taylor expanded in z around 0 93.6%
associate-*r*93.6%
associate-*r*93.6%
distribute-lft-out93.6%
neg-mul-193.6%
Simplified93.6%
Final simplification90.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (pow z y))))
(if (<= y -1.12e+51)
t_1
(if (<= y 3.6e-24)
(* x (exp (* a (- b))))
(if (or (<= y 2e+115) (and (not (<= y 1.4e+191)) (<= y 2e+283)))
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.12e+51) {
tmp = t_1;
} else if (y <= 3.6e-24) {
tmp = x * exp((a * -b));
} else if ((y <= 2e+115) || (!(y <= 1.4e+191) && (y <= 2e+283))) {
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.12d+51)) then
tmp = t_1
else if (y <= 3.6d-24) then
tmp = x * exp((a * -b))
else if ((y <= 2d+115) .or. (.not. (y <= 1.4d+191)) .and. (y <= 2d+283)) 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.12e+51) {
tmp = t_1;
} else if (y <= 3.6e-24) {
tmp = x * Math.exp((a * -b));
} else if ((y <= 2e+115) || (!(y <= 1.4e+191) && (y <= 2e+283))) {
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.12e+51: tmp = t_1 elif y <= 3.6e-24: tmp = x * math.exp((a * -b)) elif (y <= 2e+115) or (not (y <= 1.4e+191) and (y <= 2e+283)): 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.12e+51) tmp = t_1; elseif (y <= 3.6e-24) tmp = Float64(x * exp(Float64(a * Float64(-b)))); elseif ((y <= 2e+115) || (!(y <= 1.4e+191) && (y <= 2e+283))) 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.12e+51) tmp = t_1; elseif (y <= 3.6e-24) tmp = x * exp((a * -b)); elseif ((y <= 2e+115) || (~((y <= 1.4e+191)) && (y <= 2e+283))) 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.12e+51], t$95$1, If[LessEqual[y, 3.6e-24], N[(x * N[Exp[N[(a * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 2e+115], And[N[Not[LessEqual[y, 1.4e+191]], $MachinePrecision], LessEqual[y, 2e+283]]], 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.12 \cdot 10^{+51}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 3.6 \cdot 10^{-24}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\
\mathbf{elif}\;y \leq 2 \cdot 10^{+115} \lor \neg \left(y \leq 1.4 \cdot 10^{+191}\right) \land y \leq 2 \cdot 10^{+283}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{y \cdot \left(-t\right)}\\
\end{array}
\end{array}
if y < -1.11999999999999992e51 or 3.6000000000000001e-24 < y < 2e115 or 1.3999999999999999e191 < y < 1.99999999999999991e283Initial program 95.7%
Taylor expanded in y around inf 91.6%
Taylor expanded in t around 0 77.0%
if -1.11999999999999992e51 < y < 3.6000000000000001e-24Initial program 95.8%
Taylor expanded in b around inf 83.9%
mul-1-neg83.9%
distribute-rgt-neg-out83.9%
Simplified83.9%
if 2e115 < y < 1.3999999999999999e191 or 1.99999999999999991e283 < y Initial program 100.0%
Taylor expanded in t around inf 81.5%
mul-1-neg81.5%
distribute-lft-neg-out81.5%
*-commutative81.5%
Simplified81.5%
Final simplification81.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (exp (* a (- (+ z b)))))) (t_2 (* x (exp (* y (- t))))))
(if (<= t -1.45e+138)
t_2
(if (<= t -3.4e-84)
t_1
(if (<= t -2.5e-107) (* x (pow z y)) (if (<= t 1.15e-10) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * exp((a * -(z + b)));
double t_2 = x * exp((y * -t));
double tmp;
if (t <= -1.45e+138) {
tmp = t_2;
} else if (t <= -3.4e-84) {
tmp = t_1;
} else if (t <= -2.5e-107) {
tmp = x * pow(z, y);
} else if (t <= 1.15e-10) {
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 * -(z + b)))
t_2 = x * exp((y * -t))
if (t <= (-1.45d+138)) then
tmp = t_2
else if (t <= (-3.4d-84)) then
tmp = t_1
else if (t <= (-2.5d-107)) then
tmp = x * (z ** y)
else if (t <= 1.15d-10) 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 * -(z + b)));
double t_2 = x * Math.exp((y * -t));
double tmp;
if (t <= -1.45e+138) {
tmp = t_2;
} else if (t <= -3.4e-84) {
tmp = t_1;
} else if (t <= -2.5e-107) {
tmp = x * Math.pow(z, y);
} else if (t <= 1.15e-10) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * math.exp((a * -(z + b))) t_2 = x * math.exp((y * -t)) tmp = 0 if t <= -1.45e+138: tmp = t_2 elif t <= -3.4e-84: tmp = t_1 elif t <= -2.5e-107: tmp = x * math.pow(z, y) elif t <= 1.15e-10: 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(-Float64(z + b))))) t_2 = Float64(x * exp(Float64(y * Float64(-t)))) tmp = 0.0 if (t <= -1.45e+138) tmp = t_2; elseif (t <= -3.4e-84) tmp = t_1; elseif (t <= -2.5e-107) tmp = Float64(x * (z ^ y)); elseif (t <= 1.15e-10) 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 * -(z + b))); t_2 = x * exp((y * -t)); tmp = 0.0; if (t <= -1.45e+138) tmp = t_2; elseif (t <= -3.4e-84) tmp = t_1; elseif (t <= -2.5e-107) tmp = x * (z ^ y); elseif (t <= 1.15e-10) 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 * (-N[(z + b), $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[Exp[N[(y * (-t)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.45e+138], t$95$2, If[LessEqual[t, -3.4e-84], t$95$1, If[LessEqual[t, -2.5e-107], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.15e-10], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot e^{a \cdot \left(-\left(z + b\right)\right)}\\
t_2 := x \cdot e^{y \cdot \left(-t\right)}\\
\mathbf{if}\;t \leq -1.45 \cdot 10^{+138}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -3.4 \cdot 10^{-84}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -2.5 \cdot 10^{-107}:\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{-10}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -1.45000000000000005e138 or 1.15000000000000004e-10 < t Initial program 92.9%
Taylor expanded in t around inf 88.6%
mul-1-neg88.6%
distribute-lft-neg-out88.6%
*-commutative88.6%
Simplified88.6%
if -1.45000000000000005e138 < t < -3.40000000000000021e-84 or -2.49999999999999985e-107 < t < 1.15000000000000004e-10Initial program 97.6%
Taylor expanded in y around 0 77.7%
sub-neg77.7%
neg-mul-177.7%
log1p-def80.5%
neg-mul-180.5%
Simplified80.5%
Taylor expanded in z around 0 80.5%
associate-*r*80.5%
associate-*r*80.5%
distribute-lft-out80.5%
neg-mul-180.5%
Simplified80.5%
if -3.40000000000000021e-84 < t < -2.49999999999999985e-107Initial program 99.7%
Taylor expanded in y around inf 99.7%
Taylor expanded in t around 0 99.7%
Final simplification83.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.12e+51) (not (<= y 3.6e-24))) (* 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 <= -1.12e+51) || !(y <= 3.6e-24)) {
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 <= (-1.12d+51)) .or. (.not. (y <= 3.6d-24))) 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 <= -1.12e+51) || !(y <= 3.6e-24)) {
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 <= -1.12e+51) or not (y <= 3.6e-24): 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 <= -1.12e+51) || !(y <= 3.6e-24)) 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 <= -1.12e+51) || ~((y <= 3.6e-24))) 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, -1.12e+51], N[Not[LessEqual[y, 3.6e-24]], $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 -1.12 \cdot 10^{+51} \lor \neg \left(y \leq 3.6 \cdot 10^{-24}\right):\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\
\end{array}
\end{array}
if y < -1.11999999999999992e51 or 3.6000000000000001e-24 < y Initial program 96.5%
Taylor expanded in y around inf 91.4%
Taylor expanded in t around 0 70.1%
if -1.11999999999999992e51 < y < 3.6000000000000001e-24Initial program 95.8%
Taylor expanded in b around inf 83.9%
mul-1-neg83.9%
distribute-rgt-neg-out83.9%
Simplified83.9%
Final simplification77.7%
(FPCore (x y z t a b) :precision binary64 (if (<= t -3.2e+141) (* x (- 1.0 (* y t))) (if (<= t -7.2e+49) (- x (* (+ z b) (* x a))) (* x (pow z y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -3.2e+141) {
tmp = x * (1.0 - (y * t));
} else if (t <= -7.2e+49) {
tmp = x - ((z + b) * (x * a));
} 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 <= (-3.2d+141)) then
tmp = x * (1.0d0 - (y * t))
else if (t <= (-7.2d+49)) then
tmp = x - ((z + b) * (x * a))
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 <= -3.2e+141) {
tmp = x * (1.0 - (y * t));
} else if (t <= -7.2e+49) {
tmp = x - ((z + b) * (x * a));
} else {
tmp = x * Math.pow(z, y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -3.2e+141: tmp = x * (1.0 - (y * t)) elif t <= -7.2e+49: tmp = x - ((z + b) * (x * a)) else: tmp = x * math.pow(z, y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -3.2e+141) tmp = Float64(x * Float64(1.0 - Float64(y * t))); elseif (t <= -7.2e+49) tmp = Float64(x - Float64(Float64(z + b) * Float64(x * a))); 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 <= -3.2e+141) tmp = x * (1.0 - (y * t)); elseif (t <= -7.2e+49) tmp = x - ((z + b) * (x * a)); else tmp = x * (z ^ y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -3.2e+141], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -7.2e+49], N[(x - N[(N[(z + b), $MachinePrecision] * N[(x * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.2 \cdot 10^{+141}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\mathbf{elif}\;t \leq -7.2 \cdot 10^{+49}:\\
\;\;\;\;x - \left(z + b\right) \cdot \left(x \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot {z}^{y}\\
\end{array}
\end{array}
if t < -3.20000000000000019e141Initial program 93.4%
Taylor expanded in t around inf 96.7%
mul-1-neg96.7%
distribute-lft-neg-out96.7%
*-commutative96.7%
Simplified96.7%
Taylor expanded in y around 0 42.0%
mul-1-neg42.0%
*-commutative42.0%
unsub-neg42.0%
Simplified42.0%
if -3.20000000000000019e141 < t < -7.19999999999999993e49Initial program 96.1%
Taylor expanded in y around 0 84.5%
sub-neg84.5%
neg-mul-184.5%
log1p-def92.1%
neg-mul-192.1%
Simplified92.1%
Taylor expanded in z around 0 92.1%
associate-*r*92.1%
associate-*r*92.1%
distribute-lft-out92.1%
neg-mul-192.1%
Simplified92.1%
Taylor expanded in a around 0 44.0%
mul-1-neg44.0%
unsub-neg44.0%
*-commutative44.0%
*-commutative44.0%
associate-*l*47.8%
*-commutative47.8%
Simplified47.8%
if -7.19999999999999993e49 < t Initial program 96.5%
Taylor expanded in y around inf 68.7%
Taylor expanded in t around 0 63.0%
Final simplification59.1%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1.1e+55) (* t (* x (- y))) (if (<= y 15.8) (* x (- 1.0 (* a b))) (* y (* x (- t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.1e+55) {
tmp = t * (x * -y);
} else if (y <= 15.8) {
tmp = x * (1.0 - (a * b));
} 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) :: tmp
if (y <= (-1.1d+55)) then
tmp = t * (x * -y)
else if (y <= 15.8d0) then
tmp = x * (1.0d0 - (a * b))
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 tmp;
if (y <= -1.1e+55) {
tmp = t * (x * -y);
} else if (y <= 15.8) {
tmp = x * (1.0 - (a * b));
} else {
tmp = y * (x * -t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.1e+55: tmp = t * (x * -y) elif y <= 15.8: tmp = x * (1.0 - (a * b)) else: tmp = y * (x * -t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.1e+55) tmp = Float64(t * Float64(x * Float64(-y))); elseif (y <= 15.8) tmp = Float64(x * Float64(1.0 - Float64(a * b))); else tmp = Float64(y * Float64(x * Float64(-t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.1e+55) tmp = t * (x * -y); elseif (y <= 15.8) tmp = x * (1.0 - (a * b)); else tmp = y * (x * -t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.1e+55], N[(t * N[(x * (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 15.8], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(x * (-t)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.1 \cdot 10^{+55}:\\
\;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\
\mathbf{elif}\;y \leq 15.8:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(x \cdot \left(-t\right)\right)\\
\end{array}
\end{array}
if y < -1.10000000000000005e55Initial program 93.9%
Taylor expanded in t around inf 64.4%
mul-1-neg64.4%
distribute-lft-neg-out64.4%
*-commutative64.4%
Simplified64.4%
Taylor expanded in y around 0 32.6%
mul-1-neg32.6%
*-commutative32.6%
unsub-neg32.6%
Simplified32.6%
Taylor expanded in y around inf 36.8%
if -1.10000000000000005e55 < y < 15.800000000000001Initial program 96.0%
Taylor expanded in b around inf 83.0%
mul-1-neg83.0%
distribute-rgt-neg-out83.0%
Simplified83.0%
Taylor expanded in a around 0 45.3%
mul-1-neg45.3%
unsub-neg45.3%
Simplified45.3%
if 15.800000000000001 < y Initial program 98.3%
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 22.8%
mul-1-neg22.8%
*-commutative22.8%
unsub-neg22.8%
Simplified22.8%
Taylor expanded in y around inf 21.4%
mul-1-neg21.4%
associate-*r*30.7%
*-commutative30.7%
distribute-rgt-neg-in30.7%
distribute-rgt-neg-in30.7%
Simplified30.7%
Final simplification40.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -5e-25) (not (<= a 1.4e+93))) (* a (* x (- b))) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -5e-25) || !(a <= 1.4e+93)) {
tmp = a * (x * -b);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-5d-25)) .or. (.not. (a <= 1.4d+93))) then
tmp = a * (x * -b)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -5e-25) || !(a <= 1.4e+93)) {
tmp = a * (x * -b);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -5e-25) or not (a <= 1.4e+93): tmp = a * (x * -b) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -5e-25) || !(a <= 1.4e+93)) tmp = Float64(a * Float64(x * Float64(-b))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -5e-25) || ~((a <= 1.4e+93))) tmp = a * (x * -b); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -5e-25], N[Not[LessEqual[a, 1.4e+93]], $MachinePrecision]], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5 \cdot 10^{-25} \lor \neg \left(a \leq 1.4 \cdot 10^{+93}\right):\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -4.99999999999999962e-25 or 1.39999999999999994e93 < a Initial program 91.6%
Taylor expanded in b around inf 69.8%
mul-1-neg69.8%
distribute-rgt-neg-out69.8%
Simplified69.8%
Taylor expanded in a around 0 22.0%
mul-1-neg22.0%
unsub-neg22.0%
Simplified22.0%
Taylor expanded in a around inf 21.9%
mul-1-neg21.9%
associate-*r*19.6%
distribute-rgt-neg-in19.6%
Simplified19.6%
Taylor expanded in a around 0 21.9%
mul-1-neg21.9%
*-commutative21.9%
Simplified21.9%
if -4.99999999999999962e-25 < a < 1.39999999999999994e93Initial program 99.9%
Taylor expanded in b around inf 56.2%
mul-1-neg56.2%
distribute-rgt-neg-out56.2%
Simplified56.2%
Taylor expanded in a around 0 33.5%
Final simplification28.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -6.5e+14) (not (<= y 1.4e-7))) (* x (* y (- t))) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -6.5e+14) || !(y <= 1.4e-7)) {
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 ((y <= (-6.5d+14)) .or. (.not. (y <= 1.4d-7))) 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 ((y <= -6.5e+14) || !(y <= 1.4e-7)) {
tmp = x * (y * -t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -6.5e+14) or not (y <= 1.4e-7): tmp = x * (y * -t) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -6.5e+14) || !(y <= 1.4e-7)) tmp = Float64(x * Float64(y * Float64(-t))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -6.5e+14) || ~((y <= 1.4e-7))) tmp = x * (y * -t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -6.5e+14], N[Not[LessEqual[y, 1.4e-7]], $MachinePrecision]], N[(x * N[(y * (-t)), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.5 \cdot 10^{+14} \lor \neg \left(y \leq 1.4 \cdot 10^{-7}\right):\\
\;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -6.5e14 or 1.4000000000000001e-7 < y Initial program 95.8%
Taylor expanded in t around inf 59.8%
mul-1-neg59.8%
distribute-lft-neg-out59.8%
*-commutative59.8%
Simplified59.8%
Taylor expanded in y around 0 26.2%
mul-1-neg26.2%
*-commutative26.2%
unsub-neg26.2%
Simplified26.2%
Taylor expanded in y around inf 26.3%
mul-1-neg26.3%
distribute-lft-neg-in26.3%
*-commutative26.3%
associate-*r*28.7%
Simplified28.7%
if -6.5e14 < y < 1.4000000000000001e-7Initial program 96.4%
Taylor expanded in b around inf 84.7%
mul-1-neg84.7%
distribute-rgt-neg-out84.7%
Simplified84.7%
Taylor expanded in a around 0 37.7%
Final simplification33.5%
(FPCore (x y z t a b) :precision binary64 (if (<= y -2.22e+15) (* x (* y (- t))) (if (<= y 2.9e-9) x (* y (* x (- t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.22e+15) {
tmp = x * (y * -t);
} else if (y <= 2.9e-9) {
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) :: tmp
if (y <= (-2.22d+15)) then
tmp = x * (y * -t)
else if (y <= 2.9d-9) 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 tmp;
if (y <= -2.22e+15) {
tmp = x * (y * -t);
} else if (y <= 2.9e-9) {
tmp = x;
} else {
tmp = y * (x * -t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2.22e+15: tmp = x * (y * -t) elif y <= 2.9e-9: tmp = x else: tmp = y * (x * -t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2.22e+15) tmp = Float64(x * Float64(y * Float64(-t))); elseif (y <= 2.9e-9) tmp = x; else tmp = Float64(y * Float64(x * Float64(-t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -2.22e+15) tmp = x * (y * -t); elseif (y <= 2.9e-9) tmp = x; else tmp = y * (x * -t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.22e+15], N[(x * N[(y * (-t)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.9e-9], x, N[(y * N[(x * (-t)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.22 \cdot 10^{+15}:\\
\;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{-9}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(x \cdot \left(-t\right)\right)\\
\end{array}
\end{array}
if y < -2.22e15Initial program 93.1%
Taylor expanded in t around inf 63.2%
mul-1-neg63.2%
distribute-lft-neg-out63.2%
*-commutative63.2%
Simplified63.2%
Taylor expanded in y around 0 29.6%
mul-1-neg29.6%
*-commutative29.6%
unsub-neg29.6%
Simplified29.6%
Taylor expanded in y around inf 31.5%
mul-1-neg31.5%
distribute-lft-neg-in31.5%
*-commutative31.5%
associate-*r*29.9%
Simplified29.9%
if -2.22e15 < y < 2.89999999999999991e-9Initial program 96.4%
Taylor expanded in b around inf 84.7%
mul-1-neg84.7%
distribute-rgt-neg-out84.7%
Simplified84.7%
Taylor expanded in a around 0 37.7%
if 2.89999999999999991e-9 < y Initial program 98.3%
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 22.8%
mul-1-neg22.8%
*-commutative22.8%
unsub-neg22.8%
Simplified22.8%
Taylor expanded in y around inf 21.4%
mul-1-neg21.4%
associate-*r*30.7%
*-commutative30.7%
distribute-rgt-neg-in30.7%
distribute-rgt-neg-in30.7%
Simplified30.7%
Final simplification34.3%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1.7e+51) (* t (* x (- y))) (if (<= y 2.15e-7) x (* y (* x (- t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.7e+51) {
tmp = t * (x * -y);
} else if (y <= 2.15e-7) {
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) :: tmp
if (y <= (-1.7d+51)) then
tmp = t * (x * -y)
else if (y <= 2.15d-7) 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 tmp;
if (y <= -1.7e+51) {
tmp = t * (x * -y);
} else if (y <= 2.15e-7) {
tmp = x;
} else {
tmp = y * (x * -t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.7e+51: tmp = t * (x * -y) elif y <= 2.15e-7: tmp = x else: tmp = y * (x * -t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.7e+51) tmp = Float64(t * Float64(x * Float64(-y))); elseif (y <= 2.15e-7) tmp = x; else tmp = Float64(y * Float64(x * Float64(-t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.7e+51) tmp = t * (x * -y); elseif (y <= 2.15e-7) tmp = x; else tmp = y * (x * -t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.7e+51], N[(t * N[(x * (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.15e-7], x, N[(y * N[(x * (-t)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.7 \cdot 10^{+51}:\\
\;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\
\mathbf{elif}\;y \leq 2.15 \cdot 10^{-7}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(x \cdot \left(-t\right)\right)\\
\end{array}
\end{array}
if y < -1.69999999999999992e51Initial program 93.9%
Taylor expanded in t around inf 64.4%
mul-1-neg64.4%
distribute-lft-neg-out64.4%
*-commutative64.4%
Simplified64.4%
Taylor expanded in y around 0 32.6%
mul-1-neg32.6%
*-commutative32.6%
unsub-neg32.6%
Simplified32.6%
Taylor expanded in y around inf 36.8%
if -1.69999999999999992e51 < y < 2.1500000000000001e-7Initial program 96.0%
Taylor expanded in b around inf 83.0%
mul-1-neg83.0%
distribute-rgt-neg-out83.0%
Simplified83.0%
Taylor expanded in a around 0 35.5%
if 2.1500000000000001e-7 < y Initial program 98.3%
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 22.8%
mul-1-neg22.8%
*-commutative22.8%
unsub-neg22.8%
Simplified22.8%
Taylor expanded in y around inf 21.4%
mul-1-neg21.4%
associate-*r*30.7%
*-commutative30.7%
distribute-rgt-neg-in30.7%
distribute-rgt-neg-in30.7%
Simplified30.7%
Final simplification34.6%
(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.1%
Taylor expanded in b around inf 62.4%
mul-1-neg62.4%
distribute-rgt-neg-out62.4%
Simplified62.4%
Taylor expanded in a around 0 22.2%
Final simplification22.2%
herbie shell --seed 2023322
(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))))))