
(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 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x * exp((((y * log(z)) + ((t - 1.0d0) * log(a))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x * Math.exp((((y * Math.log(z)) + ((t - 1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + ((t - 1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\end{array}
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (+ t -1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + ((t + -1.0) * log(a))) - b))) / y;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x * exp((((y * log(z)) + ((t + (-1.0d0)) * log(a))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x * Math.exp((((y * Math.log(z)) + ((t + -1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + ((t + -1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t + -1.0) * log(a))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + ((t + -1.0) * log(a))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \left(t + -1\right) \cdot \log a\right) - b}}{y}
\end{array}
Initial program 98.4%
Final simplification98.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= (+ t -1.0) -2e+37) (not (<= (+ t -1.0) 2e+38))) (/ (* x (exp (- (* (+ t -1.0) (log a)) b))) y) (/ (* x (exp (- (- (* y (log z)) (log a)) b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((t + -1.0) <= -2e+37) || !((t + -1.0) <= 2e+38)) {
tmp = (x * exp((((t + -1.0) * log(a)) - b))) / y;
} else {
tmp = (x * exp((((y * log(z)) - log(a)) - b))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (((t + (-1.0d0)) <= (-2d+37)) .or. (.not. ((t + (-1.0d0)) <= 2d+38))) then
tmp = (x * exp((((t + (-1.0d0)) * log(a)) - b))) / y
else
tmp = (x * exp((((y * log(z)) - log(a)) - b))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((t + -1.0) <= -2e+37) || !((t + -1.0) <= 2e+38)) {
tmp = (x * Math.exp((((t + -1.0) * Math.log(a)) - b))) / y;
} else {
tmp = (x * Math.exp((((y * Math.log(z)) - Math.log(a)) - b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if ((t + -1.0) <= -2e+37) or not ((t + -1.0) <= 2e+38): tmp = (x * math.exp((((t + -1.0) * math.log(a)) - b))) / y else: tmp = (x * math.exp((((y * math.log(z)) - math.log(a)) - b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((Float64(t + -1.0) <= -2e+37) || !(Float64(t + -1.0) <= 2e+38)) tmp = Float64(Float64(x * exp(Float64(Float64(Float64(t + -1.0) * log(a)) - b))) / y); else tmp = Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) - log(a)) - b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (((t + -1.0) <= -2e+37) || ~(((t + -1.0) <= 2e+38))) tmp = (x * exp((((t + -1.0) * log(a)) - b))) / y; else tmp = (x * exp((((y * log(z)) - log(a)) - b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[N[(t + -1.0), $MachinePrecision], -2e+37], N[Not[LessEqual[N[(t + -1.0), $MachinePrecision], 2e+38]], $MachinePrecision]], N[(N[(x * N[Exp[N[(N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] - N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t + -1 \leq -2 \cdot 10^{+37} \lor \neg \left(t + -1 \leq 2 \cdot 10^{+38}\right):\\
\;\;\;\;\frac{x \cdot e^{\left(t + -1\right) \cdot \log a - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\left(y \cdot \log z - \log a\right) - b}}{y}\\
\end{array}
\end{array}
if (-.f64 t 1) < -1.99999999999999991e37 or 1.99999999999999995e38 < (-.f64 t 1) Initial program 100.0%
Taylor expanded in y around 0 95.1%
if -1.99999999999999991e37 < (-.f64 t 1) < 1.99999999999999995e38Initial program 97.4%
Taylor expanded in t around 0 96.8%
+-commutative96.8%
mul-1-neg96.8%
unsub-neg96.8%
Simplified96.8%
Final simplification96.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (pow a (+ t -1.0))) y)))
(if (<= t -7e+112)
t_1
(if (<= t 2.05e-274)
(/ (/ x (* a (exp b))) y)
(if (<= t 6e+38) (/ x (/ a (/ (pow z y) (* y (exp b))))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * pow(a, (t + -1.0))) / y;
double tmp;
if (t <= -7e+112) {
tmp = t_1;
} else if (t <= 2.05e-274) {
tmp = (x / (a * exp(b))) / y;
} else if (t <= 6e+38) {
tmp = x / (a / (pow(z, y) / (y * exp(b))));
} 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) :: tmp
t_1 = (x * (a ** (t + (-1.0d0)))) / y
if (t <= (-7d+112)) then
tmp = t_1
else if (t <= 2.05d-274) then
tmp = (x / (a * exp(b))) / y
else if (t <= 6d+38) then
tmp = x / (a / ((z ** y) / (y * exp(b))))
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 * Math.pow(a, (t + -1.0))) / y;
double tmp;
if (t <= -7e+112) {
tmp = t_1;
} else if (t <= 2.05e-274) {
tmp = (x / (a * Math.exp(b))) / y;
} else if (t <= 6e+38) {
tmp = x / (a / (Math.pow(z, y) / (y * Math.exp(b))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x * math.pow(a, (t + -1.0))) / y tmp = 0 if t <= -7e+112: tmp = t_1 elif t <= 2.05e-274: tmp = (x / (a * math.exp(b))) / y elif t <= 6e+38: tmp = x / (a / (math.pow(z, y) / (y * math.exp(b)))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * (a ^ Float64(t + -1.0))) / y) tmp = 0.0 if (t <= -7e+112) tmp = t_1; elseif (t <= 2.05e-274) tmp = Float64(Float64(x / Float64(a * exp(b))) / y); elseif (t <= 6e+38) tmp = Float64(x / Float64(a / Float64((z ^ y) / Float64(y * exp(b))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x * (a ^ (t + -1.0))) / y; tmp = 0.0; if (t <= -7e+112) tmp = t_1; elseif (t <= 2.05e-274) tmp = (x / (a * exp(b))) / y; elseif (t <= 6e+38) tmp = x / (a / ((z ^ y) / (y * exp(b)))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t, -7e+112], t$95$1, If[LessEqual[t, 2.05e-274], N[(N[(x / N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 6e+38], N[(x / N[(a / N[(N[Power[z, y], $MachinePrecision] / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
\mathbf{if}\;t \leq -7 \cdot 10^{+112}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.05 \cdot 10^{-274}:\\
\;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\
\mathbf{elif}\;t \leq 6 \cdot 10^{+38}:\\
\;\;\;\;\frac{x}{\frac{a}{\frac{{z}^{y}}{y \cdot e^{b}}}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -6.99999999999999994e112 or 6.0000000000000002e38 < t Initial program 100.0%
Taylor expanded in y around 0 94.5%
Taylor expanded in b around 0 86.9%
exp-to-pow86.9%
sub-neg86.9%
metadata-eval86.9%
+-commutative86.9%
Simplified86.9%
if -6.99999999999999994e112 < t < 2.04999999999999994e-274Initial program 96.4%
Taylor expanded in y around 0 86.4%
div-exp81.3%
exp-to-pow82.5%
sub-neg82.5%
metadata-eval82.5%
Simplified82.5%
Taylor expanded in t around 0 84.7%
if 2.04999999999999994e-274 < t < 6.0000000000000002e38Initial program 99.2%
associate-/l*98.3%
associate--l+98.3%
exp-sum80.7%
associate-/r*80.7%
*-commutative80.7%
exp-to-pow80.7%
exp-diff79.2%
*-commutative79.2%
exp-to-pow79.4%
sub-neg79.4%
metadata-eval79.4%
Simplified79.4%
Taylor expanded in t around 0 85.4%
associate-/l*85.4%
Simplified85.4%
Final simplification85.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -4.4e+148) (not (<= y 1.32e+123))) (/ (/ (* 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.4e+148) || !(y <= 1.32e+123)) {
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.4d+148)) .or. (.not. (y <= 1.32d+123))) 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.4e+148) || !(y <= 1.32e+123)) {
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.4e+148) or not (y <= 1.32e+123): 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.4e+148) || !(y <= 1.32e+123)) tmp = Float64(Float64(Float64(x * (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.4e+148) || ~((y <= 1.32e+123))) 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.4e+148], N[Not[LessEqual[y, 1.32e+123]], $MachinePrecision]], N[(N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / a), $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 -4.4 \cdot 10^{+148} \lor \neg \left(y \leq 1.32 \cdot 10^{+123}\right):\\
\;\;\;\;\frac{\frac{x \cdot {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.3999999999999998e148 or 1.32e123 < y Initial program 100.0%
Taylor expanded in b around 0 98.7%
exp-sum78.4%
remove-double-neg78.4%
distribute-lft-neg-out78.4%
distribute-rgt-neg-out78.4%
neg-mul-178.4%
log-rec78.4%
associate-*r*78.4%
associate-*r*78.4%
exp-to-pow78.4%
sub-neg78.4%
metadata-eval78.4%
Simplified78.4%
Taylor expanded in t around 0 93.3%
if -4.3999999999999998e148 < y < 1.32e123Initial program 97.8%
Taylor expanded in y around 0 92.4%
Final simplification92.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -3.2e+82) (not (<= y 1.66e+40))) (/ (/ (* x (pow z y)) a) y) (/ (* x (/ (pow a (+ t -1.0)) (exp b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.2e+82) || !(y <= 1.66e+40)) {
tmp = ((x * pow(z, y)) / a) / y;
} else {
tmp = (x * (pow(a, (t + -1.0)) / exp(b))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-3.2d+82)) .or. (.not. (y <= 1.66d+40))) then
tmp = ((x * (z ** y)) / a) / y
else
tmp = (x * ((a ** (t + (-1.0d0))) / exp(b))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.2e+82) || !(y <= 1.66e+40)) {
tmp = ((x * Math.pow(z, y)) / a) / y;
} else {
tmp = (x * (Math.pow(a, (t + -1.0)) / Math.exp(b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -3.2e+82) or not (y <= 1.66e+40): tmp = ((x * math.pow(z, y)) / a) / y else: tmp = (x * (math.pow(a, (t + -1.0)) / math.exp(b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -3.2e+82) || !(y <= 1.66e+40)) tmp = Float64(Float64(Float64(x * (z ^ y)) / a) / y); else tmp = Float64(Float64(x * Float64((a ^ Float64(t + -1.0)) / exp(b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -3.2e+82) || ~((y <= 1.66e+40))) tmp = ((x * (z ^ y)) / a) / y; else tmp = (x * ((a ^ (t + -1.0)) / exp(b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -3.2e+82], N[Not[LessEqual[y, 1.66e+40]], $MachinePrecision]], N[(N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{+82} \lor \neg \left(y \leq 1.66 \cdot 10^{+40}\right):\\
\;\;\;\;\frac{\frac{x \cdot {z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \frac{{a}^{\left(t + -1\right)}}{e^{b}}}{y}\\
\end{array}
\end{array}
if y < -3.19999999999999975e82 or 1.6600000000000001e40 < y Initial program 100.0%
Taylor expanded in b around 0 94.5%
exp-sum73.9%
remove-double-neg73.9%
distribute-lft-neg-out73.9%
distribute-rgt-neg-out73.9%
neg-mul-173.9%
log-rec73.9%
associate-*r*73.9%
associate-*r*73.9%
exp-to-pow73.9%
sub-neg73.9%
metadata-eval73.9%
Simplified73.9%
Taylor expanded in t around 0 87.1%
if -3.19999999999999975e82 < y < 1.6600000000000001e40Initial program 97.3%
Taylor expanded in y around 0 95.3%
div-exp86.6%
exp-to-pow87.5%
sub-neg87.5%
metadata-eval87.5%
Simplified87.5%
Final simplification87.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (pow a (+ t -1.0))) y)))
(if (<= t -7.4e+112)
t_1
(if (<= t 4.6e-214)
(/ (/ x (* a (exp b))) y)
(if (<= t 1.05e+39) (/ (/ (* x (pow z y)) a) y) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * pow(a, (t + -1.0))) / y;
double tmp;
if (t <= -7.4e+112) {
tmp = t_1;
} else if (t <= 4.6e-214) {
tmp = (x / (a * exp(b))) / y;
} else if (t <= 1.05e+39) {
tmp = ((x * pow(z, y)) / a) / y;
} 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) :: tmp
t_1 = (x * (a ** (t + (-1.0d0)))) / y
if (t <= (-7.4d+112)) then
tmp = t_1
else if (t <= 4.6d-214) then
tmp = (x / (a * exp(b))) / y
else if (t <= 1.05d+39) then
tmp = ((x * (z ** y)) / a) / y
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 * Math.pow(a, (t + -1.0))) / y;
double tmp;
if (t <= -7.4e+112) {
tmp = t_1;
} else if (t <= 4.6e-214) {
tmp = (x / (a * Math.exp(b))) / y;
} else if (t <= 1.05e+39) {
tmp = ((x * Math.pow(z, y)) / a) / y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x * math.pow(a, (t + -1.0))) / y tmp = 0 if t <= -7.4e+112: tmp = t_1 elif t <= 4.6e-214: tmp = (x / (a * math.exp(b))) / y elif t <= 1.05e+39: tmp = ((x * math.pow(z, y)) / a) / y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * (a ^ Float64(t + -1.0))) / y) tmp = 0.0 if (t <= -7.4e+112) tmp = t_1; elseif (t <= 4.6e-214) tmp = Float64(Float64(x / Float64(a * exp(b))) / y); elseif (t <= 1.05e+39) tmp = Float64(Float64(Float64(x * (z ^ y)) / a) / y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x * (a ^ (t + -1.0))) / y; tmp = 0.0; if (t <= -7.4e+112) tmp = t_1; elseif (t <= 4.6e-214) tmp = (x / (a * exp(b))) / y; elseif (t <= 1.05e+39) tmp = ((x * (z ^ y)) / a) / y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t, -7.4e+112], t$95$1, If[LessEqual[t, 4.6e-214], N[(N[(x / N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 1.05e+39], N[(N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
\mathbf{if}\;t \leq -7.4 \cdot 10^{+112}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4.6 \cdot 10^{-214}:\\
\;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{+39}:\\
\;\;\;\;\frac{\frac{x \cdot {z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -7.40000000000000008e112 or 1.0499999999999999e39 < t Initial program 100.0%
Taylor expanded in y around 0 94.5%
Taylor expanded in b around 0 86.9%
exp-to-pow86.9%
sub-neg86.9%
metadata-eval86.9%
+-commutative86.9%
Simplified86.9%
if -7.40000000000000008e112 < t < 4.60000000000000022e-214Initial program 96.5%
Taylor expanded in y around 0 87.1%
div-exp82.7%
exp-to-pow83.7%
sub-neg83.7%
metadata-eval83.7%
Simplified83.7%
Taylor expanded in t around 0 85.6%
if 4.60000000000000022e-214 < t < 1.0499999999999999e39Initial program 99.7%
Taylor expanded in b around 0 81.2%
exp-sum73.7%
remove-double-neg73.7%
distribute-lft-neg-out73.7%
distribute-rgt-neg-out73.7%
neg-mul-173.7%
log-rec73.7%
associate-*r*73.7%
associate-*r*73.7%
exp-to-pow74.0%
sub-neg74.0%
metadata-eval74.0%
Simplified74.0%
Taylor expanded in t around 0 81.5%
Final simplification85.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -7.2e+112) (not (<= t 1.4e+39))) (* (pow a (+ t -1.0)) (/ x y)) (/ (/ x (* a (exp b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -7.2e+112) || !(t <= 1.4e+39)) {
tmp = pow(a, (t + -1.0)) * (x / y);
} else {
tmp = (x / (a * exp(b))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-7.2d+112)) .or. (.not. (t <= 1.4d+39))) then
tmp = (a ** (t + (-1.0d0))) * (x / y)
else
tmp = (x / (a * exp(b))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -7.2e+112) || !(t <= 1.4e+39)) {
tmp = Math.pow(a, (t + -1.0)) * (x / y);
} else {
tmp = (x / (a * Math.exp(b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -7.2e+112) or not (t <= 1.4e+39): tmp = math.pow(a, (t + -1.0)) * (x / y) else: tmp = (x / (a * math.exp(b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -7.2e+112) || !(t <= 1.4e+39)) tmp = Float64((a ^ Float64(t + -1.0)) * Float64(x / y)); else tmp = Float64(Float64(x / Float64(a * exp(b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -7.2e+112) || ~((t <= 1.4e+39))) tmp = (a ^ (t + -1.0)) * (x / y); else tmp = (x / (a * exp(b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -7.2e+112], N[Not[LessEqual[t, 1.4e+39]], $MachinePrecision]], N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.2 \cdot 10^{+112} \lor \neg \left(t \leq 1.4 \cdot 10^{+39}\right):\\
\;\;\;\;{a}^{\left(t + -1\right)} \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\
\end{array}
\end{array}
if t < -7.20000000000000001e112 or 1.40000000000000001e39 < t Initial program 100.0%
Taylor expanded in y around 0 94.5%
Taylor expanded in b around 0 86.9%
*-commutative86.9%
exp-to-pow86.9%
sub-neg86.9%
metadata-eval86.9%
associate-*r/78.0%
+-commutative78.0%
Simplified78.0%
if -7.20000000000000001e112 < t < 1.40000000000000001e39Initial program 97.5%
Taylor expanded in y around 0 81.2%
div-exp77.0%
exp-to-pow77.8%
sub-neg77.8%
metadata-eval77.8%
Simplified77.8%
Taylor expanded in t around 0 80.3%
Final simplification79.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -7.2e+112) (not (<= t 1.5e+39))) (/ (* x (pow a (+ t -1.0))) y) (/ (/ x (* a (exp b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -7.2e+112) || !(t <= 1.5e+39)) {
tmp = (x * pow(a, (t + -1.0))) / y;
} else {
tmp = (x / (a * exp(b))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-7.2d+112)) .or. (.not. (t <= 1.5d+39))) then
tmp = (x * (a ** (t + (-1.0d0)))) / y
else
tmp = (x / (a * exp(b))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -7.2e+112) || !(t <= 1.5e+39)) {
tmp = (x * Math.pow(a, (t + -1.0))) / y;
} else {
tmp = (x / (a * Math.exp(b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -7.2e+112) or not (t <= 1.5e+39): tmp = (x * math.pow(a, (t + -1.0))) / y else: tmp = (x / (a * math.exp(b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -7.2e+112) || !(t <= 1.5e+39)) tmp = Float64(Float64(x * (a ^ Float64(t + -1.0))) / y); else tmp = Float64(Float64(x / Float64(a * exp(b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -7.2e+112) || ~((t <= 1.5e+39))) tmp = (x * (a ^ (t + -1.0))) / y; else tmp = (x / (a * exp(b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -7.2e+112], N[Not[LessEqual[t, 1.5e+39]], $MachinePrecision]], N[(N[(x * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x / N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.2 \cdot 10^{+112} \lor \neg \left(t \leq 1.5 \cdot 10^{+39}\right):\\
\;\;\;\;\frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\
\end{array}
\end{array}
if t < -7.20000000000000001e112 or 1.5e39 < t Initial program 100.0%
Taylor expanded in y around 0 94.5%
Taylor expanded in b around 0 86.9%
exp-to-pow86.9%
sub-neg86.9%
metadata-eval86.9%
+-commutative86.9%
Simplified86.9%
if -7.20000000000000001e112 < t < 1.5e39Initial program 97.5%
Taylor expanded in y around 0 81.2%
div-exp77.0%
exp-to-pow77.8%
sub-neg77.8%
metadata-eval77.8%
Simplified77.8%
Taylor expanded in t around 0 80.3%
Final simplification82.6%
(FPCore (x y z t a b) :precision binary64 (if (<= a 5e+20) (/ (/ x (* a (exp b))) y) (/ x (* a (* y (exp b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= 5e+20) {
tmp = (x / (a * exp(b))) / 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 (a <= 5d+20) then
tmp = (x / (a * exp(b))) / 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 (a <= 5e+20) {
tmp = (x / (a * Math.exp(b))) / y;
} else {
tmp = x / (a * (y * Math.exp(b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= 5e+20: tmp = (x / (a * math.exp(b))) / y else: tmp = x / (a * (y * math.exp(b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= 5e+20) tmp = Float64(Float64(x / Float64(a * exp(b))) / 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 (a <= 5e+20) tmp = (x / (a * exp(b))) / y; else tmp = x / (a * (y * exp(b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, 5e+20], N[(N[(x / N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 5 \cdot 10^{+20}:\\
\;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\end{array}
\end{array}
if a < 5e20Initial program 99.4%
Taylor expanded in y around 0 84.3%
div-exp78.0%
exp-to-pow78.6%
sub-neg78.6%
metadata-eval78.6%
Simplified78.6%
Taylor expanded in t around 0 67.6%
if 5e20 < a Initial program 97.4%
associate-*l/90.0%
*-commutative90.0%
+-commutative90.0%
associate--l+90.0%
exp-sum73.4%
*-commutative73.4%
exp-to-pow74.1%
sub-neg74.1%
metadata-eval74.1%
exp-diff64.6%
*-commutative64.6%
exp-to-pow64.6%
Simplified64.6%
Taylor expanded in y around 0 69.4%
times-frac67.5%
exp-to-pow68.1%
sub-neg68.1%
metadata-eval68.1%
Simplified68.1%
Taylor expanded in t around 0 75.2%
Final simplification71.4%
(FPCore (x y z t a b) :precision binary64 (/ x (* a (* y (exp b)))))
double code(double x, double y, double z, double t, double a, double b) {
return x / (a * (y * exp(b)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x / (a * (y * exp(b)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x / (a * (y * Math.exp(b)));
}
def code(x, y, z, t, a, b): return x / (a * (y * math.exp(b)))
function code(x, y, z, t, a, b) return Float64(x / Float64(a * Float64(y * exp(b)))) end
function tmp = code(x, y, z, t, a, b) tmp = x / (a * (y * exp(b))); end
code[x_, y_, z_, t_, a_, b_] := N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{a \cdot \left(y \cdot e^{b}\right)}
\end{array}
Initial program 98.4%
associate-*l/89.6%
*-commutative89.6%
+-commutative89.6%
associate--l+89.6%
exp-sum74.4%
*-commutative74.4%
exp-to-pow75.0%
sub-neg75.0%
metadata-eval75.0%
exp-diff66.0%
*-commutative66.0%
exp-to-pow66.0%
Simplified66.0%
Taylor expanded in y around 0 72.2%
times-frac69.4%
exp-to-pow70.0%
sub-neg70.0%
metadata-eval70.0%
Simplified70.0%
Taylor expanded in t around 0 67.3%
Final simplification67.3%
(FPCore (x y z t a b) :precision binary64 (if (<= b -7e-23) (- (/ x (* y a)) (* (/ x a) (/ b y))) (/ (/ x (+ a (* a b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -7e-23) {
tmp = (x / (y * a)) - ((x / a) * (b / y));
} else {
tmp = (x / (a + (a * b))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-7d-23)) then
tmp = (x / (y * a)) - ((x / a) * (b / y))
else
tmp = (x / (a + (a * b))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -7e-23) {
tmp = (x / (y * a)) - ((x / a) * (b / y));
} else {
tmp = (x / (a + (a * b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -7e-23: tmp = (x / (y * a)) - ((x / a) * (b / y)) else: tmp = (x / (a + (a * b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -7e-23) tmp = Float64(Float64(x / Float64(y * a)) - Float64(Float64(x / a) * Float64(b / y))); else tmp = Float64(Float64(x / Float64(a + Float64(a * b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -7e-23) tmp = (x / (y * a)) - ((x / a) * (b / y)); else tmp = (x / (a + (a * b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -7e-23], N[(N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision] - N[(N[(x / a), $MachinePrecision] * N[(b / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(a + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -7 \cdot 10^{-23}:\\
\;\;\;\;\frac{x}{y \cdot a} - \frac{x}{a} \cdot \frac{b}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a + a \cdot b}}{y}\\
\end{array}
\end{array}
if b < -6.99999999999999987e-23Initial program 98.6%
Taylor expanded in y around 0 95.9%
Taylor expanded in t around 0 87.7%
*-commutative87.7%
exp-diff87.7%
mul-1-neg87.7%
log-rec87.7%
rem-exp-log87.8%
associate-/l/87.8%
*-commutative87.8%
Simplified87.8%
Taylor expanded in b around 0 43.4%
+-commutative43.4%
mul-1-neg43.4%
unsub-neg43.4%
*-commutative43.4%
times-frac42.2%
Simplified42.2%
if -6.99999999999999987e-23 < b Initial program 98.3%
Taylor expanded in y around 0 82.0%
div-exp74.4%
exp-to-pow75.1%
sub-neg75.1%
metadata-eval75.1%
Simplified75.1%
Taylor expanded in t around 0 61.5%
Taylor expanded in b around 0 47.9%
Final simplification46.3%
(FPCore (x y z t a b) :precision binary64 (if (<= b 4.7e-26) (/ (* x (- (/ 1.0 a) (/ b a))) y) (/ (/ x (* a b)) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 4.7e-26) {
tmp = (x * ((1.0 / a) - (b / a))) / y;
} else {
tmp = (x / (a * b)) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= 4.7d-26) then
tmp = (x * ((1.0d0 / a) - (b / a))) / y
else
tmp = (x / (a * b)) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 4.7e-26) {
tmp = (x * ((1.0 / a) - (b / a))) / y;
} else {
tmp = (x / (a * b)) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 4.7e-26: tmp = (x * ((1.0 / a) - (b / a))) / y else: tmp = (x / (a * b)) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 4.7e-26) tmp = Float64(Float64(x * Float64(Float64(1.0 / a) - Float64(b / a))) / y); else tmp = Float64(Float64(x / Float64(a * b)) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= 4.7e-26) tmp = (x * ((1.0 / a) - (b / a))) / y; else tmp = (x / (a * b)) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 4.7e-26], N[(N[(x * N[(N[(1.0 / a), $MachinePrecision] - N[(b / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x / N[(a * b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 4.7 \cdot 10^{-26}:\\
\;\;\;\;\frac{x \cdot \left(\frac{1}{a} - \frac{b}{a}\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a \cdot b}}{y}\\
\end{array}
\end{array}
if b < 4.69999999999999989e-26Initial program 97.9%
Taylor expanded in y around 0 85.5%
Taylor expanded in t around 0 65.3%
*-commutative65.3%
exp-diff65.3%
mul-1-neg65.3%
log-rec65.3%
rem-exp-log66.1%
associate-/l/66.1%
*-commutative66.1%
Simplified66.1%
Taylor expanded in b around 0 47.3%
+-commutative47.3%
mul-1-neg47.3%
unsub-neg47.3%
Simplified47.3%
if 4.69999999999999989e-26 < b Initial program 99.7%
Taylor expanded in y around 0 86.9%
div-exp68.7%
exp-to-pow68.7%
sub-neg68.7%
metadata-eval68.7%
Simplified68.7%
Taylor expanded in t around 0 75.4%
Taylor expanded in b around 0 43.0%
Taylor expanded in b around inf 43.0%
Final simplification46.0%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1e-174) (/ (- (/ x a) (/ (* x b) a)) y) (/ (* x (/ 1.0 (+ a (* a b)))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1e-174) {
tmp = ((x / a) - ((x * b) / a)) / y;
} else {
tmp = (x * (1.0 / (a + (a * b)))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-1d-174)) then
tmp = ((x / a) - ((x * b) / a)) / y
else
tmp = (x * (1.0d0 / (a + (a * b)))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1e-174) {
tmp = ((x / a) - ((x * b) / a)) / y;
} else {
tmp = (x * (1.0 / (a + (a * b)))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1e-174: tmp = ((x / a) - ((x * b) / a)) / y else: tmp = (x * (1.0 / (a + (a * b)))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1e-174) tmp = Float64(Float64(Float64(x / a) - Float64(Float64(x * b) / a)) / y); else tmp = Float64(Float64(x * Float64(1.0 / Float64(a + Float64(a * b)))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1e-174) tmp = ((x / a) - ((x * b) / a)) / y; else tmp = (x * (1.0 / (a + (a * b)))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1e-174], N[(N[(N[(x / a), $MachinePrecision] - N[(N[(x * b), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[(1.0 / N[(a + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1 \cdot 10^{-174}:\\
\;\;\;\;\frac{\frac{x}{a} - \frac{x \cdot b}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \frac{1}{a + a \cdot b}}{y}\\
\end{array}
\end{array}
if b < -1e-174Initial program 98.4%
Taylor expanded in y around 0 91.7%
Taylor expanded in t around 0 75.2%
*-commutative75.2%
exp-diff75.2%
mul-1-neg75.2%
log-rec75.2%
rem-exp-log75.6%
associate-/l/75.6%
*-commutative75.6%
Simplified75.6%
Taylor expanded in b around 0 45.7%
if -1e-174 < b Initial program 98.4%
Taylor expanded in y around 0 82.2%
Taylor expanded in t around 0 63.9%
*-commutative63.9%
exp-diff63.9%
mul-1-neg63.9%
log-rec63.9%
rem-exp-log64.6%
associate-/l/64.6%
*-commutative64.6%
Simplified64.6%
Taylor expanded in b around 0 48.6%
Final simplification47.5%
(FPCore (x y z t a b) :precision binary64 (if (<= a 1.08e+61) (/ (/ x a) y) (/ x (* a (+ y (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= 1.08e+61) {
tmp = (x / a) / y;
} else {
tmp = x / (a * (y + (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 (a <= 1.08d+61) then
tmp = (x / a) / y
else
tmp = x / (a * (y + (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 (a <= 1.08e+61) {
tmp = (x / a) / y;
} else {
tmp = x / (a * (y + (y * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= 1.08e+61: tmp = (x / a) / y else: tmp = x / (a * (y + (y * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= 1.08e+61) tmp = Float64(Float64(x / a) / y); else tmp = Float64(x / Float64(a * Float64(y + Float64(y * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= 1.08e+61) tmp = (x / a) / y; else tmp = x / (a * (y + (y * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, 1.08e+61], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(a * N[(y + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.08 \cdot 10^{+61}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y + y \cdot b\right)}\\
\end{array}
\end{array}
if a < 1.08e61Initial program 99.5%
Taylor expanded in y around 0 84.6%
Taylor expanded in t around 0 66.5%
*-commutative66.5%
exp-diff66.5%
mul-1-neg66.5%
log-rec66.5%
rem-exp-log67.0%
associate-/l/67.0%
*-commutative67.0%
Simplified67.0%
Taylor expanded in b around 0 40.1%
if 1.08e61 < a Initial program 97.1%
associate-*l/90.4%
*-commutative90.4%
+-commutative90.4%
associate--l+90.4%
exp-sum72.6%
*-commutative72.6%
exp-to-pow73.3%
sub-neg73.3%
metadata-eval73.3%
exp-diff64.4%
*-commutative64.4%
exp-to-pow64.4%
Simplified64.4%
Taylor expanded in y around 0 68.8%
times-frac67.5%
exp-to-pow68.2%
sub-neg68.2%
metadata-eval68.2%
Simplified68.2%
Taylor expanded in t around 0 77.0%
Taylor expanded in b around 0 47.1%
distribute-lft-out48.2%
*-commutative48.2%
Simplified48.2%
Final simplification43.6%
(FPCore (x y z t a b) :precision binary64 (if (<= b 2.9e-24) (/ (/ x a) y) (/ x (* a (* y b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 2.9e-24) {
tmp = (x / a) / y;
} 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 <= 2.9d-24) then
tmp = (x / a) / y
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 <= 2.9e-24) {
tmp = (x / a) / y;
} else {
tmp = x / (a * (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 2.9e-24: tmp = (x / a) / y else: tmp = x / (a * (y * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 2.9e-24) tmp = Float64(Float64(x / a) / y); 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 <= 2.9e-24) tmp = (x / a) / y; else tmp = x / (a * (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 2.9e-24], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(a * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 2.9 \cdot 10^{-24}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot b\right)}\\
\end{array}
\end{array}
if b < 2.8999999999999999e-24Initial program 97.7%
Taylor expanded in y around 0 85.4%
Taylor expanded in t around 0 65.3%
*-commutative65.3%
exp-diff65.3%
mul-1-neg65.3%
log-rec65.3%
rem-exp-log66.1%
associate-/l/66.1%
*-commutative66.1%
Simplified66.1%
Taylor expanded in b around 0 43.0%
if 2.8999999999999999e-24 < b Initial program 100.0%
Taylor expanded in y around 0 87.0%
div-exp68.6%
exp-to-pow68.6%
sub-neg68.6%
metadata-eval68.6%
Simplified68.6%
Taylor expanded in t around 0 75.5%
Taylor expanded in b around 0 42.6%
Taylor expanded in b around inf 41.2%
*-commutative41.2%
Simplified41.2%
Final simplification42.5%
(FPCore (x y z t a b) :precision binary64 (if (<= b 6e-26) (/ (/ x a) y) (/ (/ x (* a b)) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 6e-26) {
tmp = (x / a) / y;
} else {
tmp = (x / (a * b)) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= 6d-26) then
tmp = (x / a) / y
else
tmp = (x / (a * b)) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 6e-26) {
tmp = (x / a) / y;
} else {
tmp = (x / (a * b)) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 6e-26: tmp = (x / a) / y else: tmp = (x / (a * b)) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 6e-26) tmp = Float64(Float64(x / a) / y); else tmp = Float64(Float64(x / Float64(a * b)) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= 6e-26) tmp = (x / a) / y; else tmp = (x / (a * b)) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 6e-26], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision], N[(N[(x / N[(a * b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 6 \cdot 10^{-26}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a \cdot b}}{y}\\
\end{array}
\end{array}
if b < 6.00000000000000023e-26Initial program 97.9%
Taylor expanded in y around 0 85.5%
Taylor expanded in t around 0 65.3%
*-commutative65.3%
exp-diff65.3%
mul-1-neg65.3%
log-rec65.3%
rem-exp-log66.1%
associate-/l/66.1%
*-commutative66.1%
Simplified66.1%
Taylor expanded in b around 0 42.8%
if 6.00000000000000023e-26 < b Initial program 99.7%
Taylor expanded in y around 0 86.9%
div-exp68.7%
exp-to-pow68.7%
sub-neg68.7%
metadata-eval68.7%
Simplified68.7%
Taylor expanded in t around 0 75.4%
Taylor expanded in b around 0 43.0%
Taylor expanded in b around inf 43.0%
Final simplification42.9%
(FPCore (x y z t a b) :precision binary64 (if (<= a 1e+78) (/ (/ x a) y) (/ x (* y a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= 1e+78) {
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 (a <= 1d+78) 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 (a <= 1e+78) {
tmp = (x / a) / y;
} else {
tmp = x / (y * a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= 1e+78: tmp = (x / a) / y else: tmp = x / (y * a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= 1e+78) 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 (a <= 1e+78) tmp = (x / a) / y; else tmp = x / (y * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, 1e+78], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 10^{+78}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\end{array}
\end{array}
if a < 1.00000000000000001e78Initial program 99.4%
Taylor expanded in y around 0 85.3%
Taylor expanded in t around 0 68.2%
*-commutative68.2%
exp-diff68.2%
mul-1-neg68.2%
log-rec68.2%
rem-exp-log68.8%
associate-/l/68.8%
*-commutative68.8%
Simplified68.8%
Taylor expanded in b around 0 40.1%
if 1.00000000000000001e78 < a Initial program 97.0%
Taylor expanded in y around 0 86.7%
Taylor expanded in t around 0 68.6%
*-commutative68.6%
exp-diff68.6%
mul-1-neg68.6%
log-rec68.6%
rem-exp-log69.1%
associate-/l/69.1%
*-commutative69.1%
Simplified69.1%
Taylor expanded in b around 0 41.3%
Final simplification40.6%
(FPCore (x y z t a b) :precision binary64 (/ x (* y a)))
double code(double x, double y, double z, double t, double a, double b) {
return x / (y * a);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x / (y * a)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x / (y * a);
}
def code(x, y, z, t, a, b): return x / (y * a)
function code(x, y, z, t, a, b) return Float64(x / Float64(y * a)) end
function tmp = code(x, y, z, t, a, b) tmp = x / (y * a); end
code[x_, y_, z_, t_, a_, b_] := N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y \cdot a}
\end{array}
Initial program 98.4%
Taylor expanded in y around 0 85.9%
Taylor expanded in t around 0 68.3%
*-commutative68.3%
exp-diff68.3%
mul-1-neg68.3%
log-rec68.3%
rem-exp-log68.9%
associate-/l/68.9%
*-commutative68.9%
Simplified68.9%
Taylor expanded in b around 0 33.6%
Final simplification33.6%
(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 2024036
(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))