
(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 24 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 98.0%
Final simplification98.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2e-43) (not (<= y 1.3e+65))) (/ (* x (exp (- (- (* y (log z)) (log a)) b))) y) (/ (exp (- (+ (log x) (* (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 <= -2e-43) || !(y <= 1.3e+65)) {
tmp = (x * exp((((y * log(z)) - log(a)) - b))) / y;
} else {
tmp = exp(((log(x) + (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 <= (-2d-43)) .or. (.not. (y <= 1.3d+65))) then
tmp = (x * exp((((y * log(z)) - log(a)) - b))) / y
else
tmp = exp(((log(x) + (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 <= -2e-43) || !(y <= 1.3e+65)) {
tmp = (x * Math.exp((((y * Math.log(z)) - Math.log(a)) - b))) / y;
} else {
tmp = Math.exp(((Math.log(x) + (Math.log(a) * (t + -1.0))) - b)) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2e-43) or not (y <= 1.3e+65): tmp = (x * math.exp((((y * math.log(z)) - math.log(a)) - b))) / y else: tmp = math.exp(((math.log(x) + (math.log(a) * (t + -1.0))) - b)) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -2e-43) || !(y <= 1.3e+65)) tmp = Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) - log(a)) - b))) / y); else tmp = Float64(exp(Float64(Float64(log(x) + 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 <= -2e-43) || ~((y <= 1.3e+65))) tmp = (x * exp((((y * log(z)) - log(a)) - b))) / y; else tmp = exp(((log(x) + (log(a) * (t + -1.0))) - b)) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2e-43], N[Not[LessEqual[y, 1.3e+65]], $MachinePrecision]], N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] - N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[Exp[N[(N[(N[Log[x], $MachinePrecision] + N[(N[Log[a], $MachinePrecision] * N[(t + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{-43} \lor \neg \left(y \leq 1.3 \cdot 10^{+65}\right):\\
\;\;\;\;\frac{x \cdot e^{\left(y \cdot \log z - \log a\right) - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{\left(\log x + \log a \cdot \left(t + -1\right)\right) - b}}{y}\\
\end{array}
\end{array}
if y < -2.00000000000000015e-43 or 1.30000000000000001e65 < y Initial program 99.7%
Taylor expanded in t around 0 92.0%
+-commutative92.0%
mul-1-neg92.0%
unsub-neg92.0%
Simplified92.0%
if -2.00000000000000015e-43 < y < 1.30000000000000001e65Initial program 96.3%
add-exp-log65.0%
*-commutative65.0%
associate--l+65.0%
sub-neg65.0%
metadata-eval65.0%
fma-undefine65.0%
log-prod47.0%
Applied egg-rr47.6%
Taylor expanded in y around 0 47.6%
Final simplification69.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2.1e+50) (not (<= y 5e+209))) (/ (exp (* y (log z))) y) (/ (exp (- (+ (log x) (* (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 <= -2.1e+50) || !(y <= 5e+209)) {
tmp = exp((y * log(z))) / y;
} else {
tmp = exp(((log(x) + (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 <= (-2.1d+50)) .or. (.not. (y <= 5d+209))) then
tmp = exp((y * log(z))) / y
else
tmp = exp(((log(x) + (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 <= -2.1e+50) || !(y <= 5e+209)) {
tmp = Math.exp((y * Math.log(z))) / y;
} else {
tmp = Math.exp(((Math.log(x) + (Math.log(a) * (t + -1.0))) - b)) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2.1e+50) or not (y <= 5e+209): tmp = math.exp((y * math.log(z))) / y else: tmp = math.exp(((math.log(x) + (math.log(a) * (t + -1.0))) - b)) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -2.1e+50) || !(y <= 5e+209)) tmp = Float64(exp(Float64(y * log(z))) / y); else tmp = Float64(exp(Float64(Float64(log(x) + 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 <= -2.1e+50) || ~((y <= 5e+209))) tmp = exp((y * log(z))) / y; else tmp = exp(((log(x) + (log(a) * (t + -1.0))) - b)) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2.1e+50], N[Not[LessEqual[y, 5e+209]], $MachinePrecision]], N[(N[Exp[N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision], N[(N[Exp[N[(N[(N[Log[x], $MachinePrecision] + N[(N[Log[a], $MachinePrecision] * N[(t + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.1 \cdot 10^{+50} \lor \neg \left(y \leq 5 \cdot 10^{+209}\right):\\
\;\;\;\;\frac{e^{y \cdot \log z}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{\left(\log x + \log a \cdot \left(t + -1\right)\right) - b}}{y}\\
\end{array}
\end{array}
if y < -2.1e50 or 4.99999999999999964e209 < y Initial program 100.0%
add-exp-log74.3%
*-commutative74.3%
associate--l+74.3%
sub-neg74.3%
metadata-eval74.3%
fma-undefine74.3%
log-prod51.4%
Applied egg-rr51.4%
Taylor expanded in y around inf 63.7%
if -2.1e50 < y < 4.99999999999999964e209Initial program 97.2%
add-exp-log62.7%
*-commutative62.7%
associate--l+62.7%
sub-neg62.7%
metadata-eval62.7%
fma-undefine62.7%
log-prod45.6%
Applied egg-rr46.0%
Taylor expanded in y around 0 45.5%
Final simplification50.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -3.2e+50) (not (<= y 4e+209))) (/ (exp (* y (log z))) 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 <= -3.2e+50) || !(y <= 4e+209)) {
tmp = exp((y * log(z))) / 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 <= (-3.2d+50)) .or. (.not. (y <= 4d+209))) then
tmp = exp((y * log(z))) / 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 <= -3.2e+50) || !(y <= 4e+209)) {
tmp = Math.exp((y * Math.log(z))) / 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 <= -3.2e+50) or not (y <= 4e+209): tmp = math.exp((y * math.log(z))) / 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 <= -3.2e+50) || !(y <= 4e+209)) tmp = Float64(exp(Float64(y * log(z))) / 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 <= -3.2e+50) || ~((y <= 4e+209))) tmp = exp((y * log(z))) / 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, -3.2e+50], N[Not[LessEqual[y, 4e+209]], $MachinePrecision]], N[(N[Exp[N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / y), $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 -3.2 \cdot 10^{+50} \lor \neg \left(y \leq 4 \cdot 10^{+209}\right):\\
\;\;\;\;\frac{e^{y \cdot \log z}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\log a \cdot \left(t + -1\right) - b}}{y}\\
\end{array}
\end{array}
if y < -3.19999999999999983e50 or 4.0000000000000003e209 < y Initial program 100.0%
add-exp-log74.3%
*-commutative74.3%
associate--l+74.3%
sub-neg74.3%
metadata-eval74.3%
fma-undefine74.3%
log-prod51.4%
Applied egg-rr51.4%
Taylor expanded in y around inf 63.7%
if -3.19999999999999983e50 < y < 4.0000000000000003e209Initial program 97.2%
*-commutative97.2%
associate-/l*88.3%
associate--l+88.3%
fma-define88.3%
sub-neg88.3%
metadata-eval88.3%
Simplified88.3%
Taylor expanded in y around 0 90.4%
Final simplification82.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -8.5e+27) (not (<= b 5e+57))) (/ (exp (- b)) y) (* x (/ (* (pow z y) (pow a (+ t -1.0))) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -8.5e+27) || !(b <= 5e+57)) {
tmp = exp(-b) / y;
} else {
tmp = x * ((pow(z, y) * pow(a, (t + -1.0))) / 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 ((b <= (-8.5d+27)) .or. (.not. (b <= 5d+57))) then
tmp = exp(-b) / y
else
tmp = x * (((z ** y) * (a ** (t + (-1.0d0)))) / 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 ((b <= -8.5e+27) || !(b <= 5e+57)) {
tmp = Math.exp(-b) / y;
} else {
tmp = x * ((Math.pow(z, y) * Math.pow(a, (t + -1.0))) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -8.5e+27) or not (b <= 5e+57): tmp = math.exp(-b) / y else: tmp = x * ((math.pow(z, y) * math.pow(a, (t + -1.0))) / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -8.5e+27) || !(b <= 5e+57)) tmp = Float64(exp(Float64(-b)) / y); else tmp = Float64(x * Float64(Float64((z ^ y) * (a ^ Float64(t + -1.0))) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -8.5e+27) || ~((b <= 5e+57))) tmp = exp(-b) / y; else tmp = x * (((z ^ y) * (a ^ (t + -1.0))) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -8.5e+27], N[Not[LessEqual[b, 5e+57]], $MachinePrecision]], N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision], N[(x * N[(N[(N[Power[z, y], $MachinePrecision] * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -8.5 \cdot 10^{+27} \lor \neg \left(b \leq 5 \cdot 10^{+57}\right):\\
\;\;\;\;\frac{e^{-b}}{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{{z}^{y} \cdot {a}^{\left(t + -1\right)}}{y}\\
\end{array}
\end{array}
if b < -8.5e27 or 4.99999999999999972e57 < b Initial program 100.0%
add-exp-log74.0%
*-commutative74.0%
associate--l+74.0%
sub-neg74.0%
metadata-eval74.0%
fma-undefine74.0%
log-prod50.0%
Applied egg-rr50.0%
Taylor expanded in b around inf 61.8%
neg-mul-161.8%
Simplified61.8%
if -8.5e27 < b < 4.99999999999999972e57Initial program 96.7%
associate-/l*97.2%
associate--l+97.2%
exp-sum82.7%
associate-/l*79.4%
*-commutative79.4%
exp-to-pow79.4%
exp-diff77.5%
*-commutative77.5%
exp-to-pow78.8%
sub-neg78.8%
metadata-eval78.8%
Simplified78.8%
Taylor expanded in b around 0 83.0%
*-commutative83.0%
exp-to-pow84.2%
sub-neg84.2%
metadata-eval84.2%
Simplified84.2%
Final simplification75.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -880000.0) (not (<= y 1.4e+145))) (/ (exp (* y (log z))) 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 <= -880000.0) || !(y <= 1.4e+145)) {
tmp = exp((y * log(z))) / 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 <= (-880000.0d0)) .or. (.not. (y <= 1.4d+145))) then
tmp = exp((y * log(z))) / 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 <= -880000.0) || !(y <= 1.4e+145)) {
tmp = Math.exp((y * Math.log(z))) / 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 <= -880000.0) or not (y <= 1.4e+145): tmp = math.exp((y * math.log(z))) / 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 <= -880000.0) || !(y <= 1.4e+145)) tmp = Float64(exp(Float64(y * log(z))) / y); else tmp = Float64(Float64(Float64(x * (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 <= -880000.0) || ~((y <= 1.4e+145))) tmp = exp((y * log(z))) / 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, -880000.0], N[Not[LessEqual[y, 1.4e+145]], $MachinePrecision]], N[(N[Exp[N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision], N[(N[(N[(x * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Exp[b], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -880000 \lor \neg \left(y \leq 1.4 \cdot 10^{+145}\right):\\
\;\;\;\;\frac{e^{y \cdot \log z}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x \cdot {a}^{\left(t + -1\right)}}{e^{b}}}{y}\\
\end{array}
\end{array}
if y < -8.8e5 or 1.3999999999999999e145 < y Initial program 100.0%
add-exp-log73.4%
*-commutative73.4%
associate--l+73.4%
sub-neg73.4%
metadata-eval73.4%
fma-undefine73.4%
log-prod50.0%
Applied egg-rr50.0%
Taylor expanded in y around inf 63.0%
if -8.8e5 < y < 1.3999999999999999e145Initial program 96.9%
Taylor expanded in y around 0 91.0%
div-exp79.9%
associate-/l*78.7%
exp-to-pow79.8%
sub-neg79.8%
metadata-eval79.8%
Simplified79.8%
Final simplification73.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1020000.0) (not (<= y 8.5e+134))) (/ (exp (* y (log z))) y) (* (/ (/ (pow a t) a) (exp b)) (/ x y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1020000.0) || !(y <= 8.5e+134)) {
tmp = exp((y * log(z))) / y;
} else {
tmp = ((pow(a, t) / a) / exp(b)) * (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 <= (-1020000.0d0)) .or. (.not. (y <= 8.5d+134))) then
tmp = exp((y * log(z))) / y
else
tmp = (((a ** t) / a) / exp(b)) * (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 <= -1020000.0) || !(y <= 8.5e+134)) {
tmp = Math.exp((y * Math.log(z))) / y;
} else {
tmp = ((Math.pow(a, t) / a) / Math.exp(b)) * (x / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1020000.0) or not (y <= 8.5e+134): tmp = math.exp((y * math.log(z))) / y else: tmp = ((math.pow(a, t) / a) / math.exp(b)) * (x / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1020000.0) || !(y <= 8.5e+134)) tmp = Float64(exp(Float64(y * log(z))) / y); else tmp = Float64(Float64(Float64((a ^ t) / a) / exp(b)) * Float64(x / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1020000.0) || ~((y <= 8.5e+134))) tmp = exp((y * log(z))) / y; else tmp = (((a ^ t) / a) / exp(b)) * (x / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1020000.0], N[Not[LessEqual[y, 8.5e+134]], $MachinePrecision]], N[(N[Exp[N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision], N[(N[(N[(N[Power[a, t], $MachinePrecision] / a), $MachinePrecision] / N[Exp[b], $MachinePrecision]), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1020000 \lor \neg \left(y \leq 8.5 \cdot 10^{+134}\right):\\
\;\;\;\;\frac{e^{y \cdot \log z}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{{a}^{t}}{a}}{e^{b}} \cdot \frac{x}{y}\\
\end{array}
\end{array}
if y < -1.02e6 or 8.50000000000000024e134 < y Initial program 100.0%
add-exp-log72.6%
*-commutative72.6%
associate--l+72.6%
sub-neg72.6%
metadata-eval72.6%
fma-undefine72.6%
log-prod49.5%
Applied egg-rr49.5%
Taylor expanded in y around inf 62.4%
if -1.02e6 < y < 8.50000000000000024e134Initial program 96.9%
*-commutative96.9%
associate-/l*89.3%
associate--l+89.3%
fma-define89.3%
sub-neg89.3%
metadata-eval89.3%
Simplified89.3%
Taylor expanded in y around 0 84.1%
div-exp76.0%
exp-to-pow77.1%
sub-neg77.1%
metadata-eval77.1%
Simplified77.1%
unpow-prod-up77.3%
unpow-177.3%
Applied egg-rr77.3%
associate-*r/77.3%
*-rgt-identity77.3%
Simplified77.3%
Final simplification71.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (pow a (+ t -1.0))))
(if (<= t -23.0)
(* x (/ t_1 y))
(if (<= t 1.35e-11)
(/ (* x (pow z y)) (* a (* y (exp b))))
(/ x (/ y t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = pow(a, (t + -1.0));
double tmp;
if (t <= -23.0) {
tmp = x * (t_1 / y);
} else if (t <= 1.35e-11) {
tmp = (x * pow(z, y)) / (a * (y * exp(b)));
} else {
tmp = x / (y / t_1);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = a ** (t + (-1.0d0))
if (t <= (-23.0d0)) then
tmp = x * (t_1 / y)
else if (t <= 1.35d-11) then
tmp = (x * (z ** y)) / (a * (y * exp(b)))
else
tmp = x / (y / t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = Math.pow(a, (t + -1.0));
double tmp;
if (t <= -23.0) {
tmp = x * (t_1 / y);
} else if (t <= 1.35e-11) {
tmp = (x * Math.pow(z, y)) / (a * (y * Math.exp(b)));
} else {
tmp = x / (y / t_1);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = math.pow(a, (t + -1.0)) tmp = 0 if t <= -23.0: tmp = x * (t_1 / y) elif t <= 1.35e-11: tmp = (x * math.pow(z, y)) / (a * (y * math.exp(b))) else: tmp = x / (y / t_1) return tmp
function code(x, y, z, t, a, b) t_1 = a ^ Float64(t + -1.0) tmp = 0.0 if (t <= -23.0) tmp = Float64(x * Float64(t_1 / y)); elseif (t <= 1.35e-11) tmp = Float64(Float64(x * (z ^ y)) / Float64(a * Float64(y * exp(b)))); else tmp = Float64(x / Float64(y / t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a ^ (t + -1.0); tmp = 0.0; if (t <= -23.0) tmp = x * (t_1 / y); elseif (t <= 1.35e-11) tmp = (x * (z ^ y)) / (a * (y * exp(b))); else tmp = x / (y / t_1); 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]}, If[LessEqual[t, -23.0], N[(x * N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.35e-11], N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {a}^{\left(t + -1\right)}\\
\mathbf{if}\;t \leq -23:\\
\;\;\;\;x \cdot \frac{t\_1}{y}\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{-11}:\\
\;\;\;\;\frac{x \cdot {z}^{y}}{a \cdot \left(y \cdot e^{b}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{y}{t\_1}}\\
\end{array}
\end{array}
if t < -23Initial program 100.0%
add-exp-log75.0%
*-commutative75.0%
associate--l+75.0%
sub-neg75.0%
metadata-eval75.0%
fma-undefine75.0%
log-prod54.4%
Applied egg-rr54.4%
Taylor expanded in y around 0 51.5%
Taylor expanded in b around 0 48.6%
exp-sum48.6%
rem-exp-log84.1%
associate-/l*84.1%
exp-to-pow84.1%
sub-neg84.1%
metadata-eval84.1%
+-commutative84.1%
Simplified84.1%
if -23 < t < 1.35000000000000002e-11Initial program 96.9%
associate-/l*97.0%
associate--l+97.0%
exp-sum86.0%
associate-/l*82.0%
*-commutative82.0%
exp-to-pow82.0%
exp-diff82.0%
*-commutative82.0%
exp-to-pow83.5%
sub-neg83.5%
metadata-eval83.5%
Simplified83.5%
Taylor expanded in t around 0 83.5%
if 1.35000000000000002e-11 < t Initial program 98.0%
*-commutative98.0%
associate-/l*84.6%
associate--l+84.6%
fma-define84.6%
sub-neg84.6%
metadata-eval84.6%
Simplified84.6%
Taylor expanded in y around 0 66.8%
div-exp57.0%
exp-to-pow57.2%
sub-neg57.2%
metadata-eval57.2%
Simplified57.2%
Taylor expanded in b around 0 57.3%
+-commutative57.3%
Simplified57.3%
clear-num57.3%
frac-times63.9%
*-un-lft-identity63.9%
+-commutative63.9%
Applied egg-rr63.9%
*-commutative63.9%
associate-*r/63.9%
+-commutative63.9%
Simplified63.9%
Taylor expanded in b around 0 70.3%
exp-to-pow70.5%
sub-neg70.5%
metadata-eval70.5%
+-commutative70.5%
Simplified70.5%
Final simplification80.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -5.6) (not (<= y 1.2e+54))) (/ (exp (* y (log z))) y) (/ x (* a (* y (exp b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -5.6) || !(y <= 1.2e+54)) {
tmp = exp((y * log(z))) / 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 <= (-5.6d0)) .or. (.not. (y <= 1.2d+54))) then
tmp = exp((y * log(z))) / 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 <= -5.6) || !(y <= 1.2e+54)) {
tmp = Math.exp((y * Math.log(z))) / y;
} else {
tmp = x / (a * (y * Math.exp(b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -5.6) or not (y <= 1.2e+54): tmp = math.exp((y * math.log(z))) / y else: tmp = x / (a * (y * math.exp(b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -5.6) || !(y <= 1.2e+54)) tmp = Float64(exp(Float64(y * log(z))) / 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 <= -5.6) || ~((y <= 1.2e+54))) tmp = exp((y * log(z))) / y; else tmp = x / (a * (y * exp(b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -5.6], N[Not[LessEqual[y, 1.2e+54]], $MachinePrecision]], N[(N[Exp[N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision], N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.6 \lor \neg \left(y \leq 1.2 \cdot 10^{+54}\right):\\
\;\;\;\;\frac{e^{y \cdot \log z}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\end{array}
\end{array}
if y < -5.5999999999999996 or 1.19999999999999999e54 < y Initial program 100.0%
add-exp-log70.6%
*-commutative70.6%
associate--l+70.6%
sub-neg70.6%
metadata-eval70.6%
fma-undefine70.6%
log-prod48.7%
Applied egg-rr48.7%
Taylor expanded in y around inf 57.4%
if -5.5999999999999996 < y < 1.19999999999999999e54Initial program 96.3%
*-commutative96.3%
associate-/l*88.2%
associate--l+88.2%
fma-define88.2%
sub-neg88.2%
metadata-eval88.2%
Simplified88.2%
Taylor expanded in y around 0 85.5%
div-exp76.0%
exp-to-pow77.3%
sub-neg77.3%
metadata-eval77.3%
Simplified77.3%
Taylor expanded in t around 0 76.4%
Final simplification67.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -0.034) (not (<= b 5.8e+62))) (/ x (* y (exp b))) (/ x (/ (* y (+ 1.0 b)) (pow a (+ t -1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -0.034) || !(b <= 5.8e+62)) {
tmp = x / (y * exp(b));
} else {
tmp = x / ((y * (1.0 + b)) / pow(a, (t + -1.0)));
}
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 <= (-0.034d0)) .or. (.not. (b <= 5.8d+62))) then
tmp = x / (y * exp(b))
else
tmp = x / ((y * (1.0d0 + b)) / (a ** (t + (-1.0d0))))
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 <= -0.034) || !(b <= 5.8e+62)) {
tmp = x / (y * Math.exp(b));
} else {
tmp = x / ((y * (1.0 + b)) / Math.pow(a, (t + -1.0)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -0.034) or not (b <= 5.8e+62): tmp = x / (y * math.exp(b)) else: tmp = x / ((y * (1.0 + b)) / math.pow(a, (t + -1.0))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -0.034) || !(b <= 5.8e+62)) tmp = Float64(x / Float64(y * exp(b))); else tmp = Float64(x / Float64(Float64(y * Float64(1.0 + b)) / (a ^ Float64(t + -1.0)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -0.034) || ~((b <= 5.8e+62))) tmp = x / (y * exp(b)); else tmp = x / ((y * (1.0 + b)) / (a ^ (t + -1.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -0.034], N[Not[LessEqual[b, 5.8e+62]], $MachinePrecision]], N[(x / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y * N[(1.0 + b), $MachinePrecision]), $MachinePrecision] / N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -0.034 \lor \neg \left(b \leq 5.8 \cdot 10^{+62}\right):\\
\;\;\;\;\frac{x}{y \cdot e^{b}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{y \cdot \left(1 + b\right)}{{a}^{\left(t + -1\right)}}}\\
\end{array}
\end{array}
if b < -0.034000000000000002 or 5.79999999999999968e62 < b Initial program 100.0%
*-commutative100.0%
associate-/l*84.0%
associate--l+84.0%
fma-define84.0%
sub-neg84.0%
metadata-eval84.0%
Simplified84.0%
Taylor expanded in b around inf 71.0%
neg-mul-171.0%
Simplified71.0%
exp-neg71.0%
frac-times84.2%
*-un-lft-identity84.2%
Applied egg-rr84.2%
if -0.034000000000000002 < b < 5.79999999999999968e62Initial program 96.6%
*-commutative96.6%
associate-/l*87.8%
associate--l+87.8%
fma-define87.8%
sub-neg87.8%
metadata-eval87.8%
Simplified87.8%
Taylor expanded in y around 0 68.1%
div-exp65.4%
exp-to-pow66.6%
sub-neg66.6%
metadata-eval66.6%
Simplified66.6%
Taylor expanded in b around 0 68.7%
+-commutative68.7%
Simplified68.7%
clear-num68.7%
frac-times73.3%
*-un-lft-identity73.3%
+-commutative73.3%
Applied egg-rr73.3%
*-commutative73.3%
associate-*r/73.3%
+-commutative73.3%
Simplified73.3%
Final simplification77.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -0.034) (not (<= b 1.6e+62))) (/ x (* y (exp b))) (* x (/ (pow a (+ t -1.0)) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -0.034) || !(b <= 1.6e+62)) {
tmp = x / (y * exp(b));
} else {
tmp = x * (pow(a, (t + -1.0)) / 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 ((b <= (-0.034d0)) .or. (.not. (b <= 1.6d+62))) then
tmp = x / (y * exp(b))
else
tmp = x * ((a ** (t + (-1.0d0))) / 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 ((b <= -0.034) || !(b <= 1.6e+62)) {
tmp = x / (y * Math.exp(b));
} else {
tmp = x * (Math.pow(a, (t + -1.0)) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -0.034) or not (b <= 1.6e+62): tmp = x / (y * math.exp(b)) else: tmp = x * (math.pow(a, (t + -1.0)) / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -0.034) || !(b <= 1.6e+62)) tmp = Float64(x / Float64(y * exp(b))); else tmp = Float64(x * Float64((a ^ Float64(t + -1.0)) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -0.034) || ~((b <= 1.6e+62))) tmp = x / (y * exp(b)); else tmp = x * ((a ^ (t + -1.0)) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -0.034], N[Not[LessEqual[b, 1.6e+62]], $MachinePrecision]], N[(x / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -0.034 \lor \neg \left(b \leq 1.6 \cdot 10^{+62}\right):\\
\;\;\;\;\frac{x}{y \cdot e^{b}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{{a}^{\left(t + -1\right)}}{y}\\
\end{array}
\end{array}
if b < -0.034000000000000002 or 1.59999999999999992e62 < b Initial program 100.0%
*-commutative100.0%
associate-/l*84.0%
associate--l+84.0%
fma-define84.0%
sub-neg84.0%
metadata-eval84.0%
Simplified84.0%
Taylor expanded in b around inf 71.0%
neg-mul-171.0%
Simplified71.0%
exp-neg71.0%
frac-times84.2%
*-un-lft-identity84.2%
Applied egg-rr84.2%
if -0.034000000000000002 < b < 1.59999999999999992e62Initial program 96.6%
add-exp-log61.4%
*-commutative61.4%
associate--l+61.4%
sub-neg61.4%
metadata-eval61.4%
fma-undefine61.4%
log-prod46.0%
Applied egg-rr46.5%
Taylor expanded in y around 0 35.5%
Taylor expanded in b around 0 34.3%
exp-sum34.3%
rem-exp-log70.1%
associate-/l*72.0%
exp-to-pow73.2%
sub-neg73.2%
metadata-eval73.2%
+-commutative73.2%
Simplified73.2%
Final simplification77.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -0.034) (not (<= b 205.0))) (/ x (* y (exp b))) (/ x (* a (* y (+ 1.0 b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -0.034) || !(b <= 205.0)) {
tmp = x / (y * exp(b));
} else {
tmp = x / (a * (y * (1.0 + 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 <= (-0.034d0)) .or. (.not. (b <= 205.0d0))) then
tmp = x / (y * exp(b))
else
tmp = x / (a * (y * (1.0d0 + 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 <= -0.034) || !(b <= 205.0)) {
tmp = x / (y * Math.exp(b));
} else {
tmp = x / (a * (y * (1.0 + b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -0.034) or not (b <= 205.0): tmp = x / (y * math.exp(b)) else: tmp = x / (a * (y * (1.0 + b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -0.034) || !(b <= 205.0)) tmp = Float64(x / Float64(y * exp(b))); else tmp = Float64(x / Float64(a * Float64(y * Float64(1.0 + b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -0.034) || ~((b <= 205.0))) tmp = x / (y * exp(b)); else tmp = x / (a * (y * (1.0 + b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -0.034], N[Not[LessEqual[b, 205.0]], $MachinePrecision]], N[(x / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y * N[(1.0 + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -0.034 \lor \neg \left(b \leq 205\right):\\
\;\;\;\;\frac{x}{y \cdot e^{b}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot \left(1 + b\right)\right)}\\
\end{array}
\end{array}
if b < -0.034000000000000002 or 205 < b Initial program 99.2%
*-commutative99.2%
associate-/l*83.8%
associate--l+83.8%
fma-define83.8%
sub-neg83.8%
metadata-eval83.8%
Simplified83.8%
Taylor expanded in b around inf 67.0%
neg-mul-167.0%
Simplified67.0%
exp-neg67.0%
frac-times79.0%
*-un-lft-identity79.0%
Applied egg-rr79.0%
if -0.034000000000000002 < b < 205Initial program 97.0%
*-commutative97.0%
associate-/l*88.3%
associate--l+88.3%
fma-define88.3%
sub-neg88.3%
metadata-eval88.3%
Simplified88.3%
Taylor expanded in y around 0 68.4%
div-exp68.4%
exp-to-pow69.7%
sub-neg69.7%
metadata-eval69.7%
Simplified69.7%
Taylor expanded in b around 0 69.7%
+-commutative69.7%
Simplified69.7%
Taylor expanded in t around 0 46.9%
Final simplification61.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -0.034) (not (<= b 440.0))) (/ (exp (- b)) y) (/ x (* a (* y (+ 1.0 b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -0.034) || !(b <= 440.0)) {
tmp = exp(-b) / y;
} else {
tmp = x / (a * (y * (1.0 + 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 <= (-0.034d0)) .or. (.not. (b <= 440.0d0))) then
tmp = exp(-b) / y
else
tmp = x / (a * (y * (1.0d0 + 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 <= -0.034) || !(b <= 440.0)) {
tmp = Math.exp(-b) / y;
} else {
tmp = x / (a * (y * (1.0 + b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -0.034) or not (b <= 440.0): tmp = math.exp(-b) / y else: tmp = x / (a * (y * (1.0 + b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -0.034) || !(b <= 440.0)) tmp = Float64(exp(Float64(-b)) / y); else tmp = Float64(x / Float64(a * Float64(y * Float64(1.0 + b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -0.034) || ~((b <= 440.0))) tmp = exp(-b) / y; else tmp = x / (a * (y * (1.0 + b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -0.034], N[Not[LessEqual[b, 440.0]], $MachinePrecision]], N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision], N[(x / N[(a * N[(y * N[(1.0 + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -0.034 \lor \neg \left(b \leq 440\right):\\
\;\;\;\;\frac{e^{-b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot \left(1 + b\right)\right)}\\
\end{array}
\end{array}
if b < -0.034000000000000002 or 440 < b Initial program 99.2%
add-exp-log71.8%
*-commutative71.8%
associate--l+71.8%
sub-neg71.8%
metadata-eval71.8%
fma-undefine71.8%
log-prod50.5%
Applied egg-rr51.1%
Taylor expanded in b around inf 57.6%
neg-mul-157.6%
Simplified57.6%
if -0.034000000000000002 < b < 440Initial program 97.0%
*-commutative97.0%
associate-/l*88.3%
associate--l+88.3%
fma-define88.3%
sub-neg88.3%
metadata-eval88.3%
Simplified88.3%
Taylor expanded in y around 0 68.4%
div-exp68.4%
exp-to-pow69.7%
sub-neg69.7%
metadata-eval69.7%
Simplified69.7%
Taylor expanded in b around 0 69.7%
+-commutative69.7%
Simplified69.7%
Taylor expanded in t around 0 46.9%
Final simplification51.8%
(FPCore (x y z t a b) :precision binary64 (/ x (* a (* y (exp b)))))
double code(double x, double y, double z, double t, double a, double b) {
return x / (a * (y * exp(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 / (a * (y * exp(b)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x / (a * (y * Math.exp(b)));
}
def code(x, y, z, t, a, b): return x / (a * (y * math.exp(b)))
function code(x, y, z, t, a, b) return Float64(x / Float64(a * Float64(y * exp(b)))) end
function tmp = code(x, y, z, t, a, b) tmp = x / (a * (y * exp(b))); end
code[x_, y_, z_, t_, a_, b_] := N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{a \cdot \left(y \cdot e^{b}\right)}
\end{array}
Initial program 98.0%
*-commutative98.0%
associate-/l*86.2%
associate--l+86.2%
fma-define86.2%
sub-neg86.2%
metadata-eval86.2%
Simplified86.2%
Taylor expanded in y around 0 70.8%
div-exp62.6%
exp-to-pow63.3%
sub-neg63.3%
metadata-eval63.3%
Simplified63.3%
Taylor expanded in t around 0 61.6%
(FPCore (x y z t a b) :precision binary64 (if (<= b -0.034) (/ (+ 1.0 (* b (+ -1.0 (* b (+ 0.5 (* b -0.16666666666666666)))))) y) (/ x (* a (* y (+ 1.0 b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -0.034) {
tmp = (1.0 + (b * (-1.0 + (b * (0.5 + (b * -0.16666666666666666)))))) / y;
} else {
tmp = x / (a * (y * (1.0 + 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 <= (-0.034d0)) then
tmp = (1.0d0 + (b * ((-1.0d0) + (b * (0.5d0 + (b * (-0.16666666666666666d0))))))) / y
else
tmp = x / (a * (y * (1.0d0 + 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 <= -0.034) {
tmp = (1.0 + (b * (-1.0 + (b * (0.5 + (b * -0.16666666666666666)))))) / y;
} else {
tmp = x / (a * (y * (1.0 + b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -0.034: tmp = (1.0 + (b * (-1.0 + (b * (0.5 + (b * -0.16666666666666666)))))) / y else: tmp = x / (a * (y * (1.0 + b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -0.034) tmp = Float64(Float64(1.0 + Float64(b * Float64(-1.0 + Float64(b * Float64(0.5 + Float64(b * -0.16666666666666666)))))) / y); else tmp = Float64(x / Float64(a * Float64(y * Float64(1.0 + b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -0.034) tmp = (1.0 + (b * (-1.0 + (b * (0.5 + (b * -0.16666666666666666)))))) / y; else tmp = x / (a * (y * (1.0 + b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -0.034], N[(N[(1.0 + N[(b * N[(-1.0 + N[(b * N[(0.5 + N[(b * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(a * N[(y * N[(1.0 + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -0.034:\\
\;\;\;\;\frac{1 + b \cdot \left(-1 + b \cdot \left(0.5 + b \cdot -0.16666666666666666\right)\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot \left(1 + b\right)\right)}\\
\end{array}
\end{array}
if b < -0.034000000000000002Initial program 100.0%
add-exp-log58.3%
*-commutative58.3%
associate--l+58.3%
sub-neg58.3%
metadata-eval58.3%
fma-undefine58.3%
log-prod51.7%
Applied egg-rr51.7%
Taylor expanded in b around inf 40.3%
neg-mul-140.3%
Simplified40.3%
Taylor expanded in b around 0 37.3%
if -0.034000000000000002 < b Initial program 97.4%
*-commutative97.4%
associate-/l*85.6%
associate--l+85.6%
fma-define85.6%
sub-neg85.6%
metadata-eval85.6%
Simplified85.6%
Taylor expanded in y around 0 69.5%
div-exp63.9%
exp-to-pow64.8%
sub-neg64.8%
metadata-eval64.8%
Simplified64.8%
Taylor expanded in b around 0 65.1%
+-commutative65.1%
Simplified65.1%
Taylor expanded in t around 0 45.6%
Final simplification43.7%
(FPCore (x y z t a b) :precision binary64 (if (<= b -0.034) (/ (+ 1.0 (* b (+ -1.0 (* b 0.5)))) y) (/ x (* a (* y (+ 1.0 b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -0.034) {
tmp = (1.0 + (b * (-1.0 + (b * 0.5)))) / y;
} else {
tmp = x / (a * (y * (1.0 + 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 <= (-0.034d0)) then
tmp = (1.0d0 + (b * ((-1.0d0) + (b * 0.5d0)))) / y
else
tmp = x / (a * (y * (1.0d0 + 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 <= -0.034) {
tmp = (1.0 + (b * (-1.0 + (b * 0.5)))) / y;
} else {
tmp = x / (a * (y * (1.0 + b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -0.034: tmp = (1.0 + (b * (-1.0 + (b * 0.5)))) / y else: tmp = x / (a * (y * (1.0 + b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -0.034) tmp = Float64(Float64(1.0 + Float64(b * Float64(-1.0 + Float64(b * 0.5)))) / y); else tmp = Float64(x / Float64(a * Float64(y * Float64(1.0 + b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -0.034) tmp = (1.0 + (b * (-1.0 + (b * 0.5)))) / y; else tmp = x / (a * (y * (1.0 + b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -0.034], N[(N[(1.0 + N[(b * N[(-1.0 + N[(b * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(a * N[(y * N[(1.0 + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -0.034:\\
\;\;\;\;\frac{1 + b \cdot \left(-1 + b \cdot 0.5\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot \left(1 + b\right)\right)}\\
\end{array}
\end{array}
if b < -0.034000000000000002Initial program 100.0%
add-exp-log58.3%
*-commutative58.3%
associate--l+58.3%
sub-neg58.3%
metadata-eval58.3%
fma-undefine58.3%
log-prod51.7%
Applied egg-rr51.7%
Taylor expanded in b around inf 40.3%
neg-mul-140.3%
Simplified40.3%
Taylor expanded in b around 0 32.6%
if -0.034000000000000002 < b Initial program 97.4%
*-commutative97.4%
associate-/l*85.6%
associate--l+85.6%
fma-define85.6%
sub-neg85.6%
metadata-eval85.6%
Simplified85.6%
Taylor expanded in y around 0 69.5%
div-exp63.9%
exp-to-pow64.8%
sub-neg64.8%
metadata-eval64.8%
Simplified64.8%
Taylor expanded in b around 0 65.1%
+-commutative65.1%
Simplified65.1%
Taylor expanded in t around 0 45.6%
Final simplification42.6%
(FPCore (x y z t a b) :precision binary64 (if (<= b -0.034) (* (/ x y) (+ 1.0 (* b (* b 0.5)))) (/ x (* a (* y (+ 1.0 b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -0.034) {
tmp = (x / y) * (1.0 + (b * (b * 0.5)));
} else {
tmp = x / (a * (y * (1.0 + 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 <= (-0.034d0)) then
tmp = (x / y) * (1.0d0 + (b * (b * 0.5d0)))
else
tmp = x / (a * (y * (1.0d0 + 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 <= -0.034) {
tmp = (x / y) * (1.0 + (b * (b * 0.5)));
} else {
tmp = x / (a * (y * (1.0 + b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -0.034: tmp = (x / y) * (1.0 + (b * (b * 0.5))) else: tmp = x / (a * (y * (1.0 + b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -0.034) tmp = Float64(Float64(x / y) * Float64(1.0 + Float64(b * Float64(b * 0.5)))); else tmp = Float64(x / Float64(a * Float64(y * Float64(1.0 + b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -0.034) tmp = (x / y) * (1.0 + (b * (b * 0.5))); else tmp = x / (a * (y * (1.0 + b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -0.034], N[(N[(x / y), $MachinePrecision] * N[(1.0 + N[(b * N[(b * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y * N[(1.0 + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -0.034:\\
\;\;\;\;\frac{x}{y} \cdot \left(1 + b \cdot \left(b \cdot 0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot \left(1 + b\right)\right)}\\
\end{array}
\end{array}
if b < -0.034000000000000002Initial program 100.0%
*-commutative100.0%
associate-/l*88.3%
associate--l+88.3%
fma-define88.3%
sub-neg88.3%
metadata-eval88.3%
Simplified88.3%
Taylor expanded in b around inf 71.9%
neg-mul-171.9%
Simplified71.9%
Taylor expanded in b around 0 46.7%
Taylor expanded in b around inf 46.7%
*-commutative46.7%
Simplified46.7%
if -0.034000000000000002 < b Initial program 97.4%
*-commutative97.4%
associate-/l*85.6%
associate--l+85.6%
fma-define85.6%
sub-neg85.6%
metadata-eval85.6%
Simplified85.6%
Taylor expanded in y around 0 69.5%
div-exp63.9%
exp-to-pow64.8%
sub-neg64.8%
metadata-eval64.8%
Simplified64.8%
Taylor expanded in b around 0 65.1%
+-commutative65.1%
Simplified65.1%
Taylor expanded in t around 0 45.6%
Final simplification45.9%
(FPCore (x y z t a b) :precision binary64 (if (<= b -0.034) (- (/ x y) (* x (/ b y))) (/ x (* a (* y (+ 1.0 b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -0.034) {
tmp = (x / y) - (x * (b / y));
} else {
tmp = x / (a * (y * (1.0 + 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 <= (-0.034d0)) then
tmp = (x / y) - (x * (b / y))
else
tmp = x / (a * (y * (1.0d0 + 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 <= -0.034) {
tmp = (x / y) - (x * (b / y));
} else {
tmp = x / (a * (y * (1.0 + b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -0.034: tmp = (x / y) - (x * (b / y)) else: tmp = x / (a * (y * (1.0 + b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -0.034) tmp = Float64(Float64(x / y) - Float64(x * Float64(b / y))); else tmp = Float64(x / Float64(a * Float64(y * Float64(1.0 + b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -0.034) tmp = (x / y) - (x * (b / y)); else tmp = x / (a * (y * (1.0 + b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -0.034], N[(N[(x / y), $MachinePrecision] - N[(x * N[(b / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y * N[(1.0 + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -0.034:\\
\;\;\;\;\frac{x}{y} - x \cdot \frac{b}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot \left(1 + b\right)\right)}\\
\end{array}
\end{array}
if b < -0.034000000000000002Initial program 100.0%
*-commutative100.0%
associate-/l*88.3%
associate--l+88.3%
fma-define88.3%
sub-neg88.3%
metadata-eval88.3%
Simplified88.3%
Taylor expanded in b around inf 71.9%
neg-mul-171.9%
Simplified71.9%
Taylor expanded in b around 0 45.6%
Taylor expanded in b around 0 34.3%
+-commutative34.3%
mul-1-neg34.3%
associate-*r/34.2%
unsub-neg34.2%
*-commutative34.2%
associate-*l/34.3%
associate-*r/39.0%
Simplified39.0%
if -0.034000000000000002 < b Initial program 97.4%
*-commutative97.4%
associate-/l*85.6%
associate--l+85.6%
fma-define85.6%
sub-neg85.6%
metadata-eval85.6%
Simplified85.6%
Taylor expanded in y around 0 69.5%
div-exp63.9%
exp-to-pow64.8%
sub-neg64.8%
metadata-eval64.8%
Simplified64.8%
Taylor expanded in b around 0 65.1%
+-commutative65.1%
Simplified65.1%
Taylor expanded in t around 0 45.6%
(FPCore (x y z t a b) :precision binary64 (if (<= b -0.0021) (- (/ x y) (* x (/ b y))) (/ (+ 1.0 b) (/ y x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -0.0021) {
tmp = (x / y) - (x * (b / y));
} else {
tmp = (1.0 + b) / (y / 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 (b <= (-0.0021d0)) then
tmp = (x / y) - (x * (b / y))
else
tmp = (1.0d0 + b) / (y / 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 (b <= -0.0021) {
tmp = (x / y) - (x * (b / y));
} else {
tmp = (1.0 + b) / (y / x);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -0.0021: tmp = (x / y) - (x * (b / y)) else: tmp = (1.0 + b) / (y / x) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -0.0021) tmp = Float64(Float64(x / y) - Float64(x * Float64(b / y))); else tmp = Float64(Float64(1.0 + b) / Float64(y / x)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -0.0021) tmp = (x / y) - (x * (b / y)); else tmp = (1.0 + b) / (y / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -0.0021], N[(N[(x / y), $MachinePrecision] - N[(x * N[(b / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + b), $MachinePrecision] / N[(y / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -0.0021:\\
\;\;\;\;\frac{x}{y} - x \cdot \frac{b}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + b}{\frac{y}{x}}\\
\end{array}
\end{array}
if b < -0.00209999999999999987Initial program 100.0%
*-commutative100.0%
associate-/l*88.7%
associate--l+88.7%
fma-define88.7%
sub-neg88.7%
metadata-eval88.7%
Simplified88.7%
Taylor expanded in b around inf 71.2%
neg-mul-171.2%
Simplified71.2%
Taylor expanded in b around 0 45.8%
Taylor expanded in b around 0 34.8%
+-commutative34.8%
mul-1-neg34.8%
associate-*r/34.8%
unsub-neg34.8%
*-commutative34.8%
associate-*l/34.8%
associate-*r/39.4%
Simplified39.4%
if -0.00209999999999999987 < b Initial program 97.4%
*-commutative97.4%
associate-/l*85.4%
associate--l+85.4%
fma-define85.4%
sub-neg85.4%
metadata-eval85.4%
Simplified85.4%
Taylor expanded in b around inf 30.3%
neg-mul-130.3%
Simplified30.3%
clear-num30.5%
un-div-inv30.5%
add-sqr-sqrt8.7%
sqrt-unprod17.8%
sqr-neg17.8%
sqrt-unprod9.2%
add-sqr-sqrt17.8%
Applied egg-rr17.8%
Taylor expanded in b around 0 16.1%
+-commutative64.7%
Simplified16.1%
Final simplification21.7%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.45e+23) (/ (- 1.0 b) y) (/ 1.0 (/ y x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.45e+23) {
tmp = (1.0 - b) / y;
} else {
tmp = 1.0 / (y / 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 (b <= (-1.45d+23)) then
tmp = (1.0d0 - b) / y
else
tmp = 1.0d0 / (y / 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 (b <= -1.45e+23) {
tmp = (1.0 - b) / y;
} else {
tmp = 1.0 / (y / x);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.45e+23: tmp = (1.0 - b) / y else: tmp = 1.0 / (y / x) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.45e+23) tmp = Float64(Float64(1.0 - b) / y); else tmp = Float64(1.0 / Float64(y / x)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.45e+23) tmp = (1.0 - b) / y; else tmp = 1.0 / (y / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.45e+23], N[(N[(1.0 - b), $MachinePrecision] / y), $MachinePrecision], N[(1.0 / N[(y / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.45 \cdot 10^{+23}:\\
\;\;\;\;\frac{1 - b}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{y}{x}}\\
\end{array}
\end{array}
if b < -1.45000000000000006e23Initial program 100.0%
add-exp-log58.6%
*-commutative58.6%
associate--l+58.6%
sub-neg58.6%
metadata-eval58.6%
fma-undefine58.6%
log-prod51.7%
Applied egg-rr51.7%
Taylor expanded in b around inf 41.6%
neg-mul-141.6%
Simplified41.6%
Taylor expanded in b around 0 14.2%
neg-mul-135.2%
unsub-neg35.2%
Simplified14.2%
if -1.45000000000000006e23 < b Initial program 97.4%
*-commutative97.4%
associate-/l*85.7%
associate--l+85.7%
fma-define85.7%
sub-neg85.7%
metadata-eval85.7%
Simplified85.7%
Taylor expanded in b around inf 30.7%
neg-mul-130.7%
Simplified30.7%
Taylor expanded in b around 0 15.8%
clear-num16.1%
inv-pow16.1%
Applied egg-rr16.1%
unpow-116.1%
Simplified16.1%
(FPCore (x y z t a b) :precision binary64 (* (/ x y) (- 1.0 b)))
double code(double x, double y, double z, double t, double a, double b) {
return (x / y) * (1.0 - 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 / y) * (1.0d0 - b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x / y) * (1.0 - b);
}
def code(x, y, z, t, a, b): return (x / y) * (1.0 - b)
function code(x, y, z, t, a, b) return Float64(Float64(x / y) * Float64(1.0 - b)) end
function tmp = code(x, y, z, t, a, b) tmp = (x / y) * (1.0 - b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x / y), $MachinePrecision] * N[(1.0 - b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y} \cdot \left(1 - b\right)
\end{array}
Initial program 98.0%
*-commutative98.0%
associate-/l*86.2%
associate--l+86.2%
fma-define86.2%
sub-neg86.2%
metadata-eval86.2%
Simplified86.2%
Taylor expanded in b around inf 40.2%
neg-mul-140.2%
Simplified40.2%
Taylor expanded in b around 0 19.6%
neg-mul-119.6%
unsub-neg19.6%
Simplified19.6%
Final simplification19.6%
(FPCore (x y z t a b) :precision binary64 (/ 1.0 (/ y x)))
double code(double x, double y, double z, double t, double a, double b) {
return 1.0 / (y / 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 = 1.0d0 / (y / x)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return 1.0 / (y / x);
}
def code(x, y, z, t, a, b): return 1.0 / (y / x)
function code(x, y, z, t, a, b) return Float64(1.0 / Float64(y / x)) end
function tmp = code(x, y, z, t, a, b) tmp = 1.0 / (y / x); end
code[x_, y_, z_, t_, a_, b_] := N[(1.0 / N[(y / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{\frac{y}{x}}
\end{array}
Initial program 98.0%
*-commutative98.0%
associate-/l*86.2%
associate--l+86.2%
fma-define86.2%
sub-neg86.2%
metadata-eval86.2%
Simplified86.2%
Taylor expanded in b around inf 40.2%
neg-mul-140.2%
Simplified40.2%
Taylor expanded in b around 0 15.7%
clear-num15.9%
inv-pow15.9%
Applied egg-rr15.9%
unpow-115.9%
Simplified15.9%
(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 98.0%
*-commutative98.0%
associate-/l*86.2%
associate--l+86.2%
fma-define86.2%
sub-neg86.2%
metadata-eval86.2%
Simplified86.2%
Taylor expanded in b around inf 40.2%
neg-mul-140.2%
Simplified40.2%
Taylor expanded in b around 0 15.7%
(FPCore (x y z t a b) :precision binary64 (/ 1.0 y))
double code(double x, double y, double z, double t, double a, double b) {
return 1.0 / 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 = 1.0d0 / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return 1.0 / y;
}
def code(x, y, z, t, a, b): return 1.0 / y
function code(x, y, z, t, a, b) return Float64(1.0 / y) end
function tmp = code(x, y, z, t, a, b) tmp = 1.0 / y; end
code[x_, y_, z_, t_, a_, b_] := N[(1.0 / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{y}
\end{array}
Initial program 98.0%
add-exp-log66.1%
*-commutative66.1%
associate--l+66.1%
sub-neg66.1%
metadata-eval66.1%
fma-undefine66.1%
log-prod47.3%
Applied egg-rr47.6%
Taylor expanded in b around inf 28.1%
neg-mul-128.1%
Simplified28.1%
Taylor expanded in b around 0 3.1%
(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 2024135
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:incompleteBetaWorker from math-functions-0.1.5.2, A"
:precision binary64
:alt
(! :herbie-platform default (if (< t -8845848504127471/10000000000000000) (/ (* x (/ (pow a (- t 1)) y)) (- (+ b 1) (* y (log z)))) (if (< t 8520312288374073/10000000000) (/ (* (/ x y) (pow a (- t 1))) (exp (- b (* (log z) y)))) (/ (* x (/ (pow a (- t 1)) y)) (- (+ b 1) (* y (log z)))))))
(/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))