
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x * exp((((y * log(z)) + ((t - 1.0d0) * log(a))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x * Math.exp((((y * Math.log(z)) + ((t - 1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + ((t - 1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x * exp((((y * log(z)) + ((t - 1.0d0) * log(a))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x * Math.exp((((y * Math.log(z)) + ((t - 1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + ((t - 1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\end{array}
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (log a) (+ t -1.0))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + (log(a) * (t + -1.0))) - b))) / y;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x * exp((((y * log(z)) + (log(a) * (t + (-1.0d0)))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x * Math.exp((((y * Math.log(z)) + (Math.log(a) * (t + -1.0))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + (math.log(a) * (t + -1.0))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(log(a) * Float64(t + -1.0))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + (log(a) * (t + -1.0))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[Log[a], $MachinePrecision] * N[(t + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \log a \cdot \left(t + -1\right)\right) - b}}{y}
\end{array}
Initial program 98.7%
Final simplification98.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -2.15e+97) (not (<= t 8e+53))) (/ (* x (exp (- (* (log a) (+ t -1.0)) b))) y) (/ (* x (exp (- (- (* y (log z)) (log a)) b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -2.15e+97) || !(t <= 8e+53)) {
tmp = (x * exp(((log(a) * (t + -1.0)) - b))) / y;
} else {
tmp = (x * exp((((y * log(z)) - log(a)) - b))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-2.15d+97)) .or. (.not. (t <= 8d+53))) then
tmp = (x * exp(((log(a) * (t + (-1.0d0))) - b))) / y
else
tmp = (x * exp((((y * log(z)) - log(a)) - b))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -2.15e+97) || !(t <= 8e+53)) {
tmp = (x * Math.exp(((Math.log(a) * (t + -1.0)) - b))) / y;
} else {
tmp = (x * Math.exp((((y * Math.log(z)) - Math.log(a)) - b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -2.15e+97) or not (t <= 8e+53): tmp = (x * math.exp(((math.log(a) * (t + -1.0)) - b))) / y else: tmp = (x * math.exp((((y * math.log(z)) - math.log(a)) - b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -2.15e+97) || !(t <= 8e+53)) tmp = Float64(Float64(x * exp(Float64(Float64(log(a) * Float64(t + -1.0)) - b))) / y); else tmp = Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) - log(a)) - b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -2.15e+97) || ~((t <= 8e+53))) tmp = (x * exp(((log(a) * (t + -1.0)) - b))) / y; else tmp = (x * exp((((y * log(z)) - log(a)) - b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -2.15e+97], N[Not[LessEqual[t, 8e+53]], $MachinePrecision]], N[(N[(x * N[Exp[N[(N[(N[Log[a], $MachinePrecision] * N[(t + -1.0), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] - N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.15 \cdot 10^{+97} \lor \neg \left(t \leq 8 \cdot 10^{+53}\right):\\
\;\;\;\;\frac{x \cdot e^{\log a \cdot \left(t + -1\right) - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\left(y \cdot \log z - \log a\right) - b}}{y}\\
\end{array}
\end{array}
if t < -2.1499999999999999e97 or 7.9999999999999999e53 < t Initial program 100.0%
Taylor expanded in y around 0 91.3%
if -2.1499999999999999e97 < t < 7.9999999999999999e53Initial program 98.0%
Taylor expanded in t around 0 96.7%
+-commutative96.7%
mul-1-neg96.7%
unsub-neg96.7%
Simplified96.7%
Final simplification94.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2.3e+136) (not (<= y 1.25e+104))) (/ (* x (/ (pow z y) a)) 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 <= -2.3e+136) || !(y <= 1.25e+104)) {
tmp = (x * (pow(z, y) / a)) / 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 <= (-2.3d+136)) .or. (.not. (y <= 1.25d+104))) then
tmp = (x * ((z ** y) / a)) / 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 <= -2.3e+136) || !(y <= 1.25e+104)) {
tmp = (x * (Math.pow(z, y) / a)) / 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 <= -2.3e+136) or not (y <= 1.25e+104): tmp = (x * (math.pow(z, y) / a)) / 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 <= -2.3e+136) || !(y <= 1.25e+104)) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / 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 <= -2.3e+136) || ~((y <= 1.25e+104))) tmp = (x * ((z ^ y) / a)) / 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, -2.3e+136], N[Not[LessEqual[y, 1.25e+104]], $MachinePrecision]], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $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 -2.3 \cdot 10^{+136} \lor \neg \left(y \leq 1.25 \cdot 10^{+104}\right):\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\log a \cdot \left(t + -1\right) - b}}{y}\\
\end{array}
\end{array}
if y < -2.3e136 or 1.2499999999999999e104 < y Initial program 100.0%
Taylor expanded in t around 0 90.5%
+-commutative90.5%
mul-1-neg90.5%
unsub-neg90.5%
Simplified90.5%
Taylor expanded in b around 0 88.4%
div-exp88.4%
*-commutative88.4%
exp-to-pow88.4%
rem-exp-log88.4%
Simplified88.4%
if -2.3e136 < y < 1.2499999999999999e104Initial program 97.9%
Taylor expanded in y around 0 89.1%
Final simplification88.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1e+29) (not (<= y 7.2e+18))) (/ (* 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 <= -1e+29) || !(y <= 7.2e+18)) {
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 <= (-1d+29)) .or. (.not. (y <= 7.2d+18))) 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 <= -1e+29) || !(y <= 7.2e+18)) {
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 <= -1e+29) or not (y <= 7.2e+18): 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 <= -1e+29) || !(y <= 7.2e+18)) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y); else tmp = Float64(x * Float64(Float64((a ^ Float64(t + -1.0)) / exp(b)) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1e+29) || ~((y <= 7.2e+18))) 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, -1e+29], N[Not[LessEqual[y, 7.2e+18]], $MachinePrecision]], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x * N[(N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / N[Exp[b], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{+29} \lor \neg \left(y \leq 7.2 \cdot 10^{+18}\right):\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{\frac{{a}^{\left(t + -1\right)}}{e^{b}}}{y}\\
\end{array}
\end{array}
if y < -9.99999999999999914e28 or 7.2e18 < y Initial program 100.0%
Taylor expanded in t around 0 88.8%
+-commutative88.8%
mul-1-neg88.8%
unsub-neg88.8%
Simplified88.8%
Taylor expanded in b around 0 80.6%
div-exp80.6%
*-commutative80.6%
exp-to-pow80.6%
rem-exp-log80.6%
Simplified80.6%
if -9.99999999999999914e28 < y < 7.2e18Initial program 97.3%
Taylor expanded in y around 0 94.4%
div-exp81.5%
exp-to-pow82.2%
sub-neg82.2%
metadata-eval82.2%
associate-*r/83.8%
Simplified83.8%
Final simplification82.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -6.7e+81) (not (<= b 2.6e+15))) (/ x (* a (* y (exp b)))) (* (/ (pow z y) a) (/ x y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -6.7e+81) || !(b <= 2.6e+15)) {
tmp = x / (a * (y * exp(b)));
} else {
tmp = (pow(z, y) / a) * (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 ((b <= (-6.7d+81)) .or. (.not. (b <= 2.6d+15))) then
tmp = x / (a * (y * exp(b)))
else
tmp = ((z ** y) / a) * (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 ((b <= -6.7e+81) || !(b <= 2.6e+15)) {
tmp = x / (a * (y * Math.exp(b)));
} else {
tmp = (Math.pow(z, y) / a) * (x / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -6.7e+81) or not (b <= 2.6e+15): tmp = x / (a * (y * math.exp(b))) else: tmp = (math.pow(z, y) / a) * (x / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -6.7e+81) || !(b <= 2.6e+15)) tmp = Float64(x / Float64(a * Float64(y * exp(b)))); else tmp = Float64(Float64((z ^ y) / a) * Float64(x / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -6.7e+81) || ~((b <= 2.6e+15))) tmp = x / (a * (y * exp(b))); else tmp = ((z ^ y) / a) * (x / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -6.7e+81], N[Not[LessEqual[b, 2.6e+15]], $MachinePrecision]], N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -6.7 \cdot 10^{+81} \lor \neg \left(b \leq 2.6 \cdot 10^{+15}\right):\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{{z}^{y}}{a} \cdot \frac{x}{y}\\
\end{array}
\end{array}
if b < -6.69999999999999962e81 or 2.6e15 < b Initial program 100.0%
Taylor expanded in y around 0 86.3%
div-exp65.9%
exp-to-pow65.9%
sub-neg65.9%
metadata-eval65.9%
associate-*r/65.9%
Simplified65.9%
Taylor expanded in t around 0 75.4%
if -6.69999999999999962e81 < b < 2.6e15Initial program 97.7%
add-cube-cbrt97.7%
pow397.7%
exp-diff89.6%
exp-sum78.1%
*-commutative78.1%
pow-to-exp78.1%
sub-neg78.1%
metadata-eval78.1%
*-commutative78.1%
pow-to-exp78.9%
associate-*r/78.9%
Applied egg-rr78.9%
Taylor expanded in t around 0 72.6%
Taylor expanded in b around 0 67.2%
*-commutative67.2%
times-frac69.2%
Simplified69.2%
Final simplification71.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -3.3e+37) (not (<= y 2.2e+19))) (/ (* x (/ (pow z y) a)) y) (/ x (* a (* y (exp b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.3e+37) || !(y <= 2.2e+19)) {
tmp = (x * (pow(z, y) / a)) / 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 <= (-3.3d+37)) .or. (.not. (y <= 2.2d+19))) then
tmp = (x * ((z ** y) / a)) / 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 <= -3.3e+37) || !(y <= 2.2e+19)) {
tmp = (x * (Math.pow(z, y) / a)) / y;
} else {
tmp = x / (a * (y * Math.exp(b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -3.3e+37) or not (y <= 2.2e+19): tmp = (x * (math.pow(z, y) / a)) / y else: tmp = x / (a * (y * math.exp(b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -3.3e+37) || !(y <= 2.2e+19)) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / 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 <= -3.3e+37) || ~((y <= 2.2e+19))) tmp = (x * ((z ^ y) / a)) / y; else tmp = x / (a * (y * exp(b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -3.3e+37], N[Not[LessEqual[y, 2.2e+19]], $MachinePrecision]], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $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 -3.3 \cdot 10^{+37} \lor \neg \left(y \leq 2.2 \cdot 10^{+19}\right):\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\end{array}
\end{array}
if y < -3.3000000000000001e37 or 2.2e19 < y Initial 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 b around 0 82.3%
div-exp82.3%
*-commutative82.3%
exp-to-pow82.3%
rem-exp-log82.3%
Simplified82.3%
if -3.3000000000000001e37 < y < 2.2e19Initial program 97.4%
Taylor expanded in y around 0 94.5%
div-exp79.0%
exp-to-pow79.7%
sub-neg79.7%
metadata-eval79.7%
associate-*r/81.2%
Simplified81.2%
Taylor expanded in t around 0 71.8%
Final simplification77.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -3800000000000.0) (not (<= t 7.2e+53))) (/ (* x (pow a (+ t -1.0))) y) (/ (* x (/ (pow z y) a)) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -3800000000000.0) || !(t <= 7.2e+53)) {
tmp = (x * pow(a, (t + -1.0))) / y;
} else {
tmp = (x * (pow(z, y) / 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 ((t <= (-3800000000000.0d0)) .or. (.not. (t <= 7.2d+53))) then
tmp = (x * (a ** (t + (-1.0d0)))) / y
else
tmp = (x * ((z ** y) / 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 ((t <= -3800000000000.0) || !(t <= 7.2e+53)) {
tmp = (x * Math.pow(a, (t + -1.0))) / y;
} else {
tmp = (x * (Math.pow(z, y) / a)) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -3800000000000.0) or not (t <= 7.2e+53): tmp = (x * math.pow(a, (t + -1.0))) / y else: tmp = (x * (math.pow(z, y) / a)) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -3800000000000.0) || !(t <= 7.2e+53)) tmp = Float64(Float64(x * (a ^ Float64(t + -1.0))) / y); else tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -3800000000000.0) || ~((t <= 7.2e+53))) tmp = (x * (a ^ (t + -1.0))) / y; else tmp = (x * ((z ^ y) / a)) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -3800000000000.0], N[Not[LessEqual[t, 7.2e+53]], $MachinePrecision]], N[(N[(x * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3800000000000 \lor \neg \left(t \leq 7.2 \cdot 10^{+53}\right):\\
\;\;\;\;\frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\end{array}
\end{array}
if t < -3.8e12 or 7.2e53 < t Initial program 100.0%
Taylor expanded in y around 0 89.5%
div-exp63.2%
exp-to-pow63.2%
sub-neg63.2%
metadata-eval63.2%
associate-*r/63.2%
Simplified63.2%
Taylor expanded in b around 0 85.7%
Simplified85.7%
if -3.8e12 < t < 7.2e53Initial program 97.8%
Taylor expanded in t around 0 97.6%
+-commutative97.6%
mul-1-neg97.6%
unsub-neg97.6%
Simplified97.6%
Taylor expanded in b around 0 73.3%
div-exp73.3%
*-commutative73.3%
exp-to-pow73.3%
rem-exp-log74.1%
Simplified74.1%
Final simplification78.7%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -1.5e-246)
(/ x (* a (* y (exp b))))
(if (<= b 1.7e-29)
(/ (* y (- (* a (/ x a)) (* x b))) (* a (* y y)))
(* x (/ (/ (exp (- b)) a) y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.5e-246) {
tmp = x / (a * (y * exp(b)));
} else if (b <= 1.7e-29) {
tmp = (y * ((a * (x / a)) - (x * b))) / (a * (y * y));
} else {
tmp = x * ((exp(-b) / 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 <= (-1.5d-246)) then
tmp = x / (a * (y * exp(b)))
else if (b <= 1.7d-29) then
tmp = (y * ((a * (x / a)) - (x * b))) / (a * (y * y))
else
tmp = x * ((exp(-b) / 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 <= -1.5e-246) {
tmp = x / (a * (y * Math.exp(b)));
} else if (b <= 1.7e-29) {
tmp = (y * ((a * (x / a)) - (x * b))) / (a * (y * y));
} else {
tmp = x * ((Math.exp(-b) / a) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.5e-246: tmp = x / (a * (y * math.exp(b))) elif b <= 1.7e-29: tmp = (y * ((a * (x / a)) - (x * b))) / (a * (y * y)) else: tmp = x * ((math.exp(-b) / a) / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.5e-246) tmp = Float64(x / Float64(a * Float64(y * exp(b)))); elseif (b <= 1.7e-29) tmp = Float64(Float64(y * Float64(Float64(a * Float64(x / a)) - Float64(x * b))) / Float64(a * Float64(y * y))); else tmp = Float64(x * Float64(Float64(exp(Float64(-b)) / a) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.5e-246) tmp = x / (a * (y * exp(b))); elseif (b <= 1.7e-29) tmp = (y * ((a * (x / a)) - (x * b))) / (a * (y * y)); else tmp = x * ((exp(-b) / a) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.5e-246], N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.7e-29], N[(N[(y * N[(N[(a * N[(x / a), $MachinePrecision]), $MachinePrecision] - N[(x * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(N[Exp[(-b)], $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.5 \cdot 10^{-246}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\mathbf{elif}\;b \leq 1.7 \cdot 10^{-29}:\\
\;\;\;\;\frac{y \cdot \left(a \cdot \frac{x}{a} - x \cdot b\right)}{a \cdot \left(y \cdot y\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{\frac{e^{-b}}{a}}{y}\\
\end{array}
\end{array}
if b < -1.5e-246Initial program 98.3%
Taylor expanded in y around 0 71.2%
div-exp59.4%
exp-to-pow59.8%
sub-neg59.8%
metadata-eval59.8%
associate-*r/61.6%
Simplified61.6%
Taylor expanded in t around 0 55.9%
if -1.5e-246 < b < 1.69999999999999986e-29Initial program 97.9%
Taylor expanded in y around 0 71.2%
div-exp71.2%
exp-to-pow71.7%
sub-neg71.7%
metadata-eval71.7%
associate-*r/73.1%
Simplified73.1%
Taylor expanded in t around 0 33.6%
Taylor expanded in b around 0 24.5%
+-commutative24.5%
associate-/r*24.4%
associate-*r/24.4%
frac-add25.3%
div-inv25.3%
div-inv25.3%
*-commutative25.3%
neg-mul-125.3%
*-commutative25.3%
distribute-rgt-neg-in25.3%
*-commutative25.3%
Applied egg-rr25.3%
+-commutative25.3%
*-commutative25.3%
associate-*l*37.5%
distribute-lft-out37.5%
associate-*r*46.2%
Simplified46.2%
if 1.69999999999999986e-29 < b Initial program 99.8%
Taylor expanded in y around 0 87.5%
div-exp65.0%
exp-to-pow65.1%
sub-neg65.1%
metadata-eval65.1%
associate-*r/65.2%
Simplified65.2%
Taylor expanded in t around 0 71.7%
*-commutative71.7%
associate-/r*71.7%
exp-neg71.7%
Simplified71.7%
Final simplification58.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -1.46e-249) (not (<= b 7.2e-29))) (/ x (* a (* y (exp b)))) (/ (* y (- (* a (/ x a)) (* x b))) (* a (* y y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.46e-249) || !(b <= 7.2e-29)) {
tmp = x / (a * (y * exp(b)));
} else {
tmp = (y * ((a * (x / a)) - (x * b))) / (a * (y * 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 <= (-1.46d-249)) .or. (.not. (b <= 7.2d-29))) then
tmp = x / (a * (y * exp(b)))
else
tmp = (y * ((a * (x / a)) - (x * b))) / (a * (y * 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 <= -1.46e-249) || !(b <= 7.2e-29)) {
tmp = x / (a * (y * Math.exp(b)));
} else {
tmp = (y * ((a * (x / a)) - (x * b))) / (a * (y * y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -1.46e-249) or not (b <= 7.2e-29): tmp = x / (a * (y * math.exp(b))) else: tmp = (y * ((a * (x / a)) - (x * b))) / (a * (y * y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -1.46e-249) || !(b <= 7.2e-29)) tmp = Float64(x / Float64(a * Float64(y * exp(b)))); else tmp = Float64(Float64(y * Float64(Float64(a * Float64(x / a)) - Float64(x * b))) / Float64(a * Float64(y * y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -1.46e-249) || ~((b <= 7.2e-29))) tmp = x / (a * (y * exp(b))); else tmp = (y * ((a * (x / a)) - (x * b))) / (a * (y * y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -1.46e-249], N[Not[LessEqual[b, 7.2e-29]], $MachinePrecision]], N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * N[(N[(a * N[(x / a), $MachinePrecision]), $MachinePrecision] - N[(x * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.46 \cdot 10^{-249} \lor \neg \left(b \leq 7.2 \cdot 10^{-29}\right):\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot \left(a \cdot \frac{x}{a} - x \cdot b\right)}{a \cdot \left(y \cdot y\right)}\\
\end{array}
\end{array}
if b < -1.46e-249 or 7.19999999999999948e-29 < b Initial program 98.9%
Taylor expanded in y around 0 78.1%
div-exp61.8%
exp-to-pow62.1%
sub-neg62.1%
metadata-eval62.1%
associate-*r/63.1%
Simplified63.1%
Taylor expanded in t around 0 62.5%
if -1.46e-249 < b < 7.19999999999999948e-29Initial program 97.9%
Taylor expanded in y around 0 71.2%
div-exp71.2%
exp-to-pow71.7%
sub-neg71.7%
metadata-eval71.7%
associate-*r/73.1%
Simplified73.1%
Taylor expanded in t around 0 33.6%
Taylor expanded in b around 0 24.5%
+-commutative24.5%
associate-/r*24.4%
associate-*r/24.4%
frac-add25.3%
div-inv25.3%
div-inv25.3%
*-commutative25.3%
neg-mul-125.3%
*-commutative25.3%
distribute-rgt-neg-in25.3%
*-commutative25.3%
Applied egg-rr25.3%
+-commutative25.3%
*-commutative25.3%
associate-*l*37.5%
distribute-lft-out37.5%
associate-*r*46.2%
Simplified46.2%
Final simplification58.3%
(FPCore (x y z t a b)
:precision binary64
(if (<= x 1.05e-101)
(/ 1.0 (/ a (/ x y)))
(if (<= x 7.3e+89)
(/ (* y (- (* a (/ x a)) (* x b))) (* a (* y y)))
(* (/ x (* y a)) (- 1.0 b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= 1.05e-101) {
tmp = 1.0 / (a / (x / y));
} else if (x <= 7.3e+89) {
tmp = (y * ((a * (x / a)) - (x * b))) / (a * (y * y));
} else {
tmp = (x / (y * a)) * (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 (x <= 1.05d-101) then
tmp = 1.0d0 / (a / (x / y))
else if (x <= 7.3d+89) then
tmp = (y * ((a * (x / a)) - (x * b))) / (a * (y * y))
else
tmp = (x / (y * a)) * (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 (x <= 1.05e-101) {
tmp = 1.0 / (a / (x / y));
} else if (x <= 7.3e+89) {
tmp = (y * ((a * (x / a)) - (x * b))) / (a * (y * y));
} else {
tmp = (x / (y * a)) * (1.0 - b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= 1.05e-101: tmp = 1.0 / (a / (x / y)) elif x <= 7.3e+89: tmp = (y * ((a * (x / a)) - (x * b))) / (a * (y * y)) else: tmp = (x / (y * a)) * (1.0 - b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= 1.05e-101) tmp = Float64(1.0 / Float64(a / Float64(x / y))); elseif (x <= 7.3e+89) tmp = Float64(Float64(y * Float64(Float64(a * Float64(x / a)) - Float64(x * b))) / Float64(a * Float64(y * y))); else tmp = Float64(Float64(x / Float64(y * a)) * Float64(1.0 - b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= 1.05e-101) tmp = 1.0 / (a / (x / y)); elseif (x <= 7.3e+89) tmp = (y * ((a * (x / a)) - (x * b))) / (a * (y * y)); else tmp = (x / (y * a)) * (1.0 - b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, 1.05e-101], N[(1.0 / N[(a / N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7.3e+89], N[(N[(y * N[(N[(a * N[(x / a), $MachinePrecision]), $MachinePrecision] - N[(x * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision] * N[(1.0 - b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.05 \cdot 10^{-101}:\\
\;\;\;\;\frac{1}{\frac{a}{\frac{x}{y}}}\\
\mathbf{elif}\;x \leq 7.3 \cdot 10^{+89}:\\
\;\;\;\;\frac{y \cdot \left(a \cdot \frac{x}{a} - x \cdot b\right)}{a \cdot \left(y \cdot y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot a} \cdot \left(1 - b\right)\\
\end{array}
\end{array}
if x < 1.05000000000000008e-101Initial program 98.6%
associate-/l*99.5%
associate--l+99.5%
exp-sum75.2%
associate-/l*73.0%
*-commutative73.0%
exp-to-pow73.0%
exp-diff64.2%
*-commutative64.2%
exp-to-pow64.6%
sub-neg64.6%
metadata-eval64.6%
Simplified64.6%
Taylor expanded in b around 0 66.7%
associate-/l*66.7%
exp-to-pow67.1%
sub-neg67.1%
metadata-eval67.1%
Simplified67.1%
Taylor expanded in y around 0 61.2%
Taylor expanded in t around 0 35.7%
associate-/r*35.1%
Simplified35.1%
associate-/l/35.7%
div-inv35.7%
associate-/r*37.7%
clear-num37.7%
Applied egg-rr37.7%
if 1.05000000000000008e-101 < x < 7.29999999999999972e89Initial program 98.6%
Taylor expanded in y around 0 74.4%
div-exp58.8%
exp-to-pow59.8%
sub-neg59.8%
metadata-eval59.8%
associate-*r/60.1%
Simplified60.1%
Taylor expanded in t around 0 48.4%
Taylor expanded in b around 0 27.2%
+-commutative27.2%
associate-/r*26.8%
associate-*r/26.8%
frac-add28.8%
div-inv28.8%
div-inv28.8%
*-commutative28.8%
neg-mul-128.8%
*-commutative28.8%
distribute-rgt-neg-in28.8%
*-commutative28.8%
Applied egg-rr28.8%
+-commutative28.8%
*-commutative28.8%
associate-*l*38.3%
distribute-lft-out38.3%
associate-*r*47.4%
Simplified47.4%
if 7.29999999999999972e89 < x Initial program 99.2%
Taylor expanded in y around 0 74.4%
div-exp65.1%
exp-to-pow65.5%
sub-neg65.5%
metadata-eval65.5%
associate-*r/65.5%
Simplified65.5%
Taylor expanded in t around 0 59.2%
Taylor expanded in b around 0 42.8%
Taylor expanded in x around 0 45.6%
+-commutative45.6%
*-commutative45.6%
mul-1-neg45.6%
*-commutative45.6%
unsub-neg45.6%
distribute-lft-out--45.5%
associate-*r/45.5%
associate-*l/45.5%
associate-*r/42.8%
associate-*l/43.2%
distribute-lft-out--48.0%
Simplified48.0%
Final simplification40.7%
(FPCore (x y z t a b) :precision binary64 (if (<= t -5.8e-131) (/ 1.0 (* y (/ a x))) (/ (/ x y) a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -5.8e-131) {
tmp = 1.0 / (y * (a / x));
} else {
tmp = (x / y) / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-5.8d-131)) then
tmp = 1.0d0 / (y * (a / x))
else
tmp = (x / y) / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -5.8e-131) {
tmp = 1.0 / (y * (a / x));
} else {
tmp = (x / y) / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -5.8e-131: tmp = 1.0 / (y * (a / x)) else: tmp = (x / y) / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -5.8e-131) tmp = Float64(1.0 / Float64(y * Float64(a / x))); else tmp = Float64(Float64(x / y) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -5.8e-131) tmp = 1.0 / (y * (a / x)); else tmp = (x / y) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -5.8e-131], N[(1.0 / N[(y * N[(a / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.8 \cdot 10^{-131}:\\
\;\;\;\;\frac{1}{y \cdot \frac{a}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{a}\\
\end{array}
\end{array}
if t < -5.8000000000000004e-131Initial program 99.4%
associate-/l*99.4%
associate--l+99.4%
exp-sum68.9%
associate-/l*67.6%
*-commutative67.6%
exp-to-pow67.6%
exp-diff53.0%
*-commutative53.0%
exp-to-pow53.6%
sub-neg53.6%
metadata-eval53.6%
Simplified53.6%
Taylor expanded in b around 0 64.3%
associate-/l*64.3%
exp-to-pow64.8%
sub-neg64.8%
metadata-eval64.8%
Simplified64.8%
Taylor expanded in y around 0 70.5%
Taylor expanded in t around 0 41.5%
associate-/r*41.5%
Simplified41.5%
associate-/l/41.5%
div-inv41.5%
clear-num41.5%
associate-/l*42.7%
Applied egg-rr42.7%
if -5.8000000000000004e-131 < t Initial program 98.4%
associate-/l*99.3%
associate--l+99.3%
exp-sum80.4%
associate-/l*78.1%
*-commutative78.1%
exp-to-pow78.1%
exp-diff71.2%
*-commutative71.2%
exp-to-pow71.8%
sub-neg71.8%
metadata-eval71.8%
Simplified71.8%
Taylor expanded in b around 0 70.9%
associate-/l*70.9%
exp-to-pow71.5%
sub-neg71.5%
metadata-eval71.5%
Simplified71.5%
Taylor expanded in y around 0 55.6%
Taylor expanded in t around 0 33.1%
associate-/r*32.5%
Simplified32.5%
associate-/l/33.1%
div-inv33.1%
associate-/r*37.7%
Applied egg-rr37.7%
Final simplification39.3%
(FPCore (x y z t a b) :precision binary64 (if (<= t -1.5e-130) (/ 1.0 (* y (/ a x))) (/ 1.0 (/ a (/ x y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.5e-130) {
tmp = 1.0 / (y * (a / x));
} else {
tmp = 1.0 / (a / (x / y));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-1.5d-130)) then
tmp = 1.0d0 / (y * (a / x))
else
tmp = 1.0d0 / (a / (x / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.5e-130) {
tmp = 1.0 / (y * (a / x));
} else {
tmp = 1.0 / (a / (x / y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.5e-130: tmp = 1.0 / (y * (a / x)) else: tmp = 1.0 / (a / (x / y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.5e-130) tmp = Float64(1.0 / Float64(y * Float64(a / x))); else tmp = Float64(1.0 / Float64(a / Float64(x / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -1.5e-130) tmp = 1.0 / (y * (a / x)); else tmp = 1.0 / (a / (x / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.5e-130], N[(1.0 / N[(y * N[(a / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(a / N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.5 \cdot 10^{-130}:\\
\;\;\;\;\frac{1}{y \cdot \frac{a}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{a}{\frac{x}{y}}}\\
\end{array}
\end{array}
if t < -1.49999999999999993e-130Initial program 99.4%
associate-/l*99.4%
associate--l+99.4%
exp-sum68.9%
associate-/l*67.6%
*-commutative67.6%
exp-to-pow67.6%
exp-diff53.0%
*-commutative53.0%
exp-to-pow53.6%
sub-neg53.6%
metadata-eval53.6%
Simplified53.6%
Taylor expanded in b around 0 64.3%
associate-/l*64.3%
exp-to-pow64.8%
sub-neg64.8%
metadata-eval64.8%
Simplified64.8%
Taylor expanded in y around 0 70.5%
Taylor expanded in t around 0 41.5%
associate-/r*41.5%
Simplified41.5%
associate-/l/41.5%
div-inv41.5%
clear-num41.5%
associate-/l*42.7%
Applied egg-rr42.7%
if -1.49999999999999993e-130 < t Initial program 98.4%
associate-/l*99.3%
associate--l+99.3%
exp-sum80.4%
associate-/l*78.1%
*-commutative78.1%
exp-to-pow78.1%
exp-diff71.2%
*-commutative71.2%
exp-to-pow71.8%
sub-neg71.8%
metadata-eval71.8%
Simplified71.8%
Taylor expanded in b around 0 70.9%
associate-/l*70.9%
exp-to-pow71.5%
sub-neg71.5%
metadata-eval71.5%
Simplified71.5%
Taylor expanded in y around 0 55.6%
Taylor expanded in t around 0 33.1%
associate-/r*32.5%
Simplified32.5%
associate-/l/33.1%
div-inv33.1%
associate-/r*37.7%
clear-num37.8%
Applied egg-rr37.8%
Final simplification39.3%
(FPCore (x y z t a b) :precision binary64 (if (<= t -6.2e-132) (/ x (* y a)) (/ (/ x y) a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -6.2e-132) {
tmp = x / (y * a);
} else {
tmp = (x / y) / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-6.2d-132)) then
tmp = x / (y * a)
else
tmp = (x / y) / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -6.2e-132) {
tmp = x / (y * a);
} else {
tmp = (x / y) / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -6.2e-132: tmp = x / (y * a) else: tmp = (x / y) / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -6.2e-132) tmp = Float64(x / Float64(y * a)); else tmp = Float64(Float64(x / y) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -6.2e-132) tmp = x / (y * a); else tmp = (x / y) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -6.2e-132], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.2 \cdot 10^{-132}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{a}\\
\end{array}
\end{array}
if t < -6.20000000000000016e-132Initial program 99.4%
Taylor expanded in y around 0 81.9%
div-exp63.5%
exp-to-pow63.9%
sub-neg63.9%
metadata-eval63.9%
associate-*r/64.0%
Simplified64.0%
Taylor expanded in t around 0 55.2%
Taylor expanded in b around 0 41.5%
*-commutative41.5%
Simplified41.5%
if -6.20000000000000016e-132 < t Initial program 98.4%
associate-/l*99.3%
associate--l+99.3%
exp-sum80.4%
associate-/l*78.1%
*-commutative78.1%
exp-to-pow78.1%
exp-diff71.2%
*-commutative71.2%
exp-to-pow71.8%
sub-neg71.8%
metadata-eval71.8%
Simplified71.8%
Taylor expanded in b around 0 70.9%
associate-/l*70.9%
exp-to-pow71.5%
sub-neg71.5%
metadata-eval71.5%
Simplified71.5%
Taylor expanded in y around 0 55.6%
Taylor expanded in t around 0 33.1%
associate-/r*32.5%
Simplified32.5%
associate-/l/33.1%
div-inv33.1%
associate-/r*37.7%
Applied egg-rr37.7%
Final simplification38.9%
(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.7%
Taylor expanded in y around 0 76.3%
div-exp64.2%
exp-to-pow64.5%
sub-neg64.5%
metadata-eval64.5%
associate-*r/65.7%
Simplified65.7%
Taylor expanded in t around 0 55.1%
Taylor expanded in b around 0 35.8%
*-commutative35.8%
Simplified35.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 2024050
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:incompleteBetaWorker from math-functions-0.1.5.2, A"
:precision binary64
:alt
(if (< t -0.8845848504127471) (/ (* x (/ (pow a (- t 1.0)) y)) (- (+ b 1.0) (* y (log z)))) (if (< t 852031.2288374073) (/ (* (/ x y) (pow a (- t 1.0))) (exp (- b (* (log z) y)))) (/ (* x (/ (pow a (- t 1.0)) y)) (- (+ b 1.0) (* y (log z))))))
(/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))