
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
}
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 - 1.0d0) * log(a))) - b))) / y
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 - 1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + ((t - 1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
}
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 - 1.0d0) * log(a))) - b))) / y
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 - 1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + ((t - 1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\end{array}
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (log a) (+ t -1.0))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + (log(a) * (t + -1.0))) - b))) / y;
}
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)) + (log(a) * (t + (-1.0d0)))) - b))) / y
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)) + (Math.log(a) * (t + -1.0))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + (math.log(a) * (t + -1.0))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(log(a) * Float64(t + -1.0))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + (log(a) * (t + -1.0))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[Log[a], $MachinePrecision] * N[(t + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \log a \cdot \left(t + -1\right)\right) - b}}{y}
\end{array}
Initial program 96.5%
Final simplification96.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -2.85e+34) (not (<= t 2e-69))) (/ (* x (exp (- (* (log a) (+ t -1.0)) b))) y) (* x (/ (exp (- (- (* y (log z)) (log a)) b)) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -2.85e+34) || !(t <= 2e-69)) {
tmp = (x * exp(((log(a) * (t + -1.0)) - b))) / y;
} else {
tmp = x * (exp((((y * log(z)) - log(a)) - b)) / 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.85d+34)) .or. (.not. (t <= 2d-69))) then
tmp = (x * exp(((log(a) * (t + (-1.0d0))) - b))) / y
else
tmp = x * (exp((((y * log(z)) - log(a)) - b)) / 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.85e+34) || !(t <= 2e-69)) {
tmp = (x * Math.exp(((Math.log(a) * (t + -1.0)) - b))) / y;
} else {
tmp = x * (Math.exp((((y * Math.log(z)) - Math.log(a)) - b)) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -2.85e+34) or not (t <= 2e-69): tmp = (x * math.exp(((math.log(a) * (t + -1.0)) - b))) / y else: tmp = x * (math.exp((((y * math.log(z)) - math.log(a)) - b)) / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -2.85e+34) || !(t <= 2e-69)) tmp = Float64(Float64(x * exp(Float64(Float64(log(a) * Float64(t + -1.0)) - b))) / y); else tmp = Float64(x * Float64(exp(Float64(Float64(Float64(y * log(z)) - log(a)) - b)) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -2.85e+34) || ~((t <= 2e-69))) tmp = (x * exp(((log(a) * (t + -1.0)) - b))) / y; else tmp = x * (exp((((y * log(z)) - log(a)) - b)) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -2.85e+34], N[Not[LessEqual[t, 2e-69]], $MachinePrecision]], N[(N[(x * N[Exp[N[(N[(N[Log[a], $MachinePrecision] * N[(t + -1.0), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x * N[(N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] - N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.85 \cdot 10^{+34} \lor \neg \left(t \leq 2 \cdot 10^{-69}\right):\\
\;\;\;\;\frac{x \cdot e^{\log a \cdot \left(t + -1\right) - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{e^{\left(y \cdot \log z - \log a\right) - b}}{y}\\
\end{array}
\end{array}
if t < -2.84999999999999987e34 or 1.9999999999999999e-69 < t Initial program 99.9%
*-commutative99.9%
associate-/l*86.7%
associate--l+86.7%
fma-define86.7%
fma-neg86.7%
sub-neg86.7%
metadata-eval86.7%
Simplified86.7%
Taylor expanded in y around 0 91.0%
if -2.84999999999999987e34 < t < 1.9999999999999999e-69Initial program 92.1%
*-commutative92.1%
associate-/l*89.5%
associate--l+89.5%
fma-define89.5%
fma-neg89.5%
sub-neg89.5%
metadata-eval89.5%
Simplified89.5%
Taylor expanded in t around 0 91.9%
associate-/l*94.4%
log-pow88.3%
+-commutative88.3%
mul-1-neg88.3%
unsub-neg88.3%
log-pow94.4%
Simplified94.4%
Final simplification92.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.1e+240) (not (<= y 2.7e+88))) (* x (/ (pow z y) y)) (/ (* x (exp (- (* (log a) (+ t -1.0)) b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.1e+240) || !(y <= 2.7e+88)) {
tmp = x * (pow(z, y) / y);
} else {
tmp = (x * exp(((log(a) * (t + -1.0)) - b))) / 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 ((y <= (-1.1d+240)) .or. (.not. (y <= 2.7d+88))) then
tmp = x * ((z ** y) / y)
else
tmp = (x * exp(((log(a) * (t + (-1.0d0))) - b))) / 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 ((y <= -1.1e+240) || !(y <= 2.7e+88)) {
tmp = x * (Math.pow(z, y) / y);
} else {
tmp = (x * Math.exp(((Math.log(a) * (t + -1.0)) - b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.1e+240) or not (y <= 2.7e+88): tmp = x * (math.pow(z, y) / y) else: tmp = (x * math.exp(((math.log(a) * (t + -1.0)) - b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.1e+240) || !(y <= 2.7e+88)) tmp = Float64(x * Float64((z ^ y) / y)); else tmp = Float64(Float64(x * exp(Float64(Float64(log(a) * Float64(t + -1.0)) - b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.1e+240) || ~((y <= 2.7e+88))) tmp = x * ((z ^ y) / y); else tmp = (x * exp(((log(a) * (t + -1.0)) - b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.1e+240], N[Not[LessEqual[y, 2.7e+88]], $MachinePrecision]], N[(x * N[(N[Power[z, y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[Exp[N[(N[(N[Log[a], $MachinePrecision] * N[(t + -1.0), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.1 \cdot 10^{+240} \lor \neg \left(y \leq 2.7 \cdot 10^{+88}\right):\\
\;\;\;\;x \cdot \frac{{z}^{y}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\log a \cdot \left(t + -1\right) - b}}{y}\\
\end{array}
\end{array}
if y < -1.1000000000000001e240 or 2.70000000000000016e88 < y Initial program 100.0%
*-commutative100.0%
associate-/l*85.0%
associate--l+85.0%
fma-define85.0%
fma-neg85.0%
sub-neg85.0%
metadata-eval85.0%
Simplified85.0%
Taylor expanded in y around inf 80.1%
Taylor expanded in y around inf 95.1%
associate-/l*95.1%
Simplified95.1%
if -1.1000000000000001e240 < y < 2.70000000000000016e88Initial program 95.4%
*-commutative95.4%
associate-/l*88.8%
associate--l+88.8%
fma-define88.8%
fma-neg88.8%
sub-neg88.8%
metadata-eval88.8%
Simplified88.8%
Taylor expanded in y around 0 90.7%
Final simplification91.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.02e+179) (not (<= y 1.95e+18))) (* x (/ (pow z y) y)) (* x (/ (/ (pow a (+ t -1.0)) (exp b)) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.02e+179) || !(y <= 1.95e+18)) {
tmp = x * (pow(z, y) / y);
} else {
tmp = x * ((pow(a, (t + -1.0)) / exp(b)) / 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 ((y <= (-1.02d+179)) .or. (.not. (y <= 1.95d+18))) then
tmp = x * ((z ** y) / y)
else
tmp = x * (((a ** (t + (-1.0d0))) / exp(b)) / 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 ((y <= -1.02e+179) || !(y <= 1.95e+18)) {
tmp = x * (Math.pow(z, y) / y);
} else {
tmp = x * ((Math.pow(a, (t + -1.0)) / Math.exp(b)) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.02e+179) or not (y <= 1.95e+18): tmp = x * (math.pow(z, y) / y) else: tmp = x * ((math.pow(a, (t + -1.0)) / math.exp(b)) / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.02e+179) || !(y <= 1.95e+18)) tmp = Float64(x * Float64((z ^ y) / y)); else tmp = Float64(x * Float64(Float64((a ^ Float64(t + -1.0)) / exp(b)) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.02e+179) || ~((y <= 1.95e+18))) tmp = x * ((z ^ y) / y); else tmp = x * (((a ^ (t + -1.0)) / exp(b)) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.02e+179], N[Not[LessEqual[y, 1.95e+18]], $MachinePrecision]], N[(x * N[(N[Power[z, y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / N[Exp[b], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.02 \cdot 10^{+179} \lor \neg \left(y \leq 1.95 \cdot 10^{+18}\right):\\
\;\;\;\;x \cdot \frac{{z}^{y}}{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{\frac{{a}^{\left(t + -1\right)}}{e^{b}}}{y}\\
\end{array}
\end{array}
if y < -1.0199999999999999e179 or 1.95e18 < y Initial program 100.0%
*-commutative100.0%
associate-/l*88.7%
associate--l+88.7%
fma-define88.7%
fma-neg88.7%
sub-neg88.7%
metadata-eval88.7%
Simplified88.7%
Taylor expanded in y around inf 80.6%
Taylor expanded in y around inf 90.9%
associate-/l*90.9%
Simplified90.9%
if -1.0199999999999999e179 < y < 1.95e18Initial program 94.4%
*-commutative94.4%
associate-/l*87.5%
associate--l+87.5%
fma-define87.5%
fma-neg87.5%
sub-neg87.5%
metadata-eval87.5%
Simplified87.5%
Taylor expanded in y around 0 92.2%
associate-/l*93.4%
div-exp82.1%
exp-to-pow83.0%
sub-neg83.0%
metadata-eval83.0%
Simplified83.0%
Final simplification86.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (pow a (+ t -1.0))) y)) (t_2 (* x (/ (pow z y) y))))
(if (<= y -6.6e+126)
t_2
(if (<= y 1.4e-275)
t_1
(if (<= y 3.5e-239)
(/ x (* a (* y (exp b))))
(if (<= y 1.8e+88) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * pow(a, (t + -1.0))) / y;
double t_2 = x * (pow(z, y) / y);
double tmp;
if (y <= -6.6e+126) {
tmp = t_2;
} else if (y <= 1.4e-275) {
tmp = t_1;
} else if (y <= 3.5e-239) {
tmp = x / (a * (y * exp(b)));
} else if (y <= 1.8e+88) {
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 * (a ** (t + (-1.0d0)))) / y
t_2 = x * ((z ** y) / y)
if (y <= (-6.6d+126)) then
tmp = t_2
else if (y <= 1.4d-275) then
tmp = t_1
else if (y <= 3.5d-239) then
tmp = x / (a * (y * exp(b)))
else if (y <= 1.8d+88) 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.pow(a, (t + -1.0))) / y;
double t_2 = x * (Math.pow(z, y) / y);
double tmp;
if (y <= -6.6e+126) {
tmp = t_2;
} else if (y <= 1.4e-275) {
tmp = t_1;
} else if (y <= 3.5e-239) {
tmp = x / (a * (y * Math.exp(b)));
} else if (y <= 1.8e+88) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x * math.pow(a, (t + -1.0))) / y t_2 = x * (math.pow(z, y) / y) tmp = 0 if y <= -6.6e+126: tmp = t_2 elif y <= 1.4e-275: tmp = t_1 elif y <= 3.5e-239: tmp = x / (a * (y * math.exp(b))) elif y <= 1.8e+88: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * (a ^ Float64(t + -1.0))) / y) t_2 = Float64(x * Float64((z ^ y) / y)) tmp = 0.0 if (y <= -6.6e+126) tmp = t_2; elseif (y <= 1.4e-275) tmp = t_1; elseif (y <= 3.5e-239) tmp = Float64(x / Float64(a * Float64(y * exp(b)))); elseif (y <= 1.8e+88) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x * (a ^ (t + -1.0))) / y; t_2 = x * ((z ^ y) / y); tmp = 0.0; if (y <= -6.6e+126) tmp = t_2; elseif (y <= 1.4e-275) tmp = t_1; elseif (y <= 3.5e-239) tmp = x / (a * (y * exp(b))); elseif (y <= 1.8e+88) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[Power[z, y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.6e+126], t$95$2, If[LessEqual[y, 1.4e-275], t$95$1, If[LessEqual[y, 3.5e-239], N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.8e+88], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
t_2 := x \cdot \frac{{z}^{y}}{y}\\
\mathbf{if}\;y \leq -6.6 \cdot 10^{+126}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{-275}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{-239}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{+88}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -6.60000000000000026e126 or 1.8000000000000001e88 < y Initial program 100.0%
*-commutative100.0%
associate-/l*86.6%
associate--l+86.6%
fma-define86.6%
fma-neg86.6%
sub-neg86.6%
metadata-eval86.6%
Simplified86.6%
Taylor expanded in y around inf 79.4%
Taylor expanded in y around inf 92.8%
associate-/l*92.8%
Simplified92.8%
if -6.60000000000000026e126 < y < 1.39999999999999997e-275 or 3.50000000000000005e-239 < y < 1.8000000000000001e88Initial program 96.4%
*-commutative96.4%
associate-/l*88.3%
associate--l+88.3%
fma-define88.3%
fma-neg88.3%
sub-neg88.3%
metadata-eval88.3%
Simplified88.3%
Taylor expanded in y around 0 92.0%
Taylor expanded in b around 0 76.7%
Simplified77.4%
if 1.39999999999999997e-275 < y < 3.50000000000000005e-239Initial program 62.9%
*-commutative62.9%
associate-/l*95.0%
associate--l+95.0%
fma-define95.0%
fma-neg95.0%
sub-neg95.0%
metadata-eval95.0%
Simplified95.0%
Taylor expanded in y around 0 95.0%
div-exp94.8%
exp-to-pow99.4%
sub-neg99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in t around 0 88.2%
Final simplification82.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.1e+127) (not (<= y 1.5e+18))) (* x (/ (pow z y) y)) (* (pow a (+ t -1.0)) (/ x y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.1e+127) || !(y <= 1.5e+18)) {
tmp = x * (pow(z, y) / y);
} else {
tmp = pow(a, (t + -1.0)) * (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 ((y <= (-1.1d+127)) .or. (.not. (y <= 1.5d+18))) then
tmp = x * ((z ** y) / y)
else
tmp = (a ** (t + (-1.0d0))) * (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 ((y <= -1.1e+127) || !(y <= 1.5e+18)) {
tmp = x * (Math.pow(z, y) / y);
} else {
tmp = Math.pow(a, (t + -1.0)) * (x / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.1e+127) or not (y <= 1.5e+18): tmp = x * (math.pow(z, y) / y) else: tmp = math.pow(a, (t + -1.0)) * (x / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.1e+127) || !(y <= 1.5e+18)) tmp = Float64(x * Float64((z ^ y) / y)); else tmp = Float64((a ^ Float64(t + -1.0)) * Float64(x / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.1e+127) || ~((y <= 1.5e+18))) tmp = x * ((z ^ y) / y); else tmp = (a ^ (t + -1.0)) * (x / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.1e+127], N[Not[LessEqual[y, 1.5e+18]], $MachinePrecision]], N[(x * N[(N[Power[z, y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.1 \cdot 10^{+127} \lor \neg \left(y \leq 1.5 \cdot 10^{+18}\right):\\
\;\;\;\;x \cdot \frac{{z}^{y}}{y}\\
\mathbf{else}:\\
\;\;\;\;{a}^{\left(t + -1\right)} \cdot \frac{x}{y}\\
\end{array}
\end{array}
if y < -1.1000000000000001e127 or 1.5e18 < y Initial program 100.0%
*-commutative100.0%
associate-/l*88.3%
associate--l+88.3%
fma-define88.3%
fma-neg88.3%
sub-neg88.3%
metadata-eval88.3%
Simplified88.3%
Taylor expanded in y around inf 79.7%
Taylor expanded in y around inf 90.4%
associate-/l*90.4%
Simplified90.4%
if -1.1000000000000001e127 < y < 1.5e18Initial program 94.1%
*-commutative94.1%
associate-/l*87.7%
associate--l+87.7%
fma-define87.7%
fma-neg87.7%
sub-neg87.7%
metadata-eval87.7%
Simplified87.7%
Taylor expanded in y around 0 91.9%
Taylor expanded in b around 0 73.9%
*-commutative73.9%
exp-to-pow74.7%
sub-neg74.7%
metadata-eval74.7%
associate-*r/69.3%
*-commutative69.3%
+-commutative69.3%
Simplified69.3%
Final simplification77.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -20500000.0) (not (<= y 8.8e+17))) (* x (/ (pow z y) y)) (/ x (* a (* y (exp b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -20500000.0) || !(y <= 8.8e+17)) {
tmp = x * (pow(z, y) / y);
} else {
tmp = x / (a * (y * exp(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 <= (-20500000.0d0)) .or. (.not. (y <= 8.8d+17))) then
tmp = x * ((z ** y) / y)
else
tmp = x / (a * (y * exp(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 <= -20500000.0) || !(y <= 8.8e+17)) {
tmp = x * (Math.pow(z, y) / y);
} else {
tmp = x / (a * (y * Math.exp(b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -20500000.0) or not (y <= 8.8e+17): tmp = x * (math.pow(z, y) / y) else: tmp = x / (a * (y * math.exp(b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -20500000.0) || !(y <= 8.8e+17)) tmp = Float64(x * Float64((z ^ y) / y)); else tmp = Float64(x / Float64(a * Float64(y * exp(b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -20500000.0) || ~((y <= 8.8e+17))) tmp = x * ((z ^ y) / y); else tmp = x / (a * (y * exp(b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -20500000.0], N[Not[LessEqual[y, 8.8e+17]], $MachinePrecision]], N[(x * N[(N[Power[z, y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -20500000 \lor \neg \left(y \leq 8.8 \cdot 10^{+17}\right):\\
\;\;\;\;x \cdot \frac{{z}^{y}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\end{array}
\end{array}
if y < -2.05e7 or 8.8e17 < y Initial program 100.0%
*-commutative100.0%
associate-/l*90.5%
associate--l+90.5%
fma-define90.5%
fma-neg90.5%
sub-neg90.5%
metadata-eval90.5%
Simplified90.5%
Taylor expanded in y around inf 78.0%
Taylor expanded in y around inf 86.7%
associate-/l*86.7%
Simplified86.7%
if -2.05e7 < y < 8.8e17Initial program 93.1%
*-commutative93.1%
associate-/l*85.5%
associate--l+85.5%
fma-define85.5%
fma-neg85.5%
sub-neg85.5%
metadata-eval85.5%
Simplified85.5%
Taylor expanded in y around 0 85.2%
div-exp75.1%
exp-to-pow76.5%
sub-neg76.5%
metadata-eval76.5%
Simplified76.5%
Taylor expanded in t around 0 62.3%
Final simplification74.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.6e-6) (not (<= y 1020000000000.0))) (* x (/ (pow z y) y)) (/ (/ x y) a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.6e-6) || !(y <= 1020000000000.0)) {
tmp = x * (pow(z, y) / y);
} else {
tmp = (x / y) / 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 <= (-1.6d-6)) .or. (.not. (y <= 1020000000000.0d0))) then
tmp = x * ((z ** y) / y)
else
tmp = (x / y) / 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 <= -1.6e-6) || !(y <= 1020000000000.0)) {
tmp = x * (Math.pow(z, y) / y);
} else {
tmp = (x / y) / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.6e-6) or not (y <= 1020000000000.0): tmp = x * (math.pow(z, y) / y) else: tmp = (x / y) / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.6e-6) || !(y <= 1020000000000.0)) tmp = Float64(x * Float64((z ^ y) / y)); else tmp = Float64(Float64(x / y) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.6e-6) || ~((y <= 1020000000000.0))) tmp = x * ((z ^ y) / y); else tmp = (x / y) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.6e-6], N[Not[LessEqual[y, 1020000000000.0]], $MachinePrecision]], N[(x * N[(N[Power[z, y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.6 \cdot 10^{-6} \lor \neg \left(y \leq 1020000000000\right):\\
\;\;\;\;x \cdot \frac{{z}^{y}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{a}\\
\end{array}
\end{array}
if y < -1.5999999999999999e-6 or 1.02e12 < y Initial program 100.0%
*-commutative100.0%
associate-/l*90.9%
associate--l+90.9%
fma-define90.9%
fma-neg90.9%
sub-neg90.9%
metadata-eval90.9%
Simplified90.9%
Taylor expanded in y around inf 76.0%
Taylor expanded in y around inf 84.4%
associate-/l*84.4%
Simplified84.4%
if -1.5999999999999999e-6 < y < 1.02e12Initial program 92.8%
*-commutative92.8%
associate-/l*84.8%
associate--l+84.8%
fma-define84.8%
fma-neg84.8%
sub-neg84.8%
metadata-eval84.8%
Simplified84.8%
Taylor expanded in y around 0 84.4%
div-exp73.9%
exp-to-pow75.3%
sub-neg75.3%
metadata-eval75.3%
Simplified75.3%
Taylor expanded in t around 0 61.3%
Taylor expanded in b around 0 37.6%
Taylor expanded in b around 0 37.1%
*-commutative37.1%
associate-/r*42.0%
Simplified42.0%
Final simplification63.9%
(FPCore (x y z t a b) :precision binary64 (if (<= a 3.5e-143) (/ (/ x a) y) (/ x (* a (+ y (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= 3.5e-143) {
tmp = (x / a) / y;
} else {
tmp = x / (a * (y + (y * 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 <= 3.5d-143) then
tmp = (x / a) / y
else
tmp = x / (a * (y + (y * 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 <= 3.5e-143) {
tmp = (x / a) / y;
} else {
tmp = x / (a * (y + (y * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= 3.5e-143: tmp = (x / a) / y else: tmp = x / (a * (y + (y * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= 3.5e-143) tmp = Float64(Float64(x / a) / y); else tmp = Float64(x / Float64(a * Float64(y + Float64(y * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= 3.5e-143) tmp = (x / a) / y; else tmp = x / (a * (y + (y * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, 3.5e-143], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(a * N[(y + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 3.5 \cdot 10^{-143}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y + y \cdot b\right)}\\
\end{array}
\end{array}
if a < 3.50000000000000005e-143Initial program 97.6%
*-commutative97.6%
associate-/l*88.6%
associate--l+88.6%
fma-define88.6%
fma-neg88.6%
sub-neg88.6%
metadata-eval88.6%
Simplified88.6%
Taylor expanded in y around 0 71.1%
div-exp65.1%
exp-to-pow66.0%
sub-neg66.0%
metadata-eval66.0%
Simplified66.0%
Taylor expanded in t around 0 51.1%
Taylor expanded in b around 0 32.3%
associate-/r*47.0%
Simplified47.0%
if 3.50000000000000005e-143 < a Initial program 96.1%
*-commutative96.1%
associate-/l*87.7%
associate--l+87.7%
fma-define87.7%
fma-neg87.7%
sub-neg87.7%
metadata-eval87.7%
Simplified87.7%
Taylor expanded in y around 0 75.6%
div-exp63.9%
exp-to-pow64.5%
sub-neg64.5%
metadata-eval64.5%
Simplified64.5%
Taylor expanded in t around 0 55.4%
Taylor expanded in b around 0 37.2%
Final simplification39.7%
(FPCore (x y z t a b) :precision binary64 (if (<= b 8.6e+131) (/ (/ x y) a) (/ x (* a (* y b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 8.6e+131) {
tmp = (x / y) / a;
} else {
tmp = x / (a * (y * 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 (b <= 8.6d+131) then
tmp = (x / y) / a
else
tmp = x / (a * (y * 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 (b <= 8.6e+131) {
tmp = (x / y) / a;
} else {
tmp = x / (a * (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 8.6e+131: tmp = (x / y) / a else: tmp = x / (a * (y * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 8.6e+131) tmp = Float64(Float64(x / y) / a); else tmp = Float64(x / Float64(a * Float64(y * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= 8.6e+131) tmp = (x / y) / a; else tmp = x / (a * (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 8.6e+131], N[(N[(x / y), $MachinePrecision] / a), $MachinePrecision], N[(x / N[(a * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 8.6 \cdot 10^{+131}:\\
\;\;\;\;\frac{\frac{x}{y}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot b\right)}\\
\end{array}
\end{array}
if b < 8.6000000000000003e131Initial program 96.0%
*-commutative96.0%
associate-/l*88.0%
associate--l+88.0%
fma-define88.0%
fma-neg88.0%
sub-neg88.0%
metadata-eval88.0%
Simplified88.0%
Taylor expanded in y around 0 72.5%
div-exp64.5%
exp-to-pow65.3%
sub-neg65.3%
metadata-eval65.3%
Simplified65.3%
Taylor expanded in t around 0 49.9%
Taylor expanded in b around 0 31.6%
Taylor expanded in b around 0 32.7%
*-commutative32.7%
associate-/r*35.0%
Simplified35.0%
if 8.6000000000000003e131 < b Initial program 100.0%
*-commutative100.0%
associate-/l*87.5%
associate--l+87.5%
fma-define87.5%
fma-neg87.5%
sub-neg87.5%
metadata-eval87.5%
Simplified87.5%
Taylor expanded in y around 0 87.5%
div-exp62.5%
exp-to-pow62.5%
sub-neg62.5%
metadata-eval62.5%
Simplified62.5%
Taylor expanded in t around 0 84.6%
Taylor expanded in b around 0 53.3%
Taylor expanded in b around inf 53.3%
*-commutative53.3%
Simplified53.3%
Final simplification37.3%
(FPCore (x y z t a b) :precision binary64 (if (<= t 5.6e+66) (/ x (* y a)) (/ x y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= 5.6e+66) {
tmp = x / (y * a);
} else {
tmp = 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.6d+66) then
tmp = x / (y * a)
else
tmp = 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.6e+66) {
tmp = x / (y * a);
} else {
tmp = x / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= 5.6e+66: tmp = x / (y * a) else: tmp = x / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= 5.6e+66) tmp = Float64(x / Float64(y * a)); else tmp = Float64(x / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= 5.6e+66) tmp = x / (y * a); else tmp = x / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, 5.6e+66], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision], N[(x / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 5.6 \cdot 10^{+66}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\end{array}
if t < 5.6000000000000001e66Initial program 95.4%
*-commutative95.4%
associate-/l*87.2%
associate--l+87.2%
fma-define87.2%
fma-neg87.2%
sub-neg87.2%
metadata-eval87.2%
Simplified87.2%
Taylor expanded in y around 0 73.4%
div-exp64.6%
exp-to-pow65.5%
sub-neg65.5%
metadata-eval65.5%
Simplified65.5%
Taylor expanded in t around 0 61.7%
Taylor expanded in b around 0 38.8%
if 5.6000000000000001e66 < t Initial program 100.0%
*-commutative100.0%
associate-/l*90.3%
associate--l+90.3%
fma-define90.3%
fma-neg90.3%
sub-neg90.3%
metadata-eval90.3%
Simplified90.3%
Taylor expanded in y around inf 51.2%
Taylor expanded in y around 0 18.0%
Final simplification33.8%
(FPCore (x y z t a b) :precision binary64 (if (<= a 1e-142) (/ (/ x a) y) (/ x (* y a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= 1e-142) {
tmp = (x / a) / y;
} else {
tmp = x / (y * 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 (a <= 1d-142) then
tmp = (x / a) / y
else
tmp = x / (y * 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 (a <= 1e-142) {
tmp = (x / a) / y;
} else {
tmp = x / (y * a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= 1e-142: tmp = (x / a) / y else: tmp = x / (y * a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= 1e-142) tmp = Float64(Float64(x / a) / y); else tmp = Float64(x / Float64(y * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= 1e-142) tmp = (x / a) / y; else tmp = x / (y * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, 1e-142], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 10^{-142}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\end{array}
\end{array}
if a < 1e-142Initial program 97.6%
*-commutative97.6%
associate-/l*88.9%
associate--l+88.9%
fma-define88.9%
fma-neg88.9%
sub-neg88.9%
metadata-eval88.9%
Simplified88.9%
Taylor expanded in y around 0 72.0%
div-exp66.1%
exp-to-pow67.0%
sub-neg67.0%
metadata-eval67.0%
Simplified67.0%
Taylor expanded in t around 0 51.1%
Taylor expanded in b around 0 31.5%
associate-/r*45.7%
Simplified45.7%
if 1e-142 < a Initial program 96.1%
*-commutative96.1%
associate-/l*87.6%
associate--l+87.6%
fma-define87.6%
fma-neg87.6%
sub-neg87.6%
metadata-eval87.6%
Simplified87.6%
Taylor expanded in y around 0 75.3%
div-exp63.6%
exp-to-pow64.2%
sub-neg64.2%
metadata-eval64.2%
Simplified64.2%
Taylor expanded in t around 0 55.4%
Taylor expanded in b around 0 32.2%
Final simplification35.9%
(FPCore (x y z t a b) :precision binary64 (if (<= a 2e-64) (/ (/ x a) y) (/ (/ x y) a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= 2e-64) {
tmp = (x / a) / y;
} else {
tmp = (x / y) / 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 (a <= 2d-64) then
tmp = (x / a) / y
else
tmp = (x / y) / 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 (a <= 2e-64) {
tmp = (x / a) / y;
} else {
tmp = (x / y) / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= 2e-64: tmp = (x / a) / y else: tmp = (x / y) / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= 2e-64) tmp = Float64(Float64(x / a) / y); else tmp = Float64(Float64(x / y) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= 2e-64) tmp = (x / a) / y; else tmp = (x / y) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, 2e-64], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2 \cdot 10^{-64}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{a}\\
\end{array}
\end{array}
if a < 1.99999999999999993e-64Initial program 97.8%
*-commutative97.8%
associate-/l*86.7%
associate--l+86.7%
fma-define86.7%
fma-neg86.7%
sub-neg86.7%
metadata-eval86.7%
Simplified86.7%
Taylor expanded in y around 0 71.6%
div-exp62.7%
exp-to-pow63.7%
sub-neg63.7%
metadata-eval63.7%
Simplified63.7%
Taylor expanded in t around 0 51.7%
Taylor expanded in b around 0 31.3%
associate-/r*42.2%
Simplified42.2%
if 1.99999999999999993e-64 < a Initial program 95.8%
*-commutative95.8%
associate-/l*88.6%
associate--l+88.6%
fma-define88.6%
fma-neg88.6%
sub-neg88.6%
metadata-eval88.6%
Simplified88.6%
Taylor expanded in y around 0 75.9%
div-exp65.1%
exp-to-pow65.6%
sub-neg65.6%
metadata-eval65.6%
Simplified65.6%
Taylor expanded in t around 0 55.7%
Taylor expanded in b around 0 37.4%
Taylor expanded in b around 0 32.4%
*-commutative32.4%
associate-/r*33.1%
Simplified33.1%
Final simplification36.3%
(FPCore (x y z t a b) :precision binary64 (/ x y))
double code(double x, double y, double z, double t, double a, double b) {
return x / y;
}
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 / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x / y;
}
def code(x, y, z, t, a, b): return x / y
function code(x, y, z, t, a, b) return Float64(x / y) end
function tmp = code(x, y, z, t, a, b) tmp = x / y; end
code[x_, y_, z_, t_, a_, b_] := N[(x / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y}
\end{array}
Initial program 96.5%
*-commutative96.5%
associate-/l*87.9%
associate--l+87.9%
fma-define87.9%
fma-neg87.9%
sub-neg87.9%
metadata-eval87.9%
Simplified87.9%
Taylor expanded in y around inf 46.6%
Taylor expanded in y around 0 13.9%
Final simplification13.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (pow a (- t 1.0)))
(t_2 (/ (* x (/ t_1 y)) (- (+ b 1.0) (* y (log z))))))
(if (< t -0.8845848504127471)
t_2
(if (< t 852031.2288374073)
(/ (* (/ x y) t_1) (exp (- b (* (log z) y))))
t_2))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = pow(a, (t - 1.0));
double t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * log(z)));
double tmp;
if (t < -0.8845848504127471) {
tmp = t_2;
} else if (t < 852031.2288374073) {
tmp = ((x / y) * t_1) / exp((b - (log(z) * y)));
} 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 ** (t - 1.0d0)
t_2 = (x * (t_1 / y)) / ((b + 1.0d0) - (y * log(z)))
if (t < (-0.8845848504127471d0)) then
tmp = t_2
else if (t < 852031.2288374073d0) then
tmp = ((x / y) * t_1) / exp((b - (log(z) * y)))
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 = Math.pow(a, (t - 1.0));
double t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * Math.log(z)));
double tmp;
if (t < -0.8845848504127471) {
tmp = t_2;
} else if (t < 852031.2288374073) {
tmp = ((x / y) * t_1) / Math.exp((b - (Math.log(z) * y)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = math.pow(a, (t - 1.0)) t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * math.log(z))) tmp = 0 if t < -0.8845848504127471: tmp = t_2 elif t < 852031.2288374073: tmp = ((x / y) * t_1) / math.exp((b - (math.log(z) * y))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = a ^ Float64(t - 1.0) t_2 = Float64(Float64(x * Float64(t_1 / y)) / Float64(Float64(b + 1.0) - Float64(y * log(z)))) tmp = 0.0 if (t < -0.8845848504127471) tmp = t_2; elseif (t < 852031.2288374073) tmp = Float64(Float64(Float64(x / y) * t_1) / exp(Float64(b - Float64(log(z) * y)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a ^ (t - 1.0); t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * log(z))); tmp = 0.0; if (t < -0.8845848504127471) tmp = t_2; elseif (t < 852031.2288374073) tmp = ((x / y) * t_1) / exp((b - (log(z) * y))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision] / N[(N[(b + 1.0), $MachinePrecision] - N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -0.8845848504127471], t$95$2, If[Less[t, 852031.2288374073], N[(N[(N[(x / y), $MachinePrecision] * t$95$1), $MachinePrecision] / N[Exp[N[(b - N[(N[Log[z], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {a}^{\left(t - 1\right)}\\
t_2 := \frac{x \cdot \frac{t\_1}{y}}{\left(b + 1\right) - y \cdot \log z}\\
\mathbf{if}\;t < -0.8845848504127471:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t < 852031.2288374073:\\
\;\;\;\;\frac{\frac{x}{y} \cdot t\_1}{e^{b - \log z \cdot y}}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024046
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:incompleteBetaWorker from math-functions-0.1.5.2, A"
:precision binary64
:alt
(if (< t -0.8845848504127471) (/ (* x (/ (pow a (- t 1.0)) y)) (- (+ b 1.0) (* y (log z)))) (if (< t 852031.2288374073) (/ (* (/ x y) (pow a (- t 1.0))) (exp (- b (* (log z) y)))) (/ (* x (/ (pow a (- t 1.0)) y)) (- (+ b 1.0) (* y (log z))))))
(/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))