
(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 17 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 97.8%
Final simplification97.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= (+ t -1.0) -1e+122) (not (<= (+ t -1.0) 5e+69))) (/ (* x (pow a (+ t -1.0))) y) (* x (/ (pow z y) (* y (* a (exp b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((t + -1.0) <= -1e+122) || !((t + -1.0) <= 5e+69)) {
tmp = (x * pow(a, (t + -1.0))) / y;
} else {
tmp = x * (pow(z, y) / (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.0d0)) <= (-1d+122)) .or. (.not. ((t + (-1.0d0)) <= 5d+69))) then
tmp = (x * (a ** (t + (-1.0d0)))) / y
else
tmp = x * ((z ** y) / (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.0) <= -1e+122) || !((t + -1.0) <= 5e+69)) {
tmp = (x * Math.pow(a, (t + -1.0))) / y;
} else {
tmp = x * (Math.pow(z, y) / (y * (a * Math.exp(b))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if ((t + -1.0) <= -1e+122) or not ((t + -1.0) <= 5e+69): tmp = (x * math.pow(a, (t + -1.0))) / y else: tmp = x * (math.pow(z, y) / (y * (a * math.exp(b)))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((Float64(t + -1.0) <= -1e+122) || !(Float64(t + -1.0) <= 5e+69)) tmp = Float64(Float64(x * (a ^ Float64(t + -1.0))) / y); else tmp = Float64(x * Float64((z ^ y) / Float64(y * Float64(a * exp(b))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (((t + -1.0) <= -1e+122) || ~(((t + -1.0) <= 5e+69))) tmp = (x * (a ^ (t + -1.0))) / y; else tmp = x * ((z ^ y) / (y * (a * exp(b)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[N[(t + -1.0), $MachinePrecision], -1e+122], N[Not[LessEqual[N[(t + -1.0), $MachinePrecision], 5e+69]], $MachinePrecision]], N[(N[(x * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x * N[(N[Power[z, y], $MachinePrecision] / N[(y * N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t + -1 \leq -1 \cdot 10^{+122} \lor \neg \left(t + -1 \leq 5 \cdot 10^{+69}\right):\\
\;\;\;\;\frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{{z}^{y}}{y \cdot \left(a \cdot e^{b}\right)}\\
\end{array}
\end{array}
if (-.f64 t 1) < -1.00000000000000001e122 or 5.00000000000000036e69 < (-.f64 t 1) Initial program 100.0%
Taylor expanded in y around 0 92.3%
Taylor expanded in b around 0 90.0%
if -1.00000000000000001e122 < (-.f64 t 1) < 5.00000000000000036e69Initial program 96.6%
associate-*r/96.5%
sub-neg96.5%
exp-sum81.5%
associate-/l*81.5%
associate-/r/80.3%
exp-neg80.3%
associate-*r/80.3%
Simplified75.6%
Taylor expanded in t around 0 81.7%
*-commutative81.7%
associate-*l*81.7%
*-commutative81.7%
Simplified81.7%
Final simplification84.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= (+ t -1.0) -1e+122) (not (<= (+ t -1.0) 5e+69))) (/ (* x (pow a (+ t -1.0))) y) (/ (* x (pow z y)) (* y (* a (exp b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((t + -1.0) <= -1e+122) || !((t + -1.0) <= 5e+69)) {
tmp = (x * pow(a, (t + -1.0))) / y;
} else {
tmp = (x * pow(z, y)) / (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.0d0)) <= (-1d+122)) .or. (.not. ((t + (-1.0d0)) <= 5d+69))) then
tmp = (x * (a ** (t + (-1.0d0)))) / y
else
tmp = (x * (z ** y)) / (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.0) <= -1e+122) || !((t + -1.0) <= 5e+69)) {
tmp = (x * Math.pow(a, (t + -1.0))) / y;
} else {
tmp = (x * Math.pow(z, y)) / (y * (a * Math.exp(b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if ((t + -1.0) <= -1e+122) or not ((t + -1.0) <= 5e+69): tmp = (x * math.pow(a, (t + -1.0))) / y else: tmp = (x * math.pow(z, y)) / (y * (a * math.exp(b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((Float64(t + -1.0) <= -1e+122) || !(Float64(t + -1.0) <= 5e+69)) tmp = Float64(Float64(x * (a ^ Float64(t + -1.0))) / y); else tmp = Float64(Float64(x * (z ^ y)) / Float64(y * Float64(a * exp(b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (((t + -1.0) <= -1e+122) || ~(((t + -1.0) <= 5e+69))) tmp = (x * (a ^ (t + -1.0))) / y; else tmp = (x * (z ^ y)) / (y * (a * exp(b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[N[(t + -1.0), $MachinePrecision], -1e+122], N[Not[LessEqual[N[(t + -1.0), $MachinePrecision], 5e+69]], $MachinePrecision]], N[(N[(x * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / N[(y * N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t + -1 \leq -1 \cdot 10^{+122} \lor \neg \left(t + -1 \leq 5 \cdot 10^{+69}\right):\\
\;\;\;\;\frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot {z}^{y}}{y \cdot \left(a \cdot e^{b}\right)}\\
\end{array}
\end{array}
if (-.f64 t 1) < -1.00000000000000001e122 or 5.00000000000000036e69 < (-.f64 t 1) Initial program 100.0%
Taylor expanded in y around 0 92.3%
Taylor expanded in b around 0 90.0%
if -1.00000000000000001e122 < (-.f64 t 1) < 5.00000000000000036e69Initial program 96.6%
associate-*r/96.5%
sub-neg96.5%
exp-sum81.5%
associate-/l*81.5%
associate-/r/80.3%
exp-neg80.3%
associate-*r/80.3%
Simplified75.6%
Taylor expanded in t around 0 82.5%
Final simplification85.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -4.5e+41) (not (<= y 6.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 <= -4.5e+41) || !(y <= 6.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 <= (-4.5d+41)) .or. (.not. (y <= 6.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 <= -4.5e+41) || !(y <= 6.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 <= -4.5e+41) or not (y <= 6.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 <= -4.5e+41) || !(y <= 6.5e+64)) tmp = Float64(x * Float64(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 <= -4.5e+41) || ~((y <= 6.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, -4.5e+41], N[Not[LessEqual[y, 6.5e+64]], $MachinePrecision]], N[(x * N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]), $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 -4.5 \cdot 10^{+41} \lor \neg \left(y \leq 6.5 \cdot 10^{+64}\right):\\
\;\;\;\;x \cdot \frac{\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 < -4.5000000000000001e41 or 6.50000000000000007e64 < y Initial program 100.0%
associate-*r/100.0%
sub-neg100.0%
exp-sum79.8%
associate-/l*79.8%
associate-/r/79.8%
exp-neg79.8%
associate-*r/79.8%
Simplified59.6%
Taylor expanded in t around 0 68.0%
*-commutative68.0%
associate-*l*68.0%
*-commutative68.0%
Simplified68.0%
Taylor expanded in b around 0 70.9%
*-un-lft-identity70.9%
times-frac84.6%
Applied egg-rr84.6%
associate-*l/84.6%
*-un-lft-identity84.6%
Applied egg-rr84.6%
if -4.5000000000000001e41 < y < 6.50000000000000007e64Initial program 96.1%
Taylor expanded in y around 0 94.1%
Final simplification90.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= (+ t -1.0) -2e+150) (not (<= (+ t -1.0) 5e+69))) (/ (* 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 + -1.0) <= -2e+150) || !((t + -1.0) <= 5e+69)) {
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 + (-1.0d0)) <= (-2d+150)) .or. (.not. ((t + (-1.0d0)) <= 5d+69))) 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 + -1.0) <= -2e+150) || !((t + -1.0) <= 5e+69)) {
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 + -1.0) <= -2e+150) or not ((t + -1.0) <= 5e+69): 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 ((Float64(t + -1.0) <= -2e+150) || !(Float64(t + -1.0) <= 5e+69)) tmp = Float64(Float64(x * (a ^ Float64(t + -1.0))) / y); else tmp = Float64(x * Float64(Float64((z ^ y) / a) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (((t + -1.0) <= -2e+150) || ~(((t + -1.0) <= 5e+69))) 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[N[(t + -1.0), $MachinePrecision], -2e+150], N[Not[LessEqual[N[(t + -1.0), $MachinePrecision], 5e+69]], $MachinePrecision]], N[(N[(x * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x * N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t + -1 \leq -2 \cdot 10^{+150} \lor \neg \left(t + -1 \leq 5 \cdot 10^{+69}\right):\\
\;\;\;\;\frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{\frac{{z}^{y}}{a}}{y}\\
\end{array}
\end{array}
if (-.f64 t 1) < -1.99999999999999996e150 or 5.00000000000000036e69 < (-.f64 t 1) Initial program 100.0%
Taylor expanded in y around 0 96.4%
Taylor expanded in b around 0 94.1%
if -1.99999999999999996e150 < (-.f64 t 1) < 5.00000000000000036e69Initial program 96.7%
associate-*r/96.6%
sub-neg96.6%
exp-sum81.6%
associate-/l*81.6%
associate-/r/80.4%
exp-neg80.4%
associate-*r/80.4%
Simplified73.0%
Taylor expanded in t around 0 80.0%
*-commutative80.0%
associate-*l*80.0%
*-commutative80.0%
Simplified80.0%
Taylor expanded in b around 0 67.1%
*-un-lft-identity67.1%
times-frac73.5%
Applied egg-rr73.5%
associate-*l/73.5%
*-un-lft-identity73.5%
Applied egg-rr73.5%
Final simplification80.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2.1) (not (<= y 1.5e+27))) (* x (/ (/ (pow z y) a) y)) (/ x (* y (* a (exp b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.1) || !(y <= 1.5e+27)) {
tmp = x * ((pow(z, y) / 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 ((y <= (-2.1d0)) .or. (.not. (y <= 1.5d+27))) then
tmp = x * (((z ** y) / 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 ((y <= -2.1) || !(y <= 1.5e+27)) {
tmp = x * ((Math.pow(z, y) / a) / y);
} else {
tmp = x / (y * (a * Math.exp(b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2.1) or not (y <= 1.5e+27): tmp = x * ((math.pow(z, y) / a) / y) else: tmp = x / (y * (a * math.exp(b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -2.1) || !(y <= 1.5e+27)) tmp = Float64(x * Float64(Float64((z ^ y) / a) / y)); else tmp = Float64(x / Float64(y * Float64(a * exp(b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -2.1) || ~((y <= 1.5e+27))) tmp = x * (((z ^ y) / a) / y); else tmp = x / (y * (a * exp(b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2.1], N[Not[LessEqual[y, 1.5e+27]], $MachinePrecision]], N[(x * N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.1 \lor \neg \left(y \leq 1.5 \cdot 10^{+27}\right):\\
\;\;\;\;x \cdot \frac{\frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a \cdot e^{b}\right)}\\
\end{array}
\end{array}
if y < -2.10000000000000009 or 1.49999999999999988e27 < y Initial program 100.0%
associate-*r/100.0%
sub-neg100.0%
exp-sum79.5%
associate-/l*79.5%
associate-/r/79.5%
exp-neg79.5%
associate-*r/79.5%
Simplified58.2%
Taylor expanded in t around 0 65.7%
*-commutative65.7%
associate-*l*65.7%
*-commutative65.7%
Simplified65.7%
Taylor expanded in b around 0 69.1%
*-un-lft-identity69.1%
times-frac81.4%
Applied egg-rr81.4%
associate-*l/81.4%
*-un-lft-identity81.4%
Applied egg-rr81.4%
if -2.10000000000000009 < y < 1.49999999999999988e27Initial program 95.7%
associate-*r/95.6%
sub-neg95.6%
exp-sum77.7%
associate-/l*77.7%
associate-/r/76.2%
exp-neg76.2%
associate-*r/76.2%
Simplified75.6%
Taylor expanded in t around 0 65.9%
*-commutative65.9%
associate-*l*65.9%
*-commutative65.9%
Simplified65.9%
Taylor expanded in y around 0 67.0%
Final simplification73.9%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* a (exp b)))) (if (<= a 5e-171) (/ (/ x t_1) y) (/ x (* y t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * exp(b);
double tmp;
if (a <= 5e-171) {
tmp = (x / t_1) / y;
} 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 * exp(b)
if (a <= 5d-171) then
tmp = (x / t_1) / y
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 = a * Math.exp(b);
double tmp;
if (a <= 5e-171) {
tmp = (x / t_1) / y;
} else {
tmp = x / (y * t_1);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * math.exp(b) tmp = 0 if a <= 5e-171: tmp = (x / t_1) / y else: tmp = x / (y * t_1) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * exp(b)) tmp = 0.0 if (a <= 5e-171) tmp = Float64(Float64(x / t_1) / y); 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 * exp(b); tmp = 0.0; if (a <= 5e-171) tmp = (x / t_1) / y; else tmp = x / (y * t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, 5e-171], N[(N[(x / t$95$1), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(y * t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot e^{b}\\
\mathbf{if}\;a \leq 5 \cdot 10^{-171}:\\
\;\;\;\;\frac{\frac{x}{t_1}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot t_1}\\
\end{array}
\end{array}
if a < 4.99999999999999992e-171Initial program 99.5%
Taylor expanded in y around 0 82.7%
exp-diff68.4%
sub-neg68.4%
metadata-eval68.4%
*-commutative68.4%
exp-to-pow68.9%
Simplified68.9%
Taylor expanded in t around 0 67.8%
if 4.99999999999999992e-171 < a Initial program 97.1%
associate-*r/98.4%
sub-neg98.4%
exp-sum79.6%
associate-/l*79.6%
associate-/r/79.6%
exp-neg79.6%
associate-*r/79.6%
Simplified68.3%
Taylor expanded in t around 0 64.0%
*-commutative64.0%
associate-*l*64.0%
*-commutative64.0%
Simplified64.0%
Taylor expanded in y around 0 55.1%
Final simplification58.6%
(FPCore (x y z t a b) :precision binary64 (/ x (* y (* a (exp b)))))
double code(double x, double y, double z, double t, double a, double b) {
return x / (y * (a * 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 / (y * (a * exp(b)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x / (y * (a * Math.exp(b)));
}
def code(x, y, z, t, a, b): return x / (y * (a * math.exp(b)))
function code(x, y, z, t, a, b) return Float64(x / Float64(y * Float64(a * exp(b)))) end
function tmp = code(x, y, z, t, a, b) tmp = x / (y * (a * exp(b))); end
code[x_, y_, z_, t_, a_, b_] := N[(x / N[(y * N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y \cdot \left(a \cdot e^{b}\right)}
\end{array}
Initial program 97.8%
associate-*r/97.7%
sub-neg97.7%
exp-sum78.6%
associate-/l*78.6%
associate-/r/77.8%
exp-neg77.8%
associate-*r/77.8%
Simplified67.3%
Taylor expanded in t around 0 65.8%
*-commutative65.8%
associate-*l*65.8%
*-commutative65.8%
Simplified65.8%
Taylor expanded in y around 0 56.6%
Final simplification56.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (* y a))))
(if (<= b -9e-6)
(- t_1 (+ (* (/ b y) (/ x a)) (* (* b b) (* t_1 -0.5))))
(/ x (* a (* y (+ 1.0 b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (y * a);
double tmp;
if (b <= -9e-6) {
tmp = t_1 - (((b / y) * (x / a)) + ((b * b) * (t_1 * -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) :: t_1
real(8) :: tmp
t_1 = x / (y * a)
if (b <= (-9d-6)) then
tmp = t_1 - (((b / y) * (x / a)) + ((b * b) * (t_1 * (-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 t_1 = x / (y * a);
double tmp;
if (b <= -9e-6) {
tmp = t_1 - (((b / y) * (x / a)) + ((b * b) * (t_1 * -0.5)));
} else {
tmp = x / (a * (y * (1.0 + b)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (y * a) tmp = 0 if b <= -9e-6: tmp = t_1 - (((b / y) * (x / a)) + ((b * b) * (t_1 * -0.5))) else: tmp = x / (a * (y * (1.0 + b))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(y * a)) tmp = 0.0 if (b <= -9e-6) tmp = Float64(t_1 - Float64(Float64(Float64(b / y) * Float64(x / a)) + Float64(Float64(b * b) * Float64(t_1 * -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) t_1 = x / (y * a); tmp = 0.0; if (b <= -9e-6) tmp = t_1 - (((b / y) * (x / a)) + ((b * b) * (t_1 * -0.5))); else tmp = x / (a * (y * (1.0 + b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -9e-6], N[(t$95$1 - N[(N[(N[(b / y), $MachinePrecision] * N[(x / a), $MachinePrecision]), $MachinePrecision] + N[(N[(b * b), $MachinePrecision] * N[(t$95$1 * -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}
t_1 := \frac{x}{y \cdot a}\\
\mathbf{if}\;b \leq -9 \cdot 10^{-6}:\\
\;\;\;\;t_1 - \left(\frac{b}{y} \cdot \frac{x}{a} + \left(b \cdot b\right) \cdot \left(t_1 \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 < -9.00000000000000023e-6Initial program 100.0%
associate-*r/100.0%
sub-neg100.0%
exp-sum66.0%
associate-/l*66.0%
associate-/r/66.0%
exp-neg66.0%
associate-*r/66.0%
Simplified64.0%
Taylor expanded in t around 0 70.3%
*-commutative70.3%
associate-*l*70.3%
*-commutative70.3%
Simplified70.3%
Taylor expanded in y around 0 76.4%
Taylor expanded in b around 0 27.0%
*-commutative27.0%
distribute-lft-out27.0%
times-frac29.0%
*-commutative29.0%
unpow229.0%
distribute-rgt-out49.1%
metadata-eval49.1%
*-commutative49.1%
*-commutative49.1%
Simplified49.1%
if -9.00000000000000023e-6 < b Initial program 97.2%
associate-*r/97.2%
sub-neg97.2%
exp-sum81.6%
associate-/l*81.6%
associate-/r/80.6%
exp-neg80.6%
associate-*r/80.6%
Simplified68.1%
Taylor expanded in t around 0 64.8%
*-commutative64.8%
associate-*l*64.8%
*-commutative64.8%
Simplified64.8%
Taylor expanded in b around 0 59.8%
Taylor expanded in y around 0 39.7%
Taylor expanded in a around 0 39.8%
Final simplification41.6%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.35e-170) (/ (- (/ x a) (/ (* x b) a)) 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 <= -1.35e-170) {
tmp = ((x / a) - ((x * b) / a)) / 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 <= (-1.35d-170)) then
tmp = ((x / a) - ((x * b) / a)) / 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 <= -1.35e-170) {
tmp = ((x / a) - ((x * b) / a)) / y;
} else {
tmp = x / (a * (y * (1.0 + b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.35e-170: tmp = ((x / a) - ((x * b) / a)) / y else: tmp = x / (a * (y * (1.0 + b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.35e-170) tmp = Float64(Float64(Float64(x / a) - Float64(Float64(x * b) / a)) / 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 <= -1.35e-170) tmp = ((x / a) - ((x * b) / a)) / y; else tmp = x / (a * (y * (1.0 + b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.35e-170], N[(N[(N[(x / a), $MachinePrecision] - N[(N[(x * b), $MachinePrecision] / a), $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 -1.35 \cdot 10^{-170}:\\
\;\;\;\;\frac{\frac{x}{a} - \frac{x \cdot b}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot \left(1 + b\right)\right)}\\
\end{array}
\end{array}
if b < -1.3499999999999999e-170Initial program 98.5%
associate-*r/98.5%
sub-neg98.5%
exp-sum77.5%
associate-/l*77.5%
associate-/r/77.5%
exp-neg77.5%
associate-*r/77.5%
Simplified70.5%
Taylor expanded in t around 0 66.0%
*-commutative66.0%
associate-*l*66.0%
*-commutative66.0%
Simplified66.0%
Taylor expanded in y around 0 65.7%
Taylor expanded in b around 0 38.3%
mul-1-neg38.3%
unsub-neg38.3%
*-commutative38.3%
times-frac41.9%
Simplified41.9%
Taylor expanded in y around 0 46.0%
if -1.3499999999999999e-170 < b Initial program 97.4%
associate-*r/97.3%
sub-neg97.3%
exp-sum79.0%
associate-/l*79.0%
associate-/r/77.9%
exp-neg77.9%
associate-*r/77.9%
Simplified65.8%
Taylor expanded in t around 0 65.8%
*-commutative65.8%
associate-*l*65.8%
*-commutative65.8%
Simplified65.8%
Taylor expanded in b around 0 59.9%
Taylor expanded in y around 0 38.1%
Taylor expanded in a around 0 38.2%
Final simplification40.7%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.95e-5) (* (/ b y) (/ (- x) a)) (if (<= b 3.4e-80) (/ x (* y a)) (/ x (* y (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.95e-5) {
tmp = (b / y) * (-x / a);
} else if (b <= 3.4e-80) {
tmp = x / (y * a);
} else {
tmp = x / (y * (a * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-1.95d-5)) then
tmp = (b / y) * (-x / a)
else if (b <= 3.4d-80) then
tmp = x / (y * a)
else
tmp = x / (y * (a * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.95e-5) {
tmp = (b / y) * (-x / a);
} else if (b <= 3.4e-80) {
tmp = x / (y * a);
} else {
tmp = x / (y * (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.95e-5: tmp = (b / y) * (-x / a) elif b <= 3.4e-80: tmp = x / (y * a) else: tmp = x / (y * (a * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.95e-5) tmp = Float64(Float64(b / y) * Float64(Float64(-x) / a)); elseif (b <= 3.4e-80) tmp = Float64(x / Float64(y * a)); else tmp = Float64(x / Float64(y * Float64(a * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.95e-5) tmp = (b / y) * (-x / a); elseif (b <= 3.4e-80) tmp = x / (y * a); else tmp = x / (y * (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.95e-5], N[(N[(b / y), $MachinePrecision] * N[((-x) / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.4e-80], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.95 \cdot 10^{-5}:\\
\;\;\;\;\frac{b}{y} \cdot \frac{-x}{a}\\
\mathbf{elif}\;b \leq 3.4 \cdot 10^{-80}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a \cdot b\right)}\\
\end{array}
\end{array}
if b < -1.95e-5Initial program 100.0%
associate-*r/100.0%
sub-neg100.0%
exp-sum66.0%
associate-/l*66.0%
associate-/r/66.0%
exp-neg66.0%
associate-*r/66.0%
Simplified64.0%
Taylor expanded in t around 0 70.3%
*-commutative70.3%
associate-*l*70.3%
*-commutative70.3%
Simplified70.3%
Taylor expanded in y around 0 76.4%
Taylor expanded in b around 0 32.1%
mul-1-neg32.1%
unsub-neg32.1%
*-commutative32.1%
times-frac37.9%
Simplified37.9%
Taylor expanded in b around inf 32.1%
times-frac37.9%
neg-mul-137.9%
distribute-rgt-neg-out37.9%
distribute-neg-frac37.9%
Simplified37.9%
if -1.95e-5 < b < 3.4000000000000001e-80Initial program 95.3%
associate-*r/95.2%
sub-neg95.2%
exp-sum95.2%
associate-/l*95.2%
associate-/r/95.2%
exp-neg95.2%
associate-*r/95.2%
Simplified82.2%
Taylor expanded in t around 0 67.3%
*-commutative67.3%
associate-*l*67.3%
*-commutative67.3%
Simplified67.3%
Taylor expanded in y around 0 43.5%
Taylor expanded in b around 0 43.2%
if 3.4000000000000001e-80 < b Initial program 100.0%
associate-*r/100.0%
sub-neg100.0%
exp-sum61.9%
associate-/l*61.9%
associate-/r/59.5%
exp-neg59.5%
associate-*r/59.5%
Simplified47.6%
Taylor expanded in t around 0 61.1%
*-commutative61.1%
associate-*l*61.1%
*-commutative61.1%
Simplified61.1%
Taylor expanded in b around 0 48.8%
Taylor expanded in y around 0 34.2%
Taylor expanded in b around inf 34.4%
associate-*r*32.1%
*-commutative32.1%
associate-*r*35.4%
Simplified35.4%
Final simplification39.6%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.05) (* x (/ (- b) (* y a))) (if (<= b 8.6e-79) (/ x (* y a)) (/ x (* y (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.05) {
tmp = x * (-b / (y * a));
} else if (b <= 8.6e-79) {
tmp = x / (y * a);
} else {
tmp = x / (y * (a * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-1.05d0)) then
tmp = x * (-b / (y * a))
else if (b <= 8.6d-79) then
tmp = x / (y * a)
else
tmp = x / (y * (a * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.05) {
tmp = x * (-b / (y * a));
} else if (b <= 8.6e-79) {
tmp = x / (y * a);
} else {
tmp = x / (y * (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.05: tmp = x * (-b / (y * a)) elif b <= 8.6e-79: tmp = x / (y * a) else: tmp = x / (y * (a * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.05) tmp = Float64(x * Float64(Float64(-b) / Float64(y * a))); elseif (b <= 8.6e-79) tmp = Float64(x / Float64(y * a)); else tmp = Float64(x / Float64(y * Float64(a * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.05) tmp = x * (-b / (y * a)); elseif (b <= 8.6e-79) tmp = x / (y * a); else tmp = x / (y * (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.05], N[(x * N[((-b) / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 8.6e-79], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.05:\\
\;\;\;\;x \cdot \frac{-b}{y \cdot a}\\
\mathbf{elif}\;b \leq 8.6 \cdot 10^{-79}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a \cdot b\right)}\\
\end{array}
\end{array}
if b < -1.05000000000000004Initial program 100.0%
associate-*r/100.0%
sub-neg100.0%
exp-sum65.3%
associate-/l*65.3%
associate-/r/65.3%
exp-neg65.3%
associate-*r/65.3%
Simplified65.3%
Taylor expanded in t around 0 71.7%
*-commutative71.7%
associate-*l*71.7%
*-commutative71.7%
Simplified71.7%
Taylor expanded in y around 0 77.9%
Taylor expanded in b around 0 32.6%
mul-1-neg32.6%
unsub-neg32.6%
*-commutative32.6%
times-frac36.6%
Simplified36.6%
Taylor expanded in b around inf 32.6%
times-frac36.6%
neg-mul-136.6%
associate-*r/36.9%
associate-/l*36.6%
associate-/r/44.7%
associate-/r*44.5%
distribute-rgt-neg-in44.5%
Simplified44.5%
if -1.05000000000000004 < b < 8.59999999999999963e-79Initial program 95.3%
associate-*r/95.2%
sub-neg95.2%
exp-sum95.2%
associate-/l*95.2%
associate-/r/95.2%
exp-neg95.2%
associate-*r/95.2%
Simplified81.5%
Taylor expanded in t around 0 66.8%
*-commutative66.8%
associate-*l*66.8%
*-commutative66.8%
Simplified66.8%
Taylor expanded in y around 0 43.1%
Taylor expanded in b around 0 42.9%
if 8.59999999999999963e-79 < b Initial program 100.0%
associate-*r/100.0%
sub-neg100.0%
exp-sum61.9%
associate-/l*61.9%
associate-/r/59.5%
exp-neg59.5%
associate-*r/59.5%
Simplified47.6%
Taylor expanded in t around 0 61.1%
*-commutative61.1%
associate-*l*61.1%
*-commutative61.1%
Simplified61.1%
Taylor expanded in b around 0 48.8%
Taylor expanded in y around 0 34.2%
Taylor expanded in b around inf 34.4%
associate-*r*32.1%
*-commutative32.1%
associate-*r*35.4%
Simplified35.4%
Final simplification40.7%
(FPCore (x y z t a b) :precision binary64 (if (<= b -0.95) (* x (/ (- b) (* y a))) (/ 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.95) {
tmp = x * (-b / (y * a));
} 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.95d0)) then
tmp = x * (-b / (y * a))
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.95) {
tmp = x * (-b / (y * a));
} else {
tmp = x / (a * (y * (1.0 + b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -0.95: tmp = x * (-b / (y * a)) else: tmp = x / (a * (y * (1.0 + b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -0.95) tmp = Float64(x * Float64(Float64(-b) / Float64(y * a))); 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.95) tmp = x * (-b / (y * a)); else tmp = x / (a * (y * (1.0 + b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -0.95], N[(x * N[((-b) / N[(y * a), $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.95:\\
\;\;\;\;x \cdot \frac{-b}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot \left(1 + b\right)\right)}\\
\end{array}
\end{array}
if b < -0.94999999999999996Initial program 100.0%
associate-*r/100.0%
sub-neg100.0%
exp-sum65.3%
associate-/l*65.3%
associate-/r/65.3%
exp-neg65.3%
associate-*r/65.3%
Simplified65.3%
Taylor expanded in t around 0 71.7%
*-commutative71.7%
associate-*l*71.7%
*-commutative71.7%
Simplified71.7%
Taylor expanded in y around 0 77.9%
Taylor expanded in b around 0 32.6%
mul-1-neg32.6%
unsub-neg32.6%
*-commutative32.6%
times-frac36.6%
Simplified36.6%
Taylor expanded in b around inf 32.6%
times-frac36.6%
neg-mul-136.6%
associate-*r/36.9%
associate-/l*36.6%
associate-/r/44.7%
associate-/r*44.5%
distribute-rgt-neg-in44.5%
Simplified44.5%
if -0.94999999999999996 < b Initial program 97.2%
associate-*r/97.2%
sub-neg97.2%
exp-sum81.7%
associate-/l*81.7%
associate-/r/80.7%
exp-neg80.7%
associate-*r/80.7%
Simplified67.8%
Taylor expanded in t around 0 64.5%
*-commutative64.5%
associate-*l*64.5%
*-commutative64.5%
Simplified64.5%
Taylor expanded in b around 0 59.5%
Taylor expanded in y around 0 39.5%
Taylor expanded in a around 0 39.6%
Final simplification40.5%
(FPCore (x y z t a b) :precision binary64 (if (<= b 7.2e-79) (* x (/ 1.0 (* y a))) (/ x (* a (* y b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 7.2e-79) {
tmp = x * (1.0 / (y * a));
} else {
tmp = x / (a * (y * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= 7.2d-79) then
tmp = x * (1.0d0 / (y * a))
else
tmp = x / (a * (y * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 7.2e-79) {
tmp = x * (1.0 / (y * a));
} else {
tmp = x / (a * (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 7.2e-79: tmp = x * (1.0 / (y * a)) else: tmp = x / (a * (y * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 7.2e-79) tmp = Float64(x * Float64(1.0 / Float64(y * a))); else tmp = Float64(x / Float64(a * Float64(y * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= 7.2e-79) tmp = x * (1.0 / (y * a)); else tmp = x / (a * (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 7.2e-79], N[(x * N[(1.0 / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 7.2 \cdot 10^{-79}:\\
\;\;\;\;x \cdot \frac{1}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot b\right)}\\
\end{array}
\end{array}
if b < 7.2000000000000005e-79Initial program 96.7%
associate-*r/96.6%
sub-neg96.6%
exp-sum86.7%
associate-/l*86.7%
associate-/r/86.7%
exp-neg86.7%
associate-*r/86.7%
Simplified76.9%
Taylor expanded in t around 0 68.2%
*-commutative68.2%
associate-*l*68.2%
*-commutative68.2%
Simplified68.2%
Taylor expanded in b around 0 59.6%
Taylor expanded in y around 0 38.0%
if 7.2000000000000005e-79 < b Initial program 100.0%
associate-*r/100.0%
sub-neg100.0%
exp-sum61.9%
associate-/l*61.9%
associate-/r/59.5%
exp-neg59.5%
associate-*r/59.5%
Simplified47.6%
Taylor expanded in t around 0 61.1%
*-commutative61.1%
associate-*l*61.1%
*-commutative61.1%
Simplified61.1%
Taylor expanded in b around 0 48.8%
Taylor expanded in y around 0 34.2%
Taylor expanded in b around inf 34.4%
Final simplification36.8%
(FPCore (x y z t a b) :precision binary64 (if (<= b 5e-79) (* x (/ 1.0 (* y a))) (/ x (* y (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 5e-79) {
tmp = x * (1.0 / (y * a));
} else {
tmp = x / (y * (a * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= 5d-79) then
tmp = x * (1.0d0 / (y * a))
else
tmp = x / (y * (a * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 5e-79) {
tmp = x * (1.0 / (y * a));
} else {
tmp = x / (y * (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 5e-79: tmp = x * (1.0 / (y * a)) else: tmp = x / (y * (a * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 5e-79) tmp = Float64(x * Float64(1.0 / Float64(y * a))); else tmp = Float64(x / Float64(y * Float64(a * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= 5e-79) tmp = x * (1.0 / (y * a)); else tmp = x / (y * (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 5e-79], N[(x * N[(1.0 / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 5 \cdot 10^{-79}:\\
\;\;\;\;x \cdot \frac{1}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a \cdot b\right)}\\
\end{array}
\end{array}
if b < 4.99999999999999999e-79Initial program 96.7%
associate-*r/96.6%
sub-neg96.6%
exp-sum86.7%
associate-/l*86.7%
associate-/r/86.7%
exp-neg86.7%
associate-*r/86.7%
Simplified76.9%
Taylor expanded in t around 0 68.2%
*-commutative68.2%
associate-*l*68.2%
*-commutative68.2%
Simplified68.2%
Taylor expanded in b around 0 59.6%
Taylor expanded in y around 0 38.0%
if 4.99999999999999999e-79 < b Initial program 100.0%
associate-*r/100.0%
sub-neg100.0%
exp-sum61.9%
associate-/l*61.9%
associate-/r/59.5%
exp-neg59.5%
associate-*r/59.5%
Simplified47.6%
Taylor expanded in t around 0 61.1%
*-commutative61.1%
associate-*l*61.1%
*-commutative61.1%
Simplified61.1%
Taylor expanded in b around 0 48.8%
Taylor expanded in y around 0 34.2%
Taylor expanded in b around inf 34.4%
associate-*r*32.1%
*-commutative32.1%
associate-*r*35.4%
Simplified35.4%
Final simplification37.1%
(FPCore (x y z t a b) :precision binary64 (* x (/ 1.0 (* y a))))
double code(double x, double y, double z, double t, double a, double b) {
return x * (1.0 / (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 * (1.0d0 / (y * a))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x * (1.0 / (y * a));
}
def code(x, y, z, t, a, b): return x * (1.0 / (y * a))
function code(x, y, z, t, a, b) return Float64(x * Float64(1.0 / Float64(y * a))) end
function tmp = code(x, y, z, t, a, b) tmp = x * (1.0 / (y * a)); end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[(1.0 / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \frac{1}{y \cdot a}
\end{array}
Initial program 97.8%
associate-*r/97.7%
sub-neg97.7%
exp-sum78.6%
associate-/l*78.6%
associate-/r/77.8%
exp-neg77.8%
associate-*r/77.8%
Simplified67.3%
Taylor expanded in t around 0 65.8%
*-commutative65.8%
associate-*l*65.8%
*-commutative65.8%
Simplified65.8%
Taylor expanded in b around 0 55.3%
Taylor expanded in y around 0 34.0%
Final simplification34.0%
(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 97.8%
associate-*r/97.7%
sub-neg97.7%
exp-sum78.6%
associate-/l*78.6%
associate-/r/77.8%
exp-neg77.8%
associate-*r/77.8%
Simplified67.3%
Taylor expanded in t around 0 65.8%
*-commutative65.8%
associate-*l*65.8%
*-commutative65.8%
Simplified65.8%
Taylor expanded in y around 0 56.6%
Taylor expanded in b around 0 33.8%
Final simplification33.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 2023200
(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))