
(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)) (* (- 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}
Initial program 98.5%
Final simplification98.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.3e+62) (not (<= y 4e+54))) (/ (* x (exp (- (- (* y (log z)) (log a)) b))) y) (/ (* x (exp (- (* (- t 1.0) (log a)) b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.3e+62) || !(y <= 4e+54)) {
tmp = (x * exp((((y * log(z)) - log(a)) - b))) / y;
} else {
tmp = (x * exp((((t - 1.0) * 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 ((y <= (-1.3d+62)) .or. (.not. (y <= 4d+54))) then
tmp = (x * exp((((y * log(z)) - log(a)) - b))) / y
else
tmp = (x * exp((((t - 1.0d0) * 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 ((y <= -1.3e+62) || !(y <= 4e+54)) {
tmp = (x * Math.exp((((y * Math.log(z)) - Math.log(a)) - b))) / y;
} else {
tmp = (x * Math.exp((((t - 1.0) * Math.log(a)) - b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.3e+62) or not (y <= 4e+54): tmp = (x * math.exp((((y * math.log(z)) - math.log(a)) - b))) / y else: tmp = (x * math.exp((((t - 1.0) * math.log(a)) - b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.3e+62) || !(y <= 4e+54)) tmp = Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) - log(a)) - b))) / y); else tmp = Float64(Float64(x * exp(Float64(Float64(Float64(t - 1.0) * log(a)) - b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.3e+62) || ~((y <= 4e+54))) tmp = (x * exp((((y * log(z)) - log(a)) - b))) / y; else tmp = (x * exp((((t - 1.0) * log(a)) - b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.3e+62], N[Not[LessEqual[y, 4e+54]], $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[(x * N[Exp[N[(N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.3 \cdot 10^{+62} \lor \neg \left(y \leq 4 \cdot 10^{+54}\right):\\
\;\;\;\;\frac{x \cdot e^{\left(y \cdot \log z - \log a\right) - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\left(t - 1\right) \cdot \log a - b}}{y}\\
\end{array}
\end{array}
if y < -1.29999999999999992e62 or 4.0000000000000003e54 < y Initial program 100.0%
Taylor expanded in t around 0 94.2%
+-commutative94.2%
mul-1-neg94.2%
unsub-neg94.2%
Simplified94.2%
if -1.29999999999999992e62 < y < 4.0000000000000003e54Initial program 97.6%
associate-/l*96.7%
fma-def96.7%
sub-neg96.7%
metadata-eval96.7%
Simplified96.7%
Taylor expanded in y around 0 96.4%
Final simplification95.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2.7e+137) (not (<= y 9.5e+64))) (/ (* x (/ (pow z y) a)) y) (/ (* x (exp (- (* (- t 1.0) (log a)) b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.7e+137) || !(y <= 9.5e+64)) {
tmp = (x * (pow(z, y) / a)) / y;
} else {
tmp = (x * exp((((t - 1.0) * 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 ((y <= (-2.7d+137)) .or. (.not. (y <= 9.5d+64))) then
tmp = (x * ((z ** y) / a)) / y
else
tmp = (x * exp((((t - 1.0d0) * 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 ((y <= -2.7e+137) || !(y <= 9.5e+64)) {
tmp = (x * (Math.pow(z, y) / a)) / y;
} else {
tmp = (x * Math.exp((((t - 1.0) * Math.log(a)) - b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2.7e+137) or not (y <= 9.5e+64): tmp = (x * (math.pow(z, y) / a)) / y else: tmp = (x * math.exp((((t - 1.0) * math.log(a)) - b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -2.7e+137) || !(y <= 9.5e+64)) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y); else tmp = Float64(Float64(x * exp(Float64(Float64(Float64(t - 1.0) * log(a)) - b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -2.7e+137) || ~((y <= 9.5e+64))) tmp = (x * ((z ^ y) / a)) / y; else tmp = (x * exp((((t - 1.0) * log(a)) - b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2.7e+137], N[Not[LessEqual[y, 9.5e+64]], $MachinePrecision]], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[Exp[N[(N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.7 \cdot 10^{+137} \lor \neg \left(y \leq 9.5 \cdot 10^{+64}\right):\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\left(t - 1\right) \cdot \log a - b}}{y}\\
\end{array}
\end{array}
if y < -2.70000000000000017e137 or 9.50000000000000028e64 < y Initial program 100.0%
Taylor expanded in t around 0 94.5%
+-commutative94.5%
mul-1-neg94.5%
unsub-neg94.5%
Simplified94.5%
Taylor expanded in b around 0 86.9%
*-commutative86.9%
div-exp86.9%
*-commutative86.9%
exp-to-pow86.9%
rem-exp-log86.9%
Simplified86.9%
if -2.70000000000000017e137 < y < 9.50000000000000028e64Initial program 97.7%
associate-/l*96.9%
fma-def96.9%
sub-neg96.9%
metadata-eval96.9%
Simplified96.9%
Taylor expanded in y around 0 95.9%
Final simplification92.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.95e+45) (not (<= y 7.2e+65))) (/ (* x (/ (pow z y) a)) y) (* (/ (pow a (- t 1.0)) (exp b)) (/ x y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.95e+45) || !(y <= 7.2e+65)) {
tmp = (x * (pow(z, y) / a)) / y;
} else {
tmp = (pow(a, (t - 1.0)) / 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 <= (-1.95d+45)) .or. (.not. (y <= 7.2d+65))) then
tmp = (x * ((z ** y) / a)) / y
else
tmp = ((a ** (t - 1.0d0)) / 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 <= -1.95e+45) || !(y <= 7.2e+65)) {
tmp = (x * (Math.pow(z, y) / a)) / y;
} else {
tmp = (Math.pow(a, (t - 1.0)) / Math.exp(b)) * (x / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.95e+45) or not (y <= 7.2e+65): tmp = (x * (math.pow(z, y) / a)) / y else: tmp = (math.pow(a, (t - 1.0)) / math.exp(b)) * (x / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.95e+45) || !(y <= 7.2e+65)) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y); else tmp = Float64(Float64((a ^ Float64(t - 1.0)) / exp(b)) * Float64(x / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.95e+45) || ~((y <= 7.2e+65))) tmp = (x * ((z ^ y) / a)) / y; else tmp = ((a ^ (t - 1.0)) / exp(b)) * (x / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.95e+45], N[Not[LessEqual[y, 7.2e+65]], $MachinePrecision]], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] / N[Exp[b], $MachinePrecision]), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.95 \cdot 10^{+45} \lor \neg \left(y \leq 7.2 \cdot 10^{+65}\right):\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{{a}^{\left(t - 1\right)}}{e^{b}} \cdot \frac{x}{y}\\
\end{array}
\end{array}
if y < -1.95e45 or 7.19999999999999957e65 < y Initial program 100.0%
Taylor expanded in t around 0 93.3%
+-commutative93.3%
mul-1-neg93.3%
unsub-neg93.3%
Simplified93.3%
Taylor expanded in b around 0 85.7%
*-commutative85.7%
div-exp85.7%
*-commutative85.7%
exp-to-pow85.7%
rem-exp-log85.7%
Simplified85.7%
if -1.95e45 < y < 7.19999999999999957e65Initial program 97.5%
associate-*l/90.3%
*-commutative90.3%
+-commutative90.3%
associate--l+90.3%
exp-sum79.3%
*-commutative79.3%
exp-to-pow80.2%
sub-neg80.2%
metadata-eval80.2%
exp-diff76.2%
*-commutative76.2%
exp-to-pow76.3%
Simplified76.3%
Taylor expanded in y around 0 82.7%
*-commutative82.7%
*-commutative82.7%
times-frac79.4%
exp-to-pow80.3%
sub-neg80.3%
metadata-eval80.3%
Simplified80.3%
Final simplification82.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -4.3e+46) (not (<= y 1.66e+68))) (/ (* x (/ (pow z y) a)) 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 <= -4.3e+46) || !(y <= 1.66e+68)) {
tmp = (x * (pow(z, y) / a)) / 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 <= (-4.3d+46)) .or. (.not. (y <= 1.66d+68))) then
tmp = (x * ((z ** y) / a)) / 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 <= -4.3e+46) || !(y <= 1.66e+68)) {
tmp = (x * (Math.pow(z, y) / a)) / 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 <= -4.3e+46) or not (y <= 1.66e+68): tmp = (x * (math.pow(z, y) / a)) / 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 <= -4.3e+46) || !(y <= 1.66e+68)) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y); else tmp = Float64(Float64(x * 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 <= -4.3e+46) || ~((y <= 1.66e+68))) tmp = (x * ((z ^ y) / a)) / 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, -4.3e+46], N[Not[LessEqual[y, 1.66e+68]], $MachinePrecision]], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] / N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.3 \cdot 10^{+46} \lor \neg \left(y \leq 1.66 \cdot 10^{+68}\right):\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \frac{{a}^{\left(t - 1\right)}}{e^{b}}}{y}\\
\end{array}
\end{array}
if y < -4.30000000000000005e46 or 1.66e68 < y Initial program 100.0%
Taylor expanded in t around 0 93.3%
+-commutative93.3%
mul-1-neg93.3%
unsub-neg93.3%
Simplified93.3%
Taylor expanded in b around 0 85.7%
*-commutative85.7%
div-exp85.7%
*-commutative85.7%
exp-to-pow85.7%
rem-exp-log85.7%
Simplified85.7%
if -4.30000000000000005e46 < y < 1.66e68Initial program 97.5%
Taylor expanded in y around 0 96.4%
div-exp85.9%
exp-to-pow87.0%
sub-neg87.0%
metadata-eval87.0%
Simplified87.0%
Final simplification86.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -5.9e+44) (not (<= y 4.4e+54))) (/ (* x (/ (pow z y) a)) y) (/ (/ x (* a (exp b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -5.9e+44) || !(y <= 4.4e+54)) {
tmp = (x * (pow(z, y) / a)) / y;
} else {
tmp = (x / (a * 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 <= (-5.9d+44)) .or. (.not. (y <= 4.4d+54))) then
tmp = (x * ((z ** y) / a)) / y
else
tmp = (x / (a * 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 <= -5.9e+44) || !(y <= 4.4e+54)) {
tmp = (x * (Math.pow(z, y) / a)) / y;
} else {
tmp = (x / (a * Math.exp(b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -5.9e+44) or not (y <= 4.4e+54): tmp = (x * (math.pow(z, y) / a)) / y else: tmp = (x / (a * math.exp(b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -5.9e+44) || !(y <= 4.4e+54)) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y); else tmp = Float64(Float64(x / Float64(a * exp(b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -5.9e+44) || ~((y <= 4.4e+54))) tmp = (x * ((z ^ y) / a)) / y; else tmp = (x / (a * exp(b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -5.9e+44], N[Not[LessEqual[y, 4.4e+54]], $MachinePrecision]], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x / N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.9 \cdot 10^{+44} \lor \neg \left(y \leq 4.4 \cdot 10^{+54}\right):\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\
\end{array}
\end{array}
if y < -5.89999999999999965e44 or 4.3999999999999998e54 < y Initial program 100.0%
Taylor expanded in t around 0 93.3%
+-commutative93.3%
mul-1-neg93.3%
unsub-neg93.3%
Simplified93.3%
Taylor expanded in b around 0 85.7%
*-commutative85.7%
div-exp85.7%
*-commutative85.7%
exp-to-pow85.7%
rem-exp-log85.7%
Simplified85.7%
if -5.89999999999999965e44 < y < 4.3999999999999998e54Initial program 97.5%
Taylor expanded in t around 0 76.0%
+-commutative76.0%
mul-1-neg76.0%
unsub-neg76.0%
Simplified76.0%
Taylor expanded in y around 0 74.9%
exp-neg74.9%
associate-*r/74.9%
*-rgt-identity74.9%
+-commutative74.9%
exp-sum74.9%
rem-exp-log75.9%
Simplified75.9%
Final simplification79.9%
(FPCore (x y z t a b) :precision binary64 (if (<= t -1.65e+129) (* (* b b) (/ (* 0.5 (/ x a)) y)) (/ (/ x (* y a)) (exp b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.65e+129) {
tmp = (b * b) * ((0.5 * (x / a)) / y);
} else {
tmp = (x / (y * a)) / 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 (t <= (-1.65d+129)) then
tmp = (b * b) * ((0.5d0 * (x / a)) / y)
else
tmp = (x / (y * a)) / 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 (t <= -1.65e+129) {
tmp = (b * b) * ((0.5 * (x / a)) / y);
} else {
tmp = (x / (y * a)) / Math.exp(b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.65e+129: tmp = (b * b) * ((0.5 * (x / a)) / y) else: tmp = (x / (y * a)) / math.exp(b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.65e+129) tmp = Float64(Float64(b * b) * Float64(Float64(0.5 * Float64(x / a)) / y)); else tmp = Float64(Float64(x / Float64(y * a)) / exp(b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -1.65e+129) tmp = (b * b) * ((0.5 * (x / a)) / y); else tmp = (x / (y * a)) / exp(b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.65e+129], N[(N[(b * b), $MachinePrecision] * N[(N[(0.5 * N[(x / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision] / N[Exp[b], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.65 \cdot 10^{+129}:\\
\;\;\;\;\left(b \cdot b\right) \cdot \frac{0.5 \cdot \frac{x}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y \cdot a}}{e^{b}}\\
\end{array}
\end{array}
if t < -1.64999999999999995e129Initial program 100.0%
Taylor expanded in t around 0 60.5%
+-commutative60.5%
mul-1-neg60.5%
unsub-neg60.5%
Simplified60.5%
Taylor expanded in y around 0 57.5%
exp-neg57.5%
associate-*r/57.5%
*-rgt-identity57.5%
+-commutative57.5%
exp-sum57.5%
rem-exp-log57.5%
associate-/r*54.3%
associate-/r*54.3%
*-commutative54.3%
associate-/r*52.1%
associate-*r*45.7%
associate-/r*42.5%
Simplified42.5%
Taylor expanded in b around 0 17.9%
+-commutative17.9%
+-commutative17.9%
mul-1-neg17.9%
unsub-neg17.9%
*-commutative17.9%
times-frac17.5%
mul-1-neg17.5%
distribute-rgt-neg-in17.5%
distribute-rgt-out33.2%
metadata-eval33.2%
*-commutative33.2%
distribute-lft-neg-in33.2%
metadata-eval33.2%
Simplified33.2%
Taylor expanded in b around inf 57.0%
associate-/l*60.1%
associate-*r/60.1%
*-commutative60.1%
associate-/l*54.2%
associate-*r/54.2%
unpow254.2%
associate-/l*54.2%
associate-*r/54.2%
associate-/l/60.1%
associate-/r*57.2%
associate-*r/57.2%
Simplified57.2%
if -1.64999999999999995e129 < t Initial program 98.3%
Taylor expanded in t around 0 86.2%
+-commutative86.2%
mul-1-neg86.2%
unsub-neg86.2%
Simplified86.2%
Taylor expanded in y around 0 67.0%
exp-neg67.0%
associate-*r/67.0%
*-rgt-identity67.0%
+-commutative67.0%
exp-sum67.0%
rem-exp-log67.7%
associate-/r*63.2%
associate-/r*63.2%
*-commutative63.2%
associate-/r*66.8%
associate-*r*64.1%
associate-/r*61.4%
Simplified61.4%
Final simplification60.9%
(FPCore (x y z t a b) :precision binary64 (/ (/ x (* a (exp b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x / (a * exp(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 / (a * exp(b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x / (a * Math.exp(b))) / y;
}
def code(x, y, z, t, a, b): return (x / (a * math.exp(b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x / Float64(a * exp(b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x / (a * exp(b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x / N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{x}{a \cdot e^{b}}}{y}
\end{array}
Initial program 98.5%
Taylor expanded in t around 0 83.0%
+-commutative83.0%
mul-1-neg83.0%
unsub-neg83.0%
Simplified83.0%
Taylor expanded in y around 0 65.8%
exp-neg65.8%
associate-*r/65.8%
*-rgt-identity65.8%
+-commutative65.8%
exp-sum65.8%
rem-exp-log66.4%
Simplified66.4%
Final simplification66.4%
(FPCore (x y z t a b) :precision binary64 (if (<= b -3.5e+67) (* (* b b) (/ (* 0.5 (/ x a)) y)) (if (<= b -750.0) (* (/ x y) (/ (- 1.0 b) a)) (/ (/ x (+ a (* a b))) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -3.5e+67) {
tmp = (b * b) * ((0.5 * (x / a)) / y);
} else if (b <= -750.0) {
tmp = (x / y) * ((1.0 - b) / a);
} else {
tmp = (x / (a + (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 (b <= (-3.5d+67)) then
tmp = (b * b) * ((0.5d0 * (x / a)) / y)
else if (b <= (-750.0d0)) then
tmp = (x / y) * ((1.0d0 - b) / a)
else
tmp = (x / (a + (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 (b <= -3.5e+67) {
tmp = (b * b) * ((0.5 * (x / a)) / y);
} else if (b <= -750.0) {
tmp = (x / y) * ((1.0 - b) / a);
} else {
tmp = (x / (a + (a * b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -3.5e+67: tmp = (b * b) * ((0.5 * (x / a)) / y) elif b <= -750.0: tmp = (x / y) * ((1.0 - b) / a) else: tmp = (x / (a + (a * b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -3.5e+67) tmp = Float64(Float64(b * b) * Float64(Float64(0.5 * Float64(x / a)) / y)); elseif (b <= -750.0) tmp = Float64(Float64(x / y) * Float64(Float64(1.0 - b) / a)); else tmp = Float64(Float64(x / Float64(a + Float64(a * b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -3.5e+67) tmp = (b * b) * ((0.5 * (x / a)) / y); elseif (b <= -750.0) tmp = (x / y) * ((1.0 - b) / a); else tmp = (x / (a + (a * b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -3.5e+67], N[(N[(b * b), $MachinePrecision] * N[(N[(0.5 * N[(x / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -750.0], N[(N[(x / y), $MachinePrecision] * N[(N[(1.0 - b), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(a + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.5 \cdot 10^{+67}:\\
\;\;\;\;\left(b \cdot b\right) \cdot \frac{0.5 \cdot \frac{x}{a}}{y}\\
\mathbf{elif}\;b \leq -750:\\
\;\;\;\;\frac{x}{y} \cdot \frac{1 - b}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a + a \cdot b}}{y}\\
\end{array}
\end{array}
if b < -3.5e67Initial program 100.0%
Taylor expanded in t around 0 90.0%
+-commutative90.0%
mul-1-neg90.0%
unsub-neg90.0%
Simplified90.0%
Taylor expanded in y around 0 87.9%
exp-neg87.9%
associate-*r/87.9%
*-rgt-identity87.9%
+-commutative87.9%
exp-sum87.9%
rem-exp-log87.9%
associate-/r*81.8%
associate-/r*81.8%
*-commutative81.8%
associate-/r*87.9%
associate-*r*79.7%
associate-/r*77.7%
Simplified77.7%
Taylor expanded in b around 0 39.7%
+-commutative39.7%
+-commutative39.7%
mul-1-neg39.7%
unsub-neg39.7%
*-commutative39.7%
times-frac39.5%
mul-1-neg39.5%
distribute-rgt-neg-in39.5%
distribute-rgt-out66.1%
metadata-eval66.1%
*-commutative66.1%
distribute-lft-neg-in66.1%
metadata-eval66.1%
Simplified56.6%
Taylor expanded in b around inf 72.0%
associate-/l*66.2%
associate-*r/66.2%
*-commutative66.2%
associate-/l*64.2%
associate-*r/64.2%
unpow264.2%
associate-/l*64.2%
associate-*r/64.2%
associate-/l/66.2%
associate-/r*70.3%
associate-*r/70.3%
Simplified70.3%
if -3.5e67 < b < -750Initial program 100.0%
associate-*l/89.5%
*-commutative89.5%
+-commutative89.5%
associate--l+89.5%
exp-sum68.4%
*-commutative68.4%
exp-to-pow68.4%
sub-neg68.4%
metadata-eval68.4%
exp-diff68.4%
*-commutative68.4%
exp-to-pow68.4%
Simplified68.4%
Taylor expanded in y around 0 78.9%
*-commutative78.9%
*-commutative78.9%
times-frac68.4%
exp-to-pow68.4%
sub-neg68.4%
metadata-eval68.4%
Simplified68.4%
Taylor expanded in b around 0 69.1%
associate-*r*69.1%
neg-mul-169.1%
distribute-rgt1-in69.1%
sub-neg69.1%
metadata-eval69.1%
+-commutative69.1%
distribute-rgt-out69.1%
neg-mul-169.1%
log-rec69.1%
+-commutative69.1%
log-rec69.1%
unsub-neg69.1%
log-pow69.1%
log-div69.1%
rem-exp-log69.1%
Simplified69.1%
Taylor expanded in t around 0 44.1%
if -750 < b Initial program 98.0%
Taylor expanded in t around 0 81.0%
+-commutative81.0%
mul-1-neg81.0%
unsub-neg81.0%
Simplified81.0%
Taylor expanded in y around 0 58.2%
exp-neg58.2%
associate-*r/58.2%
*-rgt-identity58.2%
+-commutative58.2%
exp-sum58.2%
rem-exp-log59.0%
Simplified59.0%
Taylor expanded in b around 0 45.7%
Final simplification50.3%
(FPCore (x y z t a b) :precision binary64 (if (<= b -750.0) (/ (* 0.5 (* x (* b b))) (* y a)) (/ (/ x (+ a (* a b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -750.0) {
tmp = (0.5 * (x * (b * b))) / (y * a);
} else {
tmp = (x / (a + (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 (b <= (-750.0d0)) then
tmp = (0.5d0 * (x * (b * b))) / (y * a)
else
tmp = (x / (a + (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 (b <= -750.0) {
tmp = (0.5 * (x * (b * b))) / (y * a);
} else {
tmp = (x / (a + (a * b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -750.0: tmp = (0.5 * (x * (b * b))) / (y * a) else: tmp = (x / (a + (a * b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -750.0) tmp = Float64(Float64(0.5 * Float64(x * Float64(b * b))) / Float64(y * a)); else tmp = Float64(Float64(x / Float64(a + Float64(a * b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -750.0) tmp = (0.5 * (x * (b * b))) / (y * a); else tmp = (x / (a + (a * b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -750.0], N[(N[(0.5 * N[(x * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(a + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -750:\\
\;\;\;\;\frac{0.5 \cdot \left(x \cdot \left(b \cdot b\right)\right)}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a + a \cdot b}}{y}\\
\end{array}
\end{array}
if b < -750Initial program 100.0%
Taylor expanded in t around 0 88.4%
+-commutative88.4%
mul-1-neg88.4%
unsub-neg88.4%
Simplified88.4%
Taylor expanded in y around 0 87.0%
exp-neg87.0%
associate-*r/87.0%
*-rgt-identity87.0%
+-commutative87.0%
exp-sum87.0%
rem-exp-log87.0%
associate-/r*81.1%
associate-/r*81.1%
*-commutative81.1%
associate-/r*87.0%
associate-*r*79.6%
associate-/r*75.2%
Simplified75.2%
Taylor expanded in b around 0 29.5%
+-commutative29.5%
+-commutative29.5%
mul-1-neg29.5%
unsub-neg29.5%
*-commutative29.5%
times-frac29.4%
mul-1-neg29.4%
distribute-rgt-neg-in29.4%
distribute-rgt-out55.9%
metadata-eval55.9%
*-commutative55.9%
distribute-lft-neg-in55.9%
metadata-eval55.9%
Simplified54.5%
Taylor expanded in b around inf 62.8%
associate-*r/62.8%
*-commutative62.8%
unpow262.8%
Simplified62.8%
if -750 < b Initial program 98.0%
Taylor expanded in t around 0 81.0%
+-commutative81.0%
mul-1-neg81.0%
unsub-neg81.0%
Simplified81.0%
Taylor expanded in y around 0 58.2%
exp-neg58.2%
associate-*r/58.2%
*-rgt-identity58.2%
+-commutative58.2%
exp-sum58.2%
rem-exp-log59.0%
Simplified59.0%
Taylor expanded in b around 0 45.7%
Final simplification50.3%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1250.0) (* (/ (/ b y) a) (- x)) (/ (/ x (+ a (* a b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1250.0) {
tmp = ((b / y) / a) * -x;
} else {
tmp = (x / (a + (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 (b <= (-1250.0d0)) then
tmp = ((b / y) / a) * -x
else
tmp = (x / (a + (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 (b <= -1250.0) {
tmp = ((b / y) / a) * -x;
} else {
tmp = (x / (a + (a * b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1250.0: tmp = ((b / y) / a) * -x else: tmp = (x / (a + (a * b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1250.0) tmp = Float64(Float64(Float64(b / y) / a) * Float64(-x)); else tmp = Float64(Float64(x / Float64(a + Float64(a * b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1250.0) tmp = ((b / y) / a) * -x; else tmp = (x / (a + (a * b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1250.0], N[(N[(N[(b / y), $MachinePrecision] / a), $MachinePrecision] * (-x)), $MachinePrecision], N[(N[(x / N[(a + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1250:\\
\;\;\;\;\frac{\frac{b}{y}}{a} \cdot \left(-x\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a + a \cdot b}}{y}\\
\end{array}
\end{array}
if b < -1250Initial program 100.0%
Taylor expanded in t around 0 88.4%
+-commutative88.4%
mul-1-neg88.4%
unsub-neg88.4%
Simplified88.4%
Taylor expanded in y around 0 87.0%
exp-neg87.0%
associate-*r/87.0%
*-rgt-identity87.0%
+-commutative87.0%
exp-sum87.0%
rem-exp-log87.0%
associate-/r*81.1%
associate-/r*81.1%
*-commutative81.1%
associate-/r*87.0%
associate-*r*79.6%
associate-/r*75.2%
Simplified75.2%
Taylor expanded in b around 0 39.0%
+-commutative39.0%
mul-1-neg39.0%
unsub-neg39.0%
*-commutative39.0%
times-frac43.2%
Simplified43.2%
Taylor expanded in b around inf 39.0%
associate-/l*40.6%
associate-/r/42.0%
associate-*l*42.0%
mul-1-neg42.0%
*-commutative42.0%
distribute-frac-neg42.0%
*-commutative42.0%
associate-/r*46.1%
Simplified46.1%
if -1250 < b Initial program 98.0%
Taylor expanded in t around 0 81.0%
+-commutative81.0%
mul-1-neg81.0%
unsub-neg81.0%
Simplified81.0%
Taylor expanded in y around 0 58.2%
exp-neg58.2%
associate-*r/58.2%
*-rgt-identity58.2%
+-commutative58.2%
exp-sum58.2%
rem-exp-log59.0%
Simplified59.0%
Taylor expanded in b around 0 45.7%
Final simplification45.8%
(FPCore (x y z t a b) :precision binary64 (if (<= b -64000.0) (* (/ (/ b y) a) (- x)) (/ (/ x a) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -64000.0) {
tmp = ((b / y) / a) * -x;
} else {
tmp = (x / a) / 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 <= (-64000.0d0)) then
tmp = ((b / y) / a) * -x
else
tmp = (x / a) / 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 <= -64000.0) {
tmp = ((b / y) / a) * -x;
} else {
tmp = (x / a) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -64000.0: tmp = ((b / y) / a) * -x else: tmp = (x / a) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -64000.0) tmp = Float64(Float64(Float64(b / y) / a) * Float64(-x)); else tmp = Float64(Float64(x / a) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -64000.0) tmp = ((b / y) / a) * -x; else tmp = (x / a) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -64000.0], N[(N[(N[(b / y), $MachinePrecision] / a), $MachinePrecision] * (-x)), $MachinePrecision], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -64000:\\
\;\;\;\;\frac{\frac{b}{y}}{a} \cdot \left(-x\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\end{array}
\end{array}
if b < -64000Initial program 100.0%
Taylor expanded in t around 0 88.2%
+-commutative88.2%
mul-1-neg88.2%
unsub-neg88.2%
Simplified88.2%
Taylor expanded in y around 0 86.8%
exp-neg86.8%
associate-*r/86.8%
*-rgt-identity86.8%
+-commutative86.8%
exp-sum86.8%
rem-exp-log86.8%
associate-/r*80.8%
associate-/r*80.8%
*-commutative80.8%
associate-/r*86.8%
associate-*r*80.8%
associate-/r*76.3%
Simplified76.3%
Taylor expanded in b around 0 39.6%
+-commutative39.6%
mul-1-neg39.6%
unsub-neg39.6%
*-commutative39.6%
times-frac43.8%
Simplified43.8%
Taylor expanded in b around inf 39.6%
associate-/l*41.2%
associate-/r/42.6%
associate-*l*42.6%
mul-1-neg42.6%
*-commutative42.6%
distribute-frac-neg42.6%
*-commutative42.6%
associate-/r*46.7%
Simplified46.7%
if -64000 < b Initial program 98.0%
Taylor expanded in t around 0 81.1%
+-commutative81.1%
mul-1-neg81.1%
unsub-neg81.1%
Simplified81.1%
Taylor expanded in b around 0 66.1%
*-commutative66.1%
div-exp66.1%
*-commutative66.1%
exp-to-pow66.2%
rem-exp-log67.0%
Simplified67.0%
Taylor expanded in y around 0 41.0%
Final simplification42.5%
(FPCore (x y z t a b) :precision binary64 (if (<= b -6.2e-40) (/ x (* y a)) (/ (/ x a) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -6.2e-40) {
tmp = x / (y * a);
} else {
tmp = (x / a) / 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 <= (-6.2d-40)) then
tmp = x / (y * a)
else
tmp = (x / a) / 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 <= -6.2e-40) {
tmp = x / (y * a);
} else {
tmp = (x / a) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -6.2e-40: tmp = x / (y * a) else: tmp = (x / a) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -6.2e-40) tmp = Float64(x / Float64(y * a)); else tmp = Float64(Float64(x / a) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -6.2e-40) tmp = x / (y * a); else tmp = (x / a) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -6.2e-40], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -6.2 \cdot 10^{-40}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\end{array}
\end{array}
if b < -6.20000000000000021e-40Initial program 99.8%
Taylor expanded in t around 0 86.3%
+-commutative86.3%
mul-1-neg86.3%
unsub-neg86.3%
Simplified86.3%
Taylor expanded in y around 0 79.0%
exp-neg79.0%
associate-*r/79.0%
*-rgt-identity79.0%
+-commutative79.0%
exp-sum79.0%
rem-exp-log79.2%
associate-/r*75.3%
associate-/r*75.3%
*-commutative75.3%
associate-/r*79.2%
associate-*r*74.1%
associate-/r*70.3%
Simplified70.3%
Taylor expanded in b around 0 33.6%
if -6.20000000000000021e-40 < b Initial program 97.9%
Taylor expanded in t around 0 81.5%
+-commutative81.5%
mul-1-neg81.5%
unsub-neg81.5%
Simplified81.5%
Taylor expanded in b around 0 65.4%
*-commutative65.4%
div-exp65.4%
*-commutative65.4%
exp-to-pow65.4%
rem-exp-log66.3%
Simplified66.3%
Taylor expanded in y around 0 41.1%
Final simplification38.8%
(FPCore (x y z t a b) :precision binary64 (/ x (* y a)))
double code(double x, double y, double z, double t, double a, double b) {
return x / (y * a);
}
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 * a)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x / (y * a);
}
def code(x, y, z, t, a, b): return x / (y * a)
function code(x, y, z, t, a, b) return Float64(x / Float64(y * a)) end
function tmp = code(x, y, z, t, a, b) tmp = x / (y * a); end
code[x_, y_, z_, t_, a_, b_] := N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y \cdot a}
\end{array}
Initial program 98.5%
Taylor expanded in t around 0 83.0%
+-commutative83.0%
mul-1-neg83.0%
unsub-neg83.0%
Simplified83.0%
Taylor expanded in y around 0 65.8%
exp-neg65.8%
associate-*r/65.8%
*-rgt-identity65.8%
+-commutative65.8%
exp-sum65.8%
rem-exp-log66.4%
associate-/r*62.1%
associate-/r*62.1%
*-commutative62.1%
associate-/r*65.0%
associate-*r*61.8%
associate-/r*59.0%
Simplified59.0%
Taylor expanded in b around 0 35.8%
Final simplification35.8%
(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 2023275
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:incompleteBetaWorker from math-functions-0.1.5.2, A"
:precision binary64
:herbie-target
(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))