
(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 21 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 (<= y -0.06) (not (<= y 7.5e-5))) (/ (* x (exp (- (- (* y (log z)) (log a)) b))) y) (/ (* x (exp (- (* (+ t -1.0) (log a)) b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -0.06) || !(y <= 7.5e-5)) {
tmp = (x * exp((((y * log(z)) - log(a)) - b))) / y;
} else {
tmp = (x * exp((((t + -1.0) * log(a)) - b))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-0.06d0)) .or. (.not. (y <= 7.5d-5))) then
tmp = (x * exp((((y * log(z)) - log(a)) - b))) / y
else
tmp = (x * exp((((t + (-1.0d0)) * log(a)) - b))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -0.06) || !(y <= 7.5e-5)) {
tmp = (x * Math.exp((((y * Math.log(z)) - Math.log(a)) - b))) / y;
} else {
tmp = (x * Math.exp((((t + -1.0) * Math.log(a)) - b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -0.06) or not (y <= 7.5e-5): tmp = (x * math.exp((((y * math.log(z)) - math.log(a)) - b))) / y else: tmp = (x * math.exp((((t + -1.0) * math.log(a)) - b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -0.06) || !(y <= 7.5e-5)) tmp = Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) - log(a)) - b))) / y); else tmp = Float64(Float64(x * exp(Float64(Float64(Float64(t + -1.0) * log(a)) - b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -0.06) || ~((y <= 7.5e-5))) tmp = (x * exp((((y * log(z)) - log(a)) - b))) / y; else tmp = (x * exp((((t + -1.0) * log(a)) - b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -0.06], N[Not[LessEqual[y, 7.5e-5]], $MachinePrecision]], N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] - N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[Exp[N[(N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.06 \lor \neg \left(y \leq 7.5 \cdot 10^{-5}\right):\\
\;\;\;\;\frac{x \cdot e^{\left(y \cdot \log z - \log a\right) - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\left(t + -1\right) \cdot \log a - b}}{y}\\
\end{array}
\end{array}
if y < -0.059999999999999998 or 7.49999999999999934e-5 < y Initial program 99.9%
Taylor expanded in t around 0 91.2%
+-commutative91.2%
mul-1-neg91.2%
unsub-neg91.2%
Simplified91.2%
if -0.059999999999999998 < y < 7.49999999999999934e-5Initial program 95.9%
Taylor expanded in y around 0 95.9%
Final simplification93.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= (+ t -1.0) -2e+100) (not (<= (+ t -1.0) 100000.0))) (/ x (/ y (pow a (+ t -1.0)))) (* (/ (pow z y) (* a (exp b))) (/ x y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((t + -1.0) <= -2e+100) || !((t + -1.0) <= 100000.0)) {
tmp = x / (y / pow(a, (t + -1.0)));
} else {
tmp = (pow(z, y) / (a * exp(b))) * (x / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (((t + (-1.0d0)) <= (-2d+100)) .or. (.not. ((t + (-1.0d0)) <= 100000.0d0))) then
tmp = x / (y / (a ** (t + (-1.0d0))))
else
tmp = ((z ** y) / (a * exp(b))) * (x / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((t + -1.0) <= -2e+100) || !((t + -1.0) <= 100000.0)) {
tmp = x / (y / Math.pow(a, (t + -1.0)));
} else {
tmp = (Math.pow(z, y) / (a * Math.exp(b))) * (x / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if ((t + -1.0) <= -2e+100) or not ((t + -1.0) <= 100000.0): tmp = x / (y / math.pow(a, (t + -1.0))) else: tmp = (math.pow(z, y) / (a * math.exp(b))) * (x / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((Float64(t + -1.0) <= -2e+100) || !(Float64(t + -1.0) <= 100000.0)) tmp = Float64(x / Float64(y / (a ^ Float64(t + -1.0)))); else tmp = Float64(Float64((z ^ y) / Float64(a * exp(b))) * Float64(x / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (((t + -1.0) <= -2e+100) || ~(((t + -1.0) <= 100000.0))) tmp = x / (y / (a ^ (t + -1.0))); else tmp = ((z ^ y) / (a * exp(b))) * (x / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[N[(t + -1.0), $MachinePrecision], -2e+100], N[Not[LessEqual[N[(t + -1.0), $MachinePrecision], 100000.0]], $MachinePrecision]], N[(x / N[(y / N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[z, y], $MachinePrecision] / N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t + -1 \leq -2 \cdot 10^{+100} \lor \neg \left(t + -1 \leq 100000\right):\\
\;\;\;\;\frac{x}{\frac{y}{{a}^{\left(t + -1\right)}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{{z}^{y}}{a \cdot e^{b}} \cdot \frac{x}{y}\\
\end{array}
\end{array}
if (-.f64 t 1) < -2.00000000000000003e100 or 1e5 < (-.f64 t 1) Initial program 100.0%
Taylor expanded in y around 0 90.6%
Taylor expanded in b around 0 89.7%
associate-/l*89.7%
exp-to-pow89.7%
sub-neg89.7%
metadata-eval89.7%
+-commutative89.7%
Simplified89.7%
if -2.00000000000000003e100 < (-.f64 t 1) < 1e5Initial program 96.3%
associate-*l/89.5%
*-commutative89.5%
+-commutative89.5%
associate--l+89.5%
exp-sum82.9%
*-commutative82.9%
exp-to-pow83.9%
sub-neg83.9%
metadata-eval83.9%
exp-diff70.0%
*-commutative70.0%
exp-to-pow70.0%
Simplified70.0%
Taylor expanded in t around 0 73.4%
Final simplification80.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= (+ t -1.0) -2e+100) (not (<= (+ t -1.0) 100000.0))) (/ x (/ y (pow a (+ t -1.0)))) (/ (* x (pow z y)) (* a (* y (exp b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((t + -1.0) <= -2e+100) || !((t + -1.0) <= 100000.0)) {
tmp = x / (y / pow(a, (t + -1.0)));
} else {
tmp = (x * pow(z, y)) / (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 (((t + (-1.0d0)) <= (-2d+100)) .or. (.not. ((t + (-1.0d0)) <= 100000.0d0))) then
tmp = x / (y / (a ** (t + (-1.0d0))))
else
tmp = (x * (z ** y)) / (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 (((t + -1.0) <= -2e+100) || !((t + -1.0) <= 100000.0)) {
tmp = x / (y / Math.pow(a, (t + -1.0)));
} else {
tmp = (x * Math.pow(z, y)) / (a * (y * Math.exp(b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if ((t + -1.0) <= -2e+100) or not ((t + -1.0) <= 100000.0): tmp = x / (y / math.pow(a, (t + -1.0))) else: tmp = (x * math.pow(z, y)) / (a * (y * math.exp(b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((Float64(t + -1.0) <= -2e+100) || !(Float64(t + -1.0) <= 100000.0)) tmp = Float64(x / Float64(y / (a ^ Float64(t + -1.0)))); else tmp = Float64(Float64(x * (z ^ y)) / Float64(a * Float64(y * exp(b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (((t + -1.0) <= -2e+100) || ~(((t + -1.0) <= 100000.0))) tmp = x / (y / (a ^ (t + -1.0))); else tmp = (x * (z ^ y)) / (a * (y * exp(b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[N[(t + -1.0), $MachinePrecision], -2e+100], N[Not[LessEqual[N[(t + -1.0), $MachinePrecision], 100000.0]], $MachinePrecision]], N[(x / N[(y / N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t + -1 \leq -2 \cdot 10^{+100} \lor \neg \left(t + -1 \leq 100000\right):\\
\;\;\;\;\frac{x}{\frac{y}{{a}^{\left(t + -1\right)}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot {z}^{y}}{a \cdot \left(y \cdot e^{b}\right)}\\
\end{array}
\end{array}
if (-.f64 t 1) < -2.00000000000000003e100 or 1e5 < (-.f64 t 1) Initial program 100.0%
Taylor expanded in y around 0 90.6%
Taylor expanded in b around 0 89.7%
associate-/l*89.7%
exp-to-pow89.7%
sub-neg89.7%
metadata-eval89.7%
+-commutative89.7%
Simplified89.7%
if -2.00000000000000003e100 < (-.f64 t 1) < 1e5Initial program 96.3%
associate-*l/89.5%
*-commutative89.5%
+-commutative89.5%
associate--l+89.5%
exp-sum82.9%
*-commutative82.9%
exp-to-pow83.9%
sub-neg83.9%
metadata-eval83.9%
exp-diff70.0%
*-commutative70.0%
exp-to-pow70.0%
Simplified70.0%
Taylor expanded in t around 0 76.1%
Final simplification81.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -3100000.0) (not (<= y 7e+98))) (/ (* 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 <= -3100000.0) || !(y <= 7e+98)) {
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 <= (-3100000.0d0)) .or. (.not. (y <= 7d+98))) 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 <= -3100000.0) || !(y <= 7e+98)) {
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 <= -3100000.0) or not (y <= 7e+98): 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 <= -3100000.0) || !(y <= 7e+98)) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y); else tmp = Float64(Float64(x * exp(Float64(Float64(Float64(t + -1.0) * log(a)) - b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -3100000.0) || ~((y <= 7e+98))) 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, -3100000.0], N[Not[LessEqual[y, 7e+98]], $MachinePrecision]], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[Exp[N[(N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3100000 \lor \neg \left(y \leq 7 \cdot 10^{+98}\right):\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\left(t + -1\right) \cdot \log a - b}}{y}\\
\end{array}
\end{array}
if y < -3.1e6 or 7e98 < y Initial program 100.0%
Taylor expanded in t around 0 91.6%
+-commutative91.6%
mul-1-neg91.6%
unsub-neg91.6%
Simplified91.6%
Taylor expanded in b around 0 86.1%
div-exp86.1%
*-commutative86.1%
exp-to-pow86.1%
rem-exp-log86.1%
Simplified86.1%
if -3.1e6 < y < 7e98Initial program 96.3%
Taylor expanded in y around 0 92.8%
Final simplification90.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -0.68) (not (<= y 0.00052))) (/ (* x (/ (pow z y) a)) y) (/ (* x (pow a (+ t -1.0))) (* y (exp b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -0.68) || !(y <= 0.00052)) {
tmp = (x * (pow(z, y) / a)) / y;
} else {
tmp = (x * pow(a, (t + -1.0))) / (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 <= (-0.68d0)) .or. (.not. (y <= 0.00052d0))) then
tmp = (x * ((z ** y) / a)) / y
else
tmp = (x * (a ** (t + (-1.0d0)))) / (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 <= -0.68) || !(y <= 0.00052)) {
tmp = (x * (Math.pow(z, y) / a)) / y;
} else {
tmp = (x * Math.pow(a, (t + -1.0))) / (y * Math.exp(b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -0.68) or not (y <= 0.00052): tmp = (x * (math.pow(z, y) / a)) / y else: tmp = (x * math.pow(a, (t + -1.0))) / (y * math.exp(b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -0.68) || !(y <= 0.00052)) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y); else tmp = Float64(Float64(x * (a ^ Float64(t + -1.0))) / Float64(y * exp(b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -0.68) || ~((y <= 0.00052))) tmp = (x * ((z ^ y) / a)) / y; else tmp = (x * (a ^ (t + -1.0))) / (y * exp(b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -0.68], N[Not[LessEqual[y, 0.00052]], $MachinePrecision]], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.68 \lor \neg \left(y \leq 0.00052\right):\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot {a}^{\left(t + -1\right)}}{y \cdot e^{b}}\\
\end{array}
\end{array}
if y < -0.680000000000000049 or 5.19999999999999954e-4 < y Initial program 99.9%
Taylor expanded in t around 0 91.2%
+-commutative91.2%
mul-1-neg91.2%
unsub-neg91.2%
Simplified91.2%
Taylor expanded in b around 0 81.7%
div-exp81.7%
*-commutative81.7%
exp-to-pow81.7%
rem-exp-log81.9%
Simplified81.9%
if -0.680000000000000049 < y < 5.19999999999999954e-4Initial program 95.9%
associate-*l/86.5%
*-commutative86.5%
+-commutative86.5%
associate--l+86.5%
exp-sum76.6%
*-commutative76.6%
exp-to-pow77.6%
sub-neg77.6%
metadata-eval77.6%
exp-diff77.7%
*-commutative77.7%
exp-to-pow77.7%
Simplified77.7%
Taylor expanded in y around 0 81.4%
exp-to-pow82.3%
sub-neg82.3%
metadata-eval82.3%
Simplified82.3%
Final simplification82.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (/ y (pow a (+ t -1.0))))) (t_2 (* y (exp b))))
(if (<= t -1.45e+99)
t_1
(if (<= t -1e-193)
(* (/ x a) (/ (pow z y) t_2))
(if (<= t 2.3e-267)
(/ (* x (/ (pow z y) a)) y)
(if (<= t 52000.0) (/ x (* a t_2)) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (y / pow(a, (t + -1.0)));
double t_2 = y * exp(b);
double tmp;
if (t <= -1.45e+99) {
tmp = t_1;
} else if (t <= -1e-193) {
tmp = (x / a) * (pow(z, y) / t_2);
} else if (t <= 2.3e-267) {
tmp = (x * (pow(z, y) / a)) / y;
} else if (t <= 52000.0) {
tmp = x / (a * t_2);
} else {
tmp = 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) :: t_2
real(8) :: tmp
t_1 = x / (y / (a ** (t + (-1.0d0))))
t_2 = y * exp(b)
if (t <= (-1.45d+99)) then
tmp = t_1
else if (t <= (-1d-193)) then
tmp = (x / a) * ((z ** y) / t_2)
else if (t <= 2.3d-267) then
tmp = (x * ((z ** y) / a)) / y
else if (t <= 52000.0d0) then
tmp = x / (a * t_2)
else
tmp = 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 = x / (y / Math.pow(a, (t + -1.0)));
double t_2 = y * Math.exp(b);
double tmp;
if (t <= -1.45e+99) {
tmp = t_1;
} else if (t <= -1e-193) {
tmp = (x / a) * (Math.pow(z, y) / t_2);
} else if (t <= 2.3e-267) {
tmp = (x * (Math.pow(z, y) / a)) / y;
} else if (t <= 52000.0) {
tmp = x / (a * t_2);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (y / math.pow(a, (t + -1.0))) t_2 = y * math.exp(b) tmp = 0 if t <= -1.45e+99: tmp = t_1 elif t <= -1e-193: tmp = (x / a) * (math.pow(z, y) / t_2) elif t <= 2.3e-267: tmp = (x * (math.pow(z, y) / a)) / y elif t <= 52000.0: tmp = x / (a * t_2) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(y / (a ^ Float64(t + -1.0)))) t_2 = Float64(y * exp(b)) tmp = 0.0 if (t <= -1.45e+99) tmp = t_1; elseif (t <= -1e-193) tmp = Float64(Float64(x / a) * Float64((z ^ y) / t_2)); elseif (t <= 2.3e-267) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y); elseif (t <= 52000.0) tmp = Float64(x / Float64(a * t_2)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (y / (a ^ (t + -1.0))); t_2 = y * exp(b); tmp = 0.0; if (t <= -1.45e+99) tmp = t_1; elseif (t <= -1e-193) tmp = (x / a) * ((z ^ y) / t_2); elseif (t <= 2.3e-267) tmp = (x * ((z ^ y) / a)) / y; elseif (t <= 52000.0) tmp = x / (a * t_2); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(y / N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.45e+99], t$95$1, If[LessEqual[t, -1e-193], N[(N[(x / a), $MachinePrecision] * N[(N[Power[z, y], $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.3e-267], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 52000.0], N[(x / N[(a * t$95$2), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\frac{y}{{a}^{\left(t + -1\right)}}}\\
t_2 := y \cdot e^{b}\\
\mathbf{if}\;t \leq -1.45 \cdot 10^{+99}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -1 \cdot 10^{-193}:\\
\;\;\;\;\frac{x}{a} \cdot \frac{{z}^{y}}{t_2}\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{-267}:\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{elif}\;t \leq 52000:\\
\;\;\;\;\frac{x}{a \cdot t_2}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -1.4500000000000001e99 or 52000 < t Initial program 100.0%
Taylor expanded in y around 0 90.6%
Taylor expanded in b around 0 89.7%
associate-/l*89.7%
exp-to-pow89.7%
sub-neg89.7%
metadata-eval89.7%
+-commutative89.7%
Simplified89.7%
if -1.4500000000000001e99 < t < -1e-193Initial program 97.6%
associate-*l/85.5%
*-commutative85.5%
+-commutative85.5%
associate--l+85.5%
exp-sum73.3%
*-commutative73.3%
exp-to-pow74.1%
sub-neg74.1%
metadata-eval74.1%
exp-diff68.0%
*-commutative68.0%
exp-to-pow68.0%
Simplified68.0%
Taylor expanded in t around 0 80.9%
times-frac79.6%
Simplified79.6%
if -1e-193 < t < 2.30000000000000005e-267Initial program 98.8%
Taylor expanded in t around 0 98.8%
+-commutative98.8%
mul-1-neg98.8%
unsub-neg98.8%
Simplified98.8%
Taylor expanded in b around 0 74.4%
div-exp74.4%
*-commutative74.4%
exp-to-pow74.4%
rem-exp-log75.6%
Simplified75.6%
if 2.30000000000000005e-267 < t < 52000Initial program 93.6%
associate-*l/93.0%
*-commutative93.0%
+-commutative93.0%
associate--l+93.0%
exp-sum89.5%
*-commutative89.5%
exp-to-pow90.9%
sub-neg90.9%
metadata-eval90.9%
exp-diff76.9%
*-commutative76.9%
exp-to-pow76.8%
Simplified76.8%
Taylor expanded in t around 0 79.8%
times-frac67.7%
Simplified67.7%
Taylor expanded in y around 0 77.2%
Final simplification82.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (/ x a) (/ (pow z y) y)))
(t_2 (/ x (/ y (pow a (+ t -1.0)))))
(t_3 (/ x (* a (* y (exp b))))))
(if (<= t -3.8e+97)
t_2
(if (<= t -1.7e-128)
t_1
(if (<= t -1.05e-228)
t_3
(if (<= t 2.3e-279) t_1 (if (<= t 52000.0) t_3 t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x / a) * (pow(z, y) / y);
double t_2 = x / (y / pow(a, (t + -1.0)));
double t_3 = x / (a * (y * exp(b)));
double tmp;
if (t <= -3.8e+97) {
tmp = t_2;
} else if (t <= -1.7e-128) {
tmp = t_1;
} else if (t <= -1.05e-228) {
tmp = t_3;
} else if (t <= 2.3e-279) {
tmp = t_1;
} else if (t <= 52000.0) {
tmp = t_3;
} 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) :: t_3
real(8) :: tmp
t_1 = (x / a) * ((z ** y) / y)
t_2 = x / (y / (a ** (t + (-1.0d0))))
t_3 = x / (a * (y * exp(b)))
if (t <= (-3.8d+97)) then
tmp = t_2
else if (t <= (-1.7d-128)) then
tmp = t_1
else if (t <= (-1.05d-228)) then
tmp = t_3
else if (t <= 2.3d-279) then
tmp = t_1
else if (t <= 52000.0d0) then
tmp = t_3
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x / a) * (Math.pow(z, y) / y);
double t_2 = x / (y / Math.pow(a, (t + -1.0)));
double t_3 = x / (a * (y * Math.exp(b)));
double tmp;
if (t <= -3.8e+97) {
tmp = t_2;
} else if (t <= -1.7e-128) {
tmp = t_1;
} else if (t <= -1.05e-228) {
tmp = t_3;
} else if (t <= 2.3e-279) {
tmp = t_1;
} else if (t <= 52000.0) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x / a) * (math.pow(z, y) / y) t_2 = x / (y / math.pow(a, (t + -1.0))) t_3 = x / (a * (y * math.exp(b))) tmp = 0 if t <= -3.8e+97: tmp = t_2 elif t <= -1.7e-128: tmp = t_1 elif t <= -1.05e-228: tmp = t_3 elif t <= 2.3e-279: tmp = t_1 elif t <= 52000.0: tmp = t_3 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x / a) * Float64((z ^ y) / y)) t_2 = Float64(x / Float64(y / (a ^ Float64(t + -1.0)))) t_3 = Float64(x / Float64(a * Float64(y * exp(b)))) tmp = 0.0 if (t <= -3.8e+97) tmp = t_2; elseif (t <= -1.7e-128) tmp = t_1; elseif (t <= -1.05e-228) tmp = t_3; elseif (t <= 2.3e-279) tmp = t_1; elseif (t <= 52000.0) tmp = t_3; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x / a) * ((z ^ y) / y); t_2 = x / (y / (a ^ (t + -1.0))); t_3 = x / (a * (y * exp(b))); tmp = 0.0; if (t <= -3.8e+97) tmp = t_2; elseif (t <= -1.7e-128) tmp = t_1; elseif (t <= -1.05e-228) tmp = t_3; elseif (t <= 2.3e-279) tmp = t_1; elseif (t <= 52000.0) tmp = t_3; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x / a), $MachinePrecision] * N[(N[Power[z, y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(y / N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.8e+97], t$95$2, If[LessEqual[t, -1.7e-128], t$95$1, If[LessEqual[t, -1.05e-228], t$95$3, If[LessEqual[t, 2.3e-279], t$95$1, If[LessEqual[t, 52000.0], t$95$3, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a} \cdot \frac{{z}^{y}}{y}\\
t_2 := \frac{x}{\frac{y}{{a}^{\left(t + -1\right)}}}\\
t_3 := \frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\mathbf{if}\;t \leq -3.8 \cdot 10^{+97}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -1.7 \cdot 10^{-128}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -1.05 \cdot 10^{-228}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{-279}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 52000:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -3.80000000000000036e97 or 52000 < t Initial program 100.0%
Taylor expanded in y around 0 90.6%
Taylor expanded in b around 0 89.7%
associate-/l*89.7%
exp-to-pow89.7%
sub-neg89.7%
metadata-eval89.7%
+-commutative89.7%
Simplified89.7%
if -3.80000000000000036e97 < t < -1.69999999999999987e-128 or -1.04999999999999995e-228 < t < 2.29999999999999995e-279Initial program 97.7%
Taylor expanded in t around 0 94.2%
+-commutative94.2%
mul-1-neg94.2%
unsub-neg94.2%
Simplified94.2%
Taylor expanded in b around 0 76.6%
*-commutative76.6%
div-exp76.6%
*-commutative76.6%
exp-to-pow76.6%
rem-exp-log77.3%
*-commutative77.3%
associate-*r/77.3%
associate-/r*62.0%
times-frac72.7%
Simplified72.7%
if -1.69999999999999987e-128 < t < -1.04999999999999995e-228 or 2.29999999999999995e-279 < t < 52000Initial program 95.2%
associate-*l/90.3%
*-commutative90.3%
+-commutative90.3%
associate--l+90.3%
exp-sum87.9%
*-commutative87.9%
exp-to-pow89.2%
sub-neg89.2%
metadata-eval89.2%
exp-diff72.7%
*-commutative72.7%
exp-to-pow72.7%
Simplified72.7%
Taylor expanded in t around 0 78.2%
times-frac68.9%
Simplified68.9%
Taylor expanded in y around 0 78.9%
Final simplification81.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (/ (pow z y) a)) y))
(t_2 (/ x (/ y (pow a (+ t -1.0)))))
(t_3 (/ x (* a (* y (exp b))))))
(if (<= t -1.12e+98)
t_2
(if (<= t -9.8e-129)
t_1
(if (<= t -1.25e-211)
t_3
(if (<= t 2.1e-269) t_1 (if (<= t 1450000.0) t_3 t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * (pow(z, y) / a)) / y;
double t_2 = x / (y / pow(a, (t + -1.0)));
double t_3 = x / (a * (y * exp(b)));
double tmp;
if (t <= -1.12e+98) {
tmp = t_2;
} else if (t <= -9.8e-129) {
tmp = t_1;
} else if (t <= -1.25e-211) {
tmp = t_3;
} else if (t <= 2.1e-269) {
tmp = t_1;
} else if (t <= 1450000.0) {
tmp = t_3;
} 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) :: t_3
real(8) :: tmp
t_1 = (x * ((z ** y) / a)) / y
t_2 = x / (y / (a ** (t + (-1.0d0))))
t_3 = x / (a * (y * exp(b)))
if (t <= (-1.12d+98)) then
tmp = t_2
else if (t <= (-9.8d-129)) then
tmp = t_1
else if (t <= (-1.25d-211)) then
tmp = t_3
else if (t <= 2.1d-269) then
tmp = t_1
else if (t <= 1450000.0d0) then
tmp = t_3
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * (Math.pow(z, y) / a)) / y;
double t_2 = x / (y / Math.pow(a, (t + -1.0)));
double t_3 = x / (a * (y * Math.exp(b)));
double tmp;
if (t <= -1.12e+98) {
tmp = t_2;
} else if (t <= -9.8e-129) {
tmp = t_1;
} else if (t <= -1.25e-211) {
tmp = t_3;
} else if (t <= 2.1e-269) {
tmp = t_1;
} else if (t <= 1450000.0) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x * (math.pow(z, y) / a)) / y t_2 = x / (y / math.pow(a, (t + -1.0))) t_3 = x / (a * (y * math.exp(b))) tmp = 0 if t <= -1.12e+98: tmp = t_2 elif t <= -9.8e-129: tmp = t_1 elif t <= -1.25e-211: tmp = t_3 elif t <= 2.1e-269: tmp = t_1 elif t <= 1450000.0: tmp = t_3 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * Float64((z ^ y) / a)) / y) t_2 = Float64(x / Float64(y / (a ^ Float64(t + -1.0)))) t_3 = Float64(x / Float64(a * Float64(y * exp(b)))) tmp = 0.0 if (t <= -1.12e+98) tmp = t_2; elseif (t <= -9.8e-129) tmp = t_1; elseif (t <= -1.25e-211) tmp = t_3; elseif (t <= 2.1e-269) tmp = t_1; elseif (t <= 1450000.0) tmp = t_3; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x * ((z ^ y) / a)) / y; t_2 = x / (y / (a ^ (t + -1.0))); t_3 = x / (a * (y * exp(b))); tmp = 0.0; if (t <= -1.12e+98) tmp = t_2; elseif (t <= -9.8e-129) tmp = t_1; elseif (t <= -1.25e-211) tmp = t_3; elseif (t <= 2.1e-269) tmp = t_1; elseif (t <= 1450000.0) tmp = t_3; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(y / N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.12e+98], t$95$2, If[LessEqual[t, -9.8e-129], t$95$1, If[LessEqual[t, -1.25e-211], t$95$3, If[LessEqual[t, 2.1e-269], t$95$1, If[LessEqual[t, 1450000.0], t$95$3, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
t_2 := \frac{x}{\frac{y}{{a}^{\left(t + -1\right)}}}\\
t_3 := \frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\mathbf{if}\;t \leq -1.12 \cdot 10^{+98}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -9.8 \cdot 10^{-129}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -1.25 \cdot 10^{-211}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{-269}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1450000:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -1.12e98 or 1.45e6 < t Initial program 100.0%
Taylor expanded in y around 0 90.6%
Taylor expanded in b around 0 89.7%
associate-/l*89.7%
exp-to-pow89.7%
sub-neg89.7%
metadata-eval89.7%
+-commutative89.7%
Simplified89.7%
if -1.12e98 < t < -9.80000000000000004e-129 or -1.2500000000000001e-211 < t < 2.10000000000000005e-269Initial program 97.9%
Taylor expanded in t around 0 94.7%
+-commutative94.7%
mul-1-neg94.7%
unsub-neg94.7%
Simplified94.7%
Taylor expanded in b around 0 74.5%
div-exp74.5%
*-commutative74.5%
exp-to-pow74.5%
rem-exp-log75.1%
Simplified75.1%
if -9.80000000000000004e-129 < t < -1.2500000000000001e-211 or 2.10000000000000005e-269 < t < 1.45e6Initial program 94.8%
associate-*l/89.5%
*-commutative89.5%
+-commutative89.5%
associate--l+89.5%
exp-sum87.0%
*-commutative87.0%
exp-to-pow88.4%
sub-neg88.4%
metadata-eval88.4%
exp-diff75.7%
*-commutative75.7%
exp-to-pow75.7%
Simplified75.7%
Taylor expanded in t around 0 82.9%
times-frac72.8%
Simplified72.8%
Taylor expanded in y around 0 81.1%
Final simplification82.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1150000000000.0) (not (<= y 2.1e-6))) (* (/ x a) (/ (pow z y) y)) (/ x (* a (* y (exp b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1150000000000.0) || !(y <= 2.1e-6)) {
tmp = (x / a) * (pow(z, y) / y);
} else {
tmp = x / (a * (y * exp(b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-1150000000000.0d0)) .or. (.not. (y <= 2.1d-6))) then
tmp = (x / a) * ((z ** y) / y)
else
tmp = x / (a * (y * exp(b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1150000000000.0) || !(y <= 2.1e-6)) {
tmp = (x / a) * (Math.pow(z, y) / y);
} else {
tmp = x / (a * (y * Math.exp(b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1150000000000.0) or not (y <= 2.1e-6): tmp = (x / a) * (math.pow(z, y) / y) else: tmp = x / (a * (y * math.exp(b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1150000000000.0) || !(y <= 2.1e-6)) tmp = Float64(Float64(x / a) * Float64((z ^ y) / y)); else tmp = Float64(x / Float64(a * Float64(y * exp(b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1150000000000.0) || ~((y <= 2.1e-6))) tmp = (x / a) * ((z ^ y) / y); else tmp = x / (a * (y * exp(b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1150000000000.0], N[Not[LessEqual[y, 2.1e-6]], $MachinePrecision]], N[(N[(x / a), $MachinePrecision] * N[(N[Power[z, y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1150000000000 \lor \neg \left(y \leq 2.1 \cdot 10^{-6}\right):\\
\;\;\;\;\frac{x}{a} \cdot \frac{{z}^{y}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\end{array}
\end{array}
if y < -1.15e12 or 2.0999999999999998e-6 < y Initial program 99.9%
Taylor expanded in t around 0 89.6%
+-commutative89.6%
mul-1-neg89.6%
unsub-neg89.6%
Simplified89.6%
Taylor expanded in b around 0 80.8%
*-commutative80.8%
div-exp80.8%
*-commutative80.8%
exp-to-pow80.8%
rem-exp-log81.0%
*-commutative81.0%
associate-*r/81.0%
associate-/r*68.0%
times-frac70.5%
Simplified70.5%
if -1.15e12 < y < 2.0999999999999998e-6Initial program 95.9%
associate-*l/86.7%
*-commutative86.7%
+-commutative86.7%
associate--l+86.7%
exp-sum77.6%
*-commutative77.6%
exp-to-pow78.6%
sub-neg78.6%
metadata-eval78.6%
exp-diff77.8%
*-commutative77.8%
exp-to-pow77.8%
Simplified77.8%
Taylor expanded in t around 0 74.8%
times-frac66.6%
Simplified66.6%
Taylor expanded in y around 0 74.0%
Final simplification72.3%
(FPCore (x y z t a b) :precision binary64 (if (<= y -2.15e+213) (/ x (* a (* y b))) (/ x (* a (* y (exp b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.15e+213) {
tmp = x / (a * (y * b));
} 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 <= (-2.15d+213)) then
tmp = x / (a * (y * b))
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 <= -2.15e+213) {
tmp = x / (a * (y * b));
} else {
tmp = x / (a * (y * Math.exp(b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2.15e+213: tmp = x / (a * (y * b)) else: tmp = x / (a * (y * math.exp(b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2.15e+213) tmp = Float64(x / Float64(a * Float64(y * b))); 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 <= -2.15e+213) tmp = x / (a * (y * b)); else tmp = x / (a * (y * exp(b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.15e+213], N[(x / N[(a * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.15 \cdot 10^{+213}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot b\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\end{array}
\end{array}
if y < -2.14999999999999997e213Initial program 100.0%
associate-*l/90.9%
*-commutative90.9%
+-commutative90.9%
associate--l+90.9%
exp-sum68.2%
*-commutative68.2%
exp-to-pow68.2%
sub-neg68.2%
metadata-eval68.2%
exp-diff27.3%
*-commutative27.3%
exp-to-pow27.3%
Simplified27.3%
Taylor expanded in t around 0 50.0%
times-frac54.5%
Simplified54.5%
Taylor expanded in y around 0 29.0%
Taylor expanded in b around 0 51.8%
Taylor expanded in b around inf 55.7%
if -2.14999999999999997e213 < y Initial program 97.6%
associate-*l/89.4%
*-commutative89.4%
+-commutative89.4%
associate--l+89.4%
exp-sum74.0%
*-commutative74.0%
exp-to-pow74.7%
sub-neg74.7%
metadata-eval74.7%
exp-diff66.1%
*-commutative66.1%
exp-to-pow66.1%
Simplified66.1%
Taylor expanded in t around 0 68.3%
times-frac61.6%
Simplified61.6%
Taylor expanded in y around 0 61.6%
Final simplification61.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -800.0) (not (<= b 2.4e-7))) (/ (exp (- b)) y) (/ 1.0 (* a (/ y x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -800.0) || !(b <= 2.4e-7)) {
tmp = exp(-b) / y;
} else {
tmp = 1.0 / (a * (y / x));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-800.0d0)) .or. (.not. (b <= 2.4d-7))) then
tmp = exp(-b) / y
else
tmp = 1.0d0 / (a * (y / x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -800.0) || !(b <= 2.4e-7)) {
tmp = Math.exp(-b) / y;
} else {
tmp = 1.0 / (a * (y / x));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -800.0) or not (b <= 2.4e-7): tmp = math.exp(-b) / y else: tmp = 1.0 / (a * (y / x)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -800.0) || !(b <= 2.4e-7)) tmp = Float64(exp(Float64(-b)) / y); else tmp = Float64(1.0 / Float64(a * Float64(y / x))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -800.0) || ~((b <= 2.4e-7))) tmp = exp(-b) / y; else tmp = 1.0 / (a * (y / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -800.0], N[Not[LessEqual[b, 2.4e-7]], $MachinePrecision]], N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision], N[(1.0 / N[(a * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -800 \lor \neg \left(b \leq 2.4 \cdot 10^{-7}\right):\\
\;\;\;\;\frac{e^{-b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{a \cdot \frac{y}{x}}\\
\end{array}
\end{array}
if b < -800 or 2.39999999999999979e-7 < b Initial program 100.0%
Taylor expanded in y around 0 86.9%
add-exp-log69.0%
*-commutative69.0%
log-prod40.8%
add-log-exp40.1%
sub-neg40.1%
metadata-eval40.1%
Applied egg-rr40.1%
Taylor expanded in b around inf 57.5%
neg-mul-157.5%
Simplified57.5%
if -800 < b < 2.39999999999999979e-7Initial program 95.4%
associate-*l/87.8%
*-commutative87.8%
+-commutative87.8%
associate--l+87.8%
exp-sum75.3%
*-commutative75.3%
exp-to-pow76.6%
sub-neg76.6%
metadata-eval76.6%
exp-diff75.8%
*-commutative75.8%
exp-to-pow75.8%
Simplified75.8%
Taylor expanded in t around 0 68.3%
times-frac66.9%
Simplified66.9%
Taylor expanded in y around 0 42.9%
Taylor expanded in b around 0 42.3%
*-commutative42.3%
Simplified42.3%
clear-num42.8%
*-commutative42.8%
inv-pow42.8%
Applied egg-rr42.8%
unpow-142.8%
*-commutative42.8%
associate-*l/43.6%
Simplified43.6%
Final simplification50.9%
(FPCore (x y z t a b) :precision binary64 (if (<= b 1.7e-67) (/ (- (/ x y) (/ x (/ y b))) a) (/ x (* y (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 1.7e-67) {
tmp = ((x / y) - (x / (y / b))) / 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.7d-67) then
tmp = ((x / y) - (x / (y / b))) / 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.7e-67) {
tmp = ((x / y) - (x / (y / b))) / a;
} else {
tmp = x / (y * (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 1.7e-67: tmp = ((x / y) - (x / (y / b))) / a else: tmp = x / (y * (a * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 1.7e-67) tmp = Float64(Float64(Float64(x / y) - Float64(x / Float64(y / b))) / 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.7e-67) tmp = ((x / y) - (x / (y / b))) / a; else tmp = x / (y * (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 1.7e-67], N[(N[(N[(x / y), $MachinePrecision] - N[(x / N[(y / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(x / N[(y * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.7 \cdot 10^{-67}:\\
\;\;\;\;\frac{\frac{x}{y} - \frac{x}{\frac{y}{b}}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a \cdot b\right)}\\
\end{array}
\end{array}
if b < 1.70000000000000005e-67Initial program 96.9%
associate-*l/90.4%
*-commutative90.4%
+-commutative90.4%
associate--l+90.4%
exp-sum73.9%
*-commutative73.9%
exp-to-pow74.7%
sub-neg74.7%
metadata-eval74.7%
exp-diff64.4%
*-commutative64.4%
exp-to-pow64.4%
Simplified64.4%
Taylor expanded in t around 0 63.8%
times-frac61.1%
Simplified61.1%
Taylor expanded in y around 0 50.3%
Taylor expanded in b around 0 31.2%
Taylor expanded in a around 0 39.3%
+-commutative39.3%
mul-1-neg39.3%
unsub-neg39.3%
*-commutative39.3%
associate-/l*40.5%
Simplified40.5%
if 1.70000000000000005e-67 < b Initial program 99.9%
associate-*l/87.6%
*-commutative87.6%
+-commutative87.6%
associate--l+87.6%
exp-sum72.7%
*-commutative72.7%
exp-to-pow72.8%
sub-neg72.8%
metadata-eval72.8%
exp-diff59.2%
*-commutative59.2%
exp-to-pow59.2%
Simplified59.2%
Taylor expanded in t around 0 73.1%
times-frac60.8%
Simplified60.8%
Taylor expanded in y around 0 77.0%
Taylor expanded in b around 0 37.3%
Taylor expanded in b around inf 36.2%
*-commutative36.2%
*-commutative36.2%
associate-*l*40.8%
Simplified40.8%
Final simplification40.6%
(FPCore (x y z t a b) :precision binary64 (if (<= b -2e+87) (* b (/ (- x) (* y a))) (if (<= b 6e+63) (/ 1.0 (* a (/ y x))) (/ x (* y (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2e+87) {
tmp = b * (-x / (y * a));
} else if (b <= 6e+63) {
tmp = 1.0 / (a * (y / x));
} 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 <= (-2d+87)) then
tmp = b * (-x / (y * a))
else if (b <= 6d+63) then
tmp = 1.0d0 / (a * (y / x))
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 <= -2e+87) {
tmp = b * (-x / (y * a));
} else if (b <= 6e+63) {
tmp = 1.0 / (a * (y / x));
} else {
tmp = x / (y * (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -2e+87: tmp = b * (-x / (y * a)) elif b <= 6e+63: tmp = 1.0 / (a * (y / x)) else: tmp = x / (y * (a * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -2e+87) tmp = Float64(b * Float64(Float64(-x) / Float64(y * a))); elseif (b <= 6e+63) tmp = Float64(1.0 / Float64(a * Float64(y / x))); 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 <= -2e+87) tmp = b * (-x / (y * a)); elseif (b <= 6e+63) tmp = 1.0 / (a * (y / x)); else tmp = x / (y * (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -2e+87], N[(b * N[((-x) / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6e+63], N[(1.0 / N[(a * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2 \cdot 10^{+87}:\\
\;\;\;\;b \cdot \frac{-x}{y \cdot a}\\
\mathbf{elif}\;b \leq 6 \cdot 10^{+63}:\\
\;\;\;\;\frac{1}{a \cdot \frac{y}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a \cdot b\right)}\\
\end{array}
\end{array}
if b < -1.9999999999999999e87Initial program 100.0%
associate-*l/97.8%
*-commutative97.8%
+-commutative97.8%
associate--l+97.8%
exp-sum78.3%
*-commutative78.3%
exp-to-pow78.3%
sub-neg78.3%
metadata-eval78.3%
exp-diff52.2%
*-commutative52.2%
exp-to-pow52.2%
Simplified52.2%
Taylor expanded in t around 0 61.0%
times-frac52.3%
Simplified52.3%
Taylor expanded in y around 0 70.0%
Taylor expanded in b around 0 37.0%
Taylor expanded in b around inf 37.0%
mul-1-neg37.0%
associate-*r/39.5%
distribute-rgt-neg-in39.5%
distribute-neg-frac39.5%
Simplified39.5%
if -1.9999999999999999e87 < b < 5.99999999999999998e63Initial program 96.5%
associate-*l/87.6%
*-commutative87.6%
+-commutative87.6%
associate--l+87.6%
exp-sum71.4%
*-commutative71.4%
exp-to-pow72.3%
sub-neg72.3%
metadata-eval72.3%
exp-diff66.1%
*-commutative66.1%
exp-to-pow66.1%
Simplified66.1%
Taylor expanded in t around 0 64.3%
times-frac61.3%
Simplified61.3%
Taylor expanded in y around 0 44.5%
Taylor expanded in b around 0 33.3%
*-commutative33.3%
Simplified33.3%
clear-num33.7%
*-commutative33.7%
inv-pow33.7%
Applied egg-rr33.7%
unpow-133.7%
*-commutative33.7%
associate-*l/36.0%
Simplified36.0%
if 5.99999999999999998e63 < b Initial program 100.0%
associate-*l/88.0%
*-commutative88.0%
+-commutative88.0%
associate--l+88.0%
exp-sum76.0%
*-commutative76.0%
exp-to-pow76.0%
sub-neg76.0%
metadata-eval76.0%
exp-diff62.0%
*-commutative62.0%
exp-to-pow62.0%
Simplified62.0%
Taylor expanded in t around 0 80.1%
times-frac68.0%
Simplified68.0%
Taylor expanded in y around 0 94.1%
Taylor expanded in b around 0 42.4%
Taylor expanded in b around inf 42.4%
*-commutative42.4%
*-commutative42.4%
associate-*l*49.8%
Simplified49.8%
Final simplification39.3%
(FPCore (x y z t a b) :precision binary64 (if (<= z 1.5e-93) (* (/ x a) (/ 1.0 y)) (/ x (* y a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 1.5e-93) {
tmp = (x / a) * (1.0 / y);
} else {
tmp = x / (y * a);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= 1.5d-93) then
tmp = (x / a) * (1.0d0 / y)
else
tmp = x / (y * a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 1.5e-93) {
tmp = (x / a) * (1.0 / y);
} else {
tmp = x / (y * a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= 1.5e-93: tmp = (x / a) * (1.0 / y) else: tmp = x / (y * a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= 1.5e-93) tmp = Float64(Float64(x / a) * Float64(1.0 / y)); else tmp = Float64(x / Float64(y * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= 1.5e-93) tmp = (x / a) * (1.0 / y); else tmp = x / (y * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, 1.5e-93], N[(N[(x / a), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 1.5 \cdot 10^{-93}:\\
\;\;\;\;\frac{x}{a} \cdot \frac{1}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\end{array}
\end{array}
if z < 1.5000000000000001e-93Initial program 98.5%
associate-*l/86.2%
*-commutative86.2%
+-commutative86.2%
associate--l+86.2%
exp-sum71.5%
*-commutative71.5%
exp-to-pow71.8%
sub-neg71.8%
metadata-eval71.8%
exp-diff60.8%
*-commutative60.8%
exp-to-pow60.8%
Simplified60.8%
Taylor expanded in t around 0 63.4%
times-frac58.4%
Simplified58.4%
Taylor expanded in y around 0 55.4%
Taylor expanded in b around 0 30.8%
*-commutative30.8%
Simplified30.8%
*-commutative30.8%
associate-/r*37.7%
div-inv37.7%
Applied egg-rr37.7%
if 1.5000000000000001e-93 < z Initial program 97.5%
associate-*l/91.1%
*-commutative91.1%
+-commutative91.1%
associate--l+91.1%
exp-sum74.4%
*-commutative74.4%
exp-to-pow75.2%
sub-neg75.2%
metadata-eval75.2%
exp-diff63.7%
*-commutative63.7%
exp-to-pow63.7%
Simplified63.7%
Taylor expanded in t around 0 68.3%
times-frac62.2%
Simplified62.2%
Taylor expanded in y around 0 60.3%
Taylor expanded in b around 0 30.7%
*-commutative30.7%
Simplified30.7%
Final simplification32.9%
(FPCore (x y z t a b) :precision binary64 (if (<= b 1.56e+63) (/ 1.0 (* a (/ y x))) (/ x (* a (* y b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 1.56e+63) {
tmp = 1.0 / (a * (y / x));
} 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 <= 1.56d+63) then
tmp = 1.0d0 / (a * (y / x))
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 <= 1.56e+63) {
tmp = 1.0 / (a * (y / x));
} else {
tmp = x / (a * (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 1.56e+63: tmp = 1.0 / (a * (y / x)) else: tmp = x / (a * (y * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 1.56e+63) tmp = Float64(1.0 / Float64(a * Float64(y / x))); 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 <= 1.56e+63) tmp = 1.0 / (a * (y / x)); else tmp = x / (a * (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 1.56e+63], N[(1.0 / N[(a * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.56 \cdot 10^{+63}:\\
\;\;\;\;\frac{1}{a \cdot \frac{y}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot b\right)}\\
\end{array}
\end{array}
if b < 1.56e63Initial program 97.3%
associate-*l/89.9%
*-commutative89.9%
+-commutative89.9%
associate--l+89.9%
exp-sum72.9%
*-commutative72.9%
exp-to-pow73.6%
sub-neg73.6%
metadata-eval73.6%
exp-diff63.0%
*-commutative63.0%
exp-to-pow63.0%
Simplified63.0%
Taylor expanded in t around 0 63.5%
times-frac59.3%
Simplified59.3%
Taylor expanded in y around 0 50.2%
Taylor expanded in b around 0 31.8%
*-commutative31.8%
Simplified31.8%
clear-num32.1%
*-commutative32.1%
inv-pow32.1%
Applied egg-rr32.1%
unpow-132.1%
*-commutative32.1%
associate-*l/34.8%
Simplified34.8%
if 1.56e63 < b Initial program 100.0%
associate-*l/88.0%
*-commutative88.0%
+-commutative88.0%
associate--l+88.0%
exp-sum76.0%
*-commutative76.0%
exp-to-pow76.0%
sub-neg76.0%
metadata-eval76.0%
exp-diff62.0%
*-commutative62.0%
exp-to-pow62.0%
Simplified62.0%
Taylor expanded in t around 0 80.1%
times-frac68.0%
Simplified68.0%
Taylor expanded in y around 0 94.1%
Taylor expanded in b around 0 42.4%
Taylor expanded in b around inf 42.4%
Final simplification36.3%
(FPCore (x y z t a b) :precision binary64 (if (<= b 1.5e+63) (/ 1.0 (* a (/ y x))) (/ x (* y (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 1.5e+63) {
tmp = 1.0 / (a * (y / x));
} 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.5d+63) then
tmp = 1.0d0 / (a * (y / x))
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.5e+63) {
tmp = 1.0 / (a * (y / x));
} else {
tmp = x / (y * (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 1.5e+63: tmp = 1.0 / (a * (y / x)) else: tmp = x / (y * (a * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 1.5e+63) tmp = Float64(1.0 / Float64(a * Float64(y / x))); 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.5e+63) tmp = 1.0 / (a * (y / x)); else tmp = x / (y * (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 1.5e+63], N[(1.0 / N[(a * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.5 \cdot 10^{+63}:\\
\;\;\;\;\frac{1}{a \cdot \frac{y}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a \cdot b\right)}\\
\end{array}
\end{array}
if b < 1.5e63Initial program 97.3%
associate-*l/89.9%
*-commutative89.9%
+-commutative89.9%
associate--l+89.9%
exp-sum72.9%
*-commutative72.9%
exp-to-pow73.6%
sub-neg73.6%
metadata-eval73.6%
exp-diff63.0%
*-commutative63.0%
exp-to-pow63.0%
Simplified63.0%
Taylor expanded in t around 0 63.5%
times-frac59.3%
Simplified59.3%
Taylor expanded in y around 0 50.2%
Taylor expanded in b around 0 31.8%
*-commutative31.8%
Simplified31.8%
clear-num32.1%
*-commutative32.1%
inv-pow32.1%
Applied egg-rr32.1%
unpow-132.1%
*-commutative32.1%
associate-*l/34.8%
Simplified34.8%
if 1.5e63 < b Initial program 100.0%
associate-*l/88.0%
*-commutative88.0%
+-commutative88.0%
associate--l+88.0%
exp-sum76.0%
*-commutative76.0%
exp-to-pow76.0%
sub-neg76.0%
metadata-eval76.0%
exp-diff62.0%
*-commutative62.0%
exp-to-pow62.0%
Simplified62.0%
Taylor expanded in t around 0 80.1%
times-frac68.0%
Simplified68.0%
Taylor expanded in y around 0 94.1%
Taylor expanded in b around 0 42.4%
Taylor expanded in b around inf 42.4%
*-commutative42.4%
*-commutative42.4%
associate-*l*49.8%
Simplified49.8%
Final simplification37.8%
(FPCore (x y z t a b) :precision binary64 (if (<= z 9e-93) (/ (/ x a) y) (/ x (* y a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 9e-93) {
tmp = (x / a) / y;
} else {
tmp = x / (y * a);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= 9d-93) then
tmp = (x / a) / y
else
tmp = x / (y * a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 9e-93) {
tmp = (x / a) / y;
} else {
tmp = x / (y * a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= 9e-93: tmp = (x / a) / y else: tmp = x / (y * a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= 9e-93) tmp = Float64(Float64(x / a) / y); else tmp = Float64(x / Float64(y * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= 9e-93) tmp = (x / a) / y; else tmp = x / (y * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, 9e-93], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 9 \cdot 10^{-93}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\end{array}
\end{array}
if z < 9.0000000000000004e-93Initial program 98.5%
Taylor expanded in t around 0 79.0%
+-commutative79.0%
mul-1-neg79.0%
unsub-neg79.0%
Simplified79.0%
Taylor expanded in b around 0 63.5%
div-exp63.5%
*-commutative63.5%
exp-to-pow63.5%
rem-exp-log63.7%
Simplified63.7%
Taylor expanded in y around 0 37.7%
if 9.0000000000000004e-93 < z Initial program 97.5%
associate-*l/91.1%
*-commutative91.1%
+-commutative91.1%
associate--l+91.1%
exp-sum74.4%
*-commutative74.4%
exp-to-pow75.2%
sub-neg75.2%
metadata-eval75.2%
exp-diff63.7%
*-commutative63.7%
exp-to-pow63.7%
Simplified63.7%
Taylor expanded in t around 0 68.3%
times-frac62.2%
Simplified62.2%
Taylor expanded in y around 0 60.3%
Taylor expanded in b around 0 30.7%
*-commutative30.7%
Simplified30.7%
Final simplification32.9%
(FPCore (x y z t a b) :precision binary64 (* (/ x y) (/ 1.0 a)))
double code(double x, double y, double z, double t, double a, double b) {
return (x / y) * (1.0 / 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) * (1.0d0 / a)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x / y) * (1.0 / a);
}
def code(x, y, z, t, a, b): return (x / y) * (1.0 / a)
function code(x, y, z, t, a, b) return Float64(Float64(x / y) * Float64(1.0 / a)) end
function tmp = code(x, y, z, t, a, b) tmp = (x / y) * (1.0 / a); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x / y), $MachinePrecision] * N[(1.0 / a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y} \cdot \frac{1}{a}
\end{array}
Initial program 97.8%
associate-*l/89.5%
*-commutative89.5%
+-commutative89.5%
associate--l+89.5%
exp-sum73.5%
*-commutative73.5%
exp-to-pow74.1%
sub-neg74.1%
metadata-eval74.1%
exp-diff62.8%
*-commutative62.8%
exp-to-pow62.8%
Simplified62.8%
Taylor expanded in t around 0 66.8%
times-frac61.0%
Simplified61.0%
Taylor expanded in y around 0 58.8%
Taylor expanded in b around 0 30.7%
*-commutative30.7%
Simplified30.7%
associate-/r*32.4%
div-inv32.3%
Applied egg-rr32.3%
Final simplification32.3%
(FPCore (x y z t a b) :precision binary64 (/ 1.0 (* a (/ y x))))
double code(double x, double y, double z, double t, double a, double b) {
return 1.0 / (a * (y / x));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = 1.0d0 / (a * (y / x))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return 1.0 / (a * (y / x));
}
def code(x, y, z, t, a, b): return 1.0 / (a * (y / x))
function code(x, y, z, t, a, b) return Float64(1.0 / Float64(a * Float64(y / x))) end
function tmp = code(x, y, z, t, a, b) tmp = 1.0 / (a * (y / x)); end
code[x_, y_, z_, t_, a_, b_] := N[(1.0 / N[(a * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{a \cdot \frac{y}{x}}
\end{array}
Initial program 97.8%
associate-*l/89.5%
*-commutative89.5%
+-commutative89.5%
associate--l+89.5%
exp-sum73.5%
*-commutative73.5%
exp-to-pow74.1%
sub-neg74.1%
metadata-eval74.1%
exp-diff62.8%
*-commutative62.8%
exp-to-pow62.8%
Simplified62.8%
Taylor expanded in t around 0 66.8%
times-frac61.0%
Simplified61.0%
Taylor expanded in y around 0 58.8%
Taylor expanded in b around 0 30.7%
*-commutative30.7%
Simplified30.7%
clear-num31.0%
*-commutative31.0%
inv-pow31.0%
Applied egg-rr31.0%
unpow-131.0%
*-commutative31.0%
associate-*l/32.5%
Simplified32.5%
Final simplification32.5%
(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-*l/89.5%
*-commutative89.5%
+-commutative89.5%
associate--l+89.5%
exp-sum73.5%
*-commutative73.5%
exp-to-pow74.1%
sub-neg74.1%
metadata-eval74.1%
exp-diff62.8%
*-commutative62.8%
exp-to-pow62.8%
Simplified62.8%
Taylor expanded in t around 0 66.8%
times-frac61.0%
Simplified61.0%
Taylor expanded in y around 0 58.8%
Taylor expanded in b around 0 30.7%
*-commutative30.7%
Simplified30.7%
Final simplification30.7%
(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 2024010
(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))