
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x * exp((((y * log(z)) + ((t - 1.0d0) * log(a))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x * Math.exp((((y * Math.log(z)) + ((t - 1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + ((t - 1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x * exp((((y * log(z)) + ((t - 1.0d0) * log(a))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x * Math.exp((((y * Math.log(z)) + ((t - 1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + ((t - 1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\end{array}
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (+ t -1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + ((t + -1.0) * log(a))) - b))) / y;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x * exp((((y * log(z)) + ((t + (-1.0d0)) * log(a))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x * Math.exp((((y * Math.log(z)) + ((t + -1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + ((t + -1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t + -1.0) * log(a))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + ((t + -1.0) * log(a))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \left(t + -1\right) \cdot \log a\right) - b}}{y}
\end{array}
Initial program 98.6%
Final simplification98.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -12000.0) (not (<= y 7.8e+56))) (/ (* 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 <= -12000.0) || !(y <= 7.8e+56)) {
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 <= (-12000.0d0)) .or. (.not. (y <= 7.8d+56))) 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 <= -12000.0) || !(y <= 7.8e+56)) {
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 <= -12000.0) or not (y <= 7.8e+56): 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 <= -12000.0) || !(y <= 7.8e+56)) 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 <= -12000.0) || ~((y <= 7.8e+56))) 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, -12000.0], N[Not[LessEqual[y, 7.8e+56]], $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 -12000 \lor \neg \left(y \leq 7.8 \cdot 10^{+56}\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 < -12000 or 7.79999999999999989e56 < y Initial program 100.0%
Taylor expanded in t around 0 92.9%
+-commutative92.9%
mul-1-neg92.9%
unsub-neg92.9%
Simplified92.9%
if -12000 < y < 7.79999999999999989e56Initial program 97.2%
Taylor expanded in y around 0 96.6%
Final simplification94.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -5e+44) (not (<= y 1.7e+58))) (* 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 <= -5e+44) || !(y <= 1.7e+58)) {
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 <= (-5d+44)) .or. (.not. (y <= 1.7d+58))) 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 <= -5e+44) || !(y <= 1.7e+58)) {
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 <= -5e+44) or not (y <= 1.7e+58): 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 <= -5e+44) || !(y <= 1.7e+58)) tmp = Float64(x * Float64(Float64((z ^ y) / a) / y)); else tmp = Float64(Float64(x * exp(Float64(Float64(Float64(t + -1.0) * log(a)) - b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -5e+44) || ~((y <= 1.7e+58))) 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, -5e+44], N[Not[LessEqual[y, 1.7e+58]], $MachinePrecision]], N[(x * N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[Exp[N[(N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5 \cdot 10^{+44} \lor \neg \left(y \leq 1.7 \cdot 10^{+58}\right):\\
\;\;\;\;x \cdot \frac{\frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\left(t + -1\right) \cdot \log a - b}}{y}\\
\end{array}
\end{array}
if y < -4.9999999999999996e44 or 1.7e58 < y Initial program 100.0%
*-commutative100.0%
associate-/l*77.9%
exp-diff59.3%
associate-/l/59.3%
exp-sum46.9%
*-commutative46.9%
exp-to-pow46.9%
*-commutative46.9%
exp-to-pow46.9%
sub-neg46.9%
metadata-eval46.9%
Simplified46.9%
Taylor expanded in t around 0 54.9%
Taylor expanded in b around 0 67.4%
associate-/r/88.7%
Applied egg-rr88.7%
if -4.9999999999999996e44 < y < 1.7e58Initial program 97.5%
Taylor expanded in y around 0 94.2%
Final simplification91.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -4.8e+49) (not (<= y 1.45e+56))) (* x (/ (/ (pow z y) a) y)) (* x (/ (/ (pow a (+ t -1.0)) (exp b)) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -4.8e+49) || !(y <= 1.45e+56)) {
tmp = x * ((pow(z, y) / a) / y);
} else {
tmp = x * ((pow(a, (t + -1.0)) / exp(b)) / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-4.8d+49)) .or. (.not. (y <= 1.45d+56))) then
tmp = x * (((z ** y) / a) / y)
else
tmp = x * (((a ** (t + (-1.0d0))) / exp(b)) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -4.8e+49) || !(y <= 1.45e+56)) {
tmp = x * ((Math.pow(z, y) / a) / y);
} else {
tmp = x * ((Math.pow(a, (t + -1.0)) / Math.exp(b)) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -4.8e+49) or not (y <= 1.45e+56): tmp = x * ((math.pow(z, y) / a) / y) else: tmp = x * ((math.pow(a, (t + -1.0)) / math.exp(b)) / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -4.8e+49) || !(y <= 1.45e+56)) tmp = Float64(x * Float64(Float64((z ^ y) / a) / y)); else tmp = Float64(x * Float64(Float64((a ^ Float64(t + -1.0)) / exp(b)) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -4.8e+49) || ~((y <= 1.45e+56))) tmp = x * (((z ^ y) / a) / y); else tmp = x * (((a ^ (t + -1.0)) / exp(b)) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -4.8e+49], N[Not[LessEqual[y, 1.45e+56]], $MachinePrecision]], N[(x * N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / N[Exp[b], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.8 \cdot 10^{+49} \lor \neg \left(y \leq 1.45 \cdot 10^{+56}\right):\\
\;\;\;\;x \cdot \frac{\frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{\frac{{a}^{\left(t + -1\right)}}{e^{b}}}{y}\\
\end{array}
\end{array}
if y < -4.8e49 or 1.45000000000000004e56 < y Initial program 100.0%
*-commutative100.0%
associate-/l*77.9%
exp-diff59.3%
associate-/l/59.3%
exp-sum46.9%
*-commutative46.9%
exp-to-pow46.9%
*-commutative46.9%
exp-to-pow46.9%
sub-neg46.9%
metadata-eval46.9%
Simplified46.9%
Taylor expanded in t around 0 54.9%
Taylor expanded in b around 0 67.4%
associate-/r/88.7%
Applied egg-rr88.7%
if -4.8e49 < y < 1.45000000000000004e56Initial program 97.5%
Taylor expanded in y around 0 94.2%
associate-/l*92.6%
div-exp80.0%
exp-to-pow80.6%
sub-neg80.6%
metadata-eval80.6%
Simplified80.6%
Taylor expanded in x around 0 80.2%
associate-/l/80.2%
exp-to-pow81.1%
sub-neg81.1%
metadata-eval81.1%
associate-*r/82.5%
*-rgt-identity82.5%
associate-*r/82.4%
associate-*l*80.5%
associate-*r/80.5%
*-rgt-identity80.5%
metadata-eval80.5%
sub-neg80.5%
Simplified80.5%
Final simplification84.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2.15e+51) (not (<= y 7.3e+56))) (* x (/ (/ (pow z y) a) y)) (/ x (/ y (/ (/ (pow a t) a) (exp b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.15e+51) || !(y <= 7.3e+56)) {
tmp = x * ((pow(z, y) / a) / y);
} else {
tmp = x / (y / ((pow(a, t) / a) / exp(b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-2.15d+51)) .or. (.not. (y <= 7.3d+56))) then
tmp = x * (((z ** y) / a) / y)
else
tmp = x / (y / (((a ** t) / a) / exp(b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.15e+51) || !(y <= 7.3e+56)) {
tmp = x * ((Math.pow(z, y) / a) / y);
} else {
tmp = x / (y / ((Math.pow(a, t) / a) / Math.exp(b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2.15e+51) or not (y <= 7.3e+56): tmp = x * ((math.pow(z, y) / a) / y) else: tmp = x / (y / ((math.pow(a, t) / a) / math.exp(b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -2.15e+51) || !(y <= 7.3e+56)) tmp = Float64(x * Float64(Float64((z ^ y) / a) / y)); else tmp = Float64(x / Float64(y / Float64(Float64((a ^ t) / a) / exp(b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -2.15e+51) || ~((y <= 7.3e+56))) tmp = x * (((z ^ y) / a) / y); else tmp = x / (y / (((a ^ t) / a) / exp(b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2.15e+51], N[Not[LessEqual[y, 7.3e+56]], $MachinePrecision]], N[(x * N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x / N[(y / N[(N[(N[Power[a, t], $MachinePrecision] / a), $MachinePrecision] / N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.15 \cdot 10^{+51} \lor \neg \left(y \leq 7.3 \cdot 10^{+56}\right):\\
\;\;\;\;x \cdot \frac{\frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{y}{\frac{\frac{{a}^{t}}{a}}{e^{b}}}}\\
\end{array}
\end{array}
if y < -2.1499999999999999e51 or 7.3e56 < y Initial program 100.0%
*-commutative100.0%
associate-/l*77.9%
exp-diff59.3%
associate-/l/59.3%
exp-sum46.9%
*-commutative46.9%
exp-to-pow46.9%
*-commutative46.9%
exp-to-pow46.9%
sub-neg46.9%
metadata-eval46.9%
Simplified46.9%
Taylor expanded in t around 0 54.9%
Taylor expanded in b around 0 67.4%
associate-/r/88.7%
Applied egg-rr88.7%
if -2.1499999999999999e51 < y < 7.3e56Initial program 97.5%
Taylor expanded in y around 0 94.2%
associate-/l*92.6%
div-exp80.0%
exp-to-pow80.6%
sub-neg80.6%
metadata-eval80.6%
Simplified80.6%
expm1-log1p-u80.5%
expm1-udef69.0%
metadata-eval69.0%
sub-neg69.0%
pow-sub69.0%
pow169.0%
Applied egg-rr69.0%
expm1-def80.7%
expm1-log1p80.8%
Simplified80.8%
Final simplification84.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (/ (/ (pow z y) a) y))))
(if (<= y -4800.0)
t_1
(if (<= y 8e-114)
(/ (/ x (* a (exp b))) y)
(if (<= y 2.7e+55) (/ x (/ y (pow a (+ t -1.0)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * ((pow(z, y) / a) / y);
double tmp;
if (y <= -4800.0) {
tmp = t_1;
} else if (y <= 8e-114) {
tmp = (x / (a * exp(b))) / y;
} else if (y <= 2.7e+55) {
tmp = x / (y / pow(a, (t + -1.0)));
} 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 * (((z ** y) / a) / y)
if (y <= (-4800.0d0)) then
tmp = t_1
else if (y <= 8d-114) then
tmp = (x / (a * exp(b))) / y
else if (y <= 2.7d+55) then
tmp = x / (y / (a ** (t + (-1.0d0))))
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(z, y) / a) / y);
double tmp;
if (y <= -4800.0) {
tmp = t_1;
} else if (y <= 8e-114) {
tmp = (x / (a * Math.exp(b))) / y;
} else if (y <= 2.7e+55) {
tmp = x / (y / Math.pow(a, (t + -1.0)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * ((math.pow(z, y) / a) / y) tmp = 0 if y <= -4800.0: tmp = t_1 elif y <= 8e-114: tmp = (x / (a * math.exp(b))) / y elif y <= 2.7e+55: tmp = x / (y / math.pow(a, (t + -1.0))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * Float64(Float64((z ^ y) / a) / y)) tmp = 0.0 if (y <= -4800.0) tmp = t_1; elseif (y <= 8e-114) tmp = Float64(Float64(x / Float64(a * exp(b))) / y); elseif (y <= 2.7e+55) tmp = Float64(x / Float64(y / (a ^ Float64(t + -1.0)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * (((z ^ y) / a) / y); tmp = 0.0; if (y <= -4800.0) tmp = t_1; elseif (y <= 8e-114) tmp = (x / (a * exp(b))) / y; elseif (y <= 2.7e+55) tmp = x / (y / (a ^ (t + -1.0))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4800.0], t$95$1, If[LessEqual[y, 8e-114], N[(N[(x / N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 2.7e+55], N[(x / N[(y / N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{\frac{{z}^{y}}{a}}{y}\\
\mathbf{if}\;y \leq -4800:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 8 \cdot 10^{-114}:\\
\;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{+55}:\\
\;\;\;\;\frac{x}{\frac{y}{{a}^{\left(t + -1\right)}}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -4800 or 2.69999999999999977e55 < y Initial program 100.0%
*-commutative100.0%
associate-/l*80.0%
exp-diff60.0%
associate-/l/60.0%
exp-sum46.4%
*-commutative46.4%
exp-to-pow46.4%
*-commutative46.4%
exp-to-pow46.4%
sub-neg46.4%
metadata-eval46.4%
Simplified46.4%
Taylor expanded in t around 0 55.3%
Taylor expanded in b around 0 66.6%
associate-/r/85.8%
Applied egg-rr85.8%
if -4800 < y < 8.0000000000000004e-114Initial program 96.8%
Taylor expanded in t around 0 76.6%
+-commutative76.6%
mul-1-neg76.6%
unsub-neg76.6%
Simplified76.6%
Taylor expanded in y around 0 76.6%
exp-neg76.6%
associate-*r/76.6%
*-rgt-identity76.6%
+-commutative76.6%
exp-sum76.6%
rem-exp-log77.7%
Simplified77.7%
if 8.0000000000000004e-114 < y < 2.69999999999999977e55Initial program 98.8%
Taylor expanded in y around 0 96.1%
associate-/l*96.3%
div-exp92.9%
exp-to-pow93.4%
sub-neg93.4%
metadata-eval93.4%
Simplified93.4%
Taylor expanded in b around 0 86.2%
exp-to-pow86.7%
Simplified86.7%
Final simplification82.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -8500.0) (not (<= y 0.66))) (* x (/ (/ (pow z y) a) y)) (/ (/ x (* a (exp b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -8500.0) || !(y <= 0.66)) {
tmp = x * ((pow(z, y) / a) / y);
} else {
tmp = (x / (a * exp(b))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-8500.0d0)) .or. (.not. (y <= 0.66d0))) then
tmp = x * (((z ** y) / a) / y)
else
tmp = (x / (a * exp(b))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -8500.0) || !(y <= 0.66)) {
tmp = x * ((Math.pow(z, y) / a) / y);
} else {
tmp = (x / (a * Math.exp(b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -8500.0) or not (y <= 0.66): tmp = x * ((math.pow(z, y) / a) / y) else: tmp = (x / (a * math.exp(b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -8500.0) || !(y <= 0.66)) tmp = Float64(x * Float64(Float64((z ^ y) / a) / y)); else tmp = Float64(Float64(x / Float64(a * exp(b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -8500.0) || ~((y <= 0.66))) tmp = x * (((z ^ y) / a) / y); else tmp = (x / (a * exp(b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -8500.0], N[Not[LessEqual[y, 0.66]], $MachinePrecision]], N[(x * N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8500 \lor \neg \left(y \leq 0.66\right):\\
\;\;\;\;x \cdot \frac{\frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\
\end{array}
\end{array}
if y < -8500 or 0.660000000000000031 < y Initial program 99.9%
*-commutative99.9%
associate-/l*81.4%
exp-diff62.9%
associate-/l/62.9%
exp-sum47.3%
*-commutative47.3%
exp-to-pow47.3%
*-commutative47.3%
exp-to-pow47.4%
sub-neg47.4%
metadata-eval47.4%
Simplified47.4%
Taylor expanded in t around 0 55.7%
Taylor expanded in b around 0 66.2%
associate-/r/84.0%
Applied egg-rr84.0%
if -8500 < y < 0.660000000000000031Initial program 97.1%
Taylor expanded in t around 0 76.2%
+-commutative76.2%
mul-1-neg76.2%
unsub-neg76.2%
Simplified76.2%
Taylor expanded in y around 0 76.2%
exp-neg76.2%
associate-*r/76.2%
*-rgt-identity76.2%
+-commutative76.2%
exp-sum76.2%
rem-exp-log77.2%
Simplified77.2%
Final simplification80.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -3.4e-17) (not (<= b 8.5e-7))) (/ x (* a (* y (exp b)))) (/ (/ (- a (* (/ a x) (* x b))) (* a (/ a x))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -3.4e-17) || !(b <= 8.5e-7)) {
tmp = x / (a * (y * exp(b)));
} else {
tmp = ((a - ((a / x) * (x * b))) / (a * (a / x))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-3.4d-17)) .or. (.not. (b <= 8.5d-7))) then
tmp = x / (a * (y * exp(b)))
else
tmp = ((a - ((a / x) * (x * b))) / (a * (a / x))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -3.4e-17) || !(b <= 8.5e-7)) {
tmp = x / (a * (y * Math.exp(b)));
} else {
tmp = ((a - ((a / x) * (x * b))) / (a * (a / x))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -3.4e-17) or not (b <= 8.5e-7): tmp = x / (a * (y * math.exp(b))) else: tmp = ((a - ((a / x) * (x * b))) / (a * (a / x))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -3.4e-17) || !(b <= 8.5e-7)) tmp = Float64(x / Float64(a * Float64(y * exp(b)))); else tmp = Float64(Float64(Float64(a - Float64(Float64(a / x) * Float64(x * b))) / Float64(a * Float64(a / x))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -3.4e-17) || ~((b <= 8.5e-7))) tmp = x / (a * (y * exp(b))); else tmp = ((a - ((a / x) * (x * b))) / (a * (a / x))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -3.4e-17], N[Not[LessEqual[b, 8.5e-7]], $MachinePrecision]], N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(a - N[(N[(a / x), $MachinePrecision] * N[(x * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a * N[(a / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.4 \cdot 10^{-17} \lor \neg \left(b \leq 8.5 \cdot 10^{-7}\right):\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{a - \frac{a}{x} \cdot \left(x \cdot b\right)}{a \cdot \frac{a}{x}}}{y}\\
\end{array}
\end{array}
if b < -3.3999999999999998e-17 or 8.50000000000000014e-7 < b Initial program 100.0%
associate-*l/85.9%
*-commutative85.9%
+-commutative85.9%
associate--l+85.9%
exp-sum64.4%
*-commutative64.4%
exp-to-pow64.4%
sub-neg64.4%
metadata-eval64.4%
exp-diff50.4%
*-commutative50.4%
exp-to-pow50.4%
Simplified50.4%
Taylor expanded in t around 0 69.8%
times-frac60.1%
Simplified60.1%
Taylor expanded in y around 0 78.2%
if -3.3999999999999998e-17 < b < 8.50000000000000014e-7Initial program 97.0%
Taylor expanded in t around 0 76.9%
+-commutative76.9%
mul-1-neg76.9%
unsub-neg76.9%
Simplified76.9%
Taylor expanded in y around 0 34.0%
exp-neg34.0%
associate-*r/34.0%
*-rgt-identity34.0%
+-commutative34.0%
exp-sum34.0%
rem-exp-log35.1%
Simplified35.1%
Taylor expanded in b around 0 35.1%
+-commutative35.1%
clear-num35.0%
associate-*r/35.0%
frac-add42.8%
*-un-lft-identity42.8%
*-commutative42.8%
Applied egg-rr42.8%
Final simplification61.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -2e-12)
(/ (+ (* x (- (/ 1.0 a) (/ b a))) (/ b (/ (/ a x) b))) y)
(if (<= b 7e-5)
(/ (/ (- a (* (/ a x) (* x b))) (* a (/ a x))) y)
(/ x (* y (+ a (* a b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2e-12) {
tmp = ((x * ((1.0 / a) - (b / a))) + (b / ((a / x) / b))) / y;
} else if (b <= 7e-5) {
tmp = ((a - ((a / x) * (x * b))) / (a * (a / x))) / y;
} else {
tmp = x / (y * (a + (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-12)) then
tmp = ((x * ((1.0d0 / a) - (b / a))) + (b / ((a / x) / b))) / y
else if (b <= 7d-5) then
tmp = ((a - ((a / x) * (x * b))) / (a * (a / x))) / y
else
tmp = x / (y * (a + (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-12) {
tmp = ((x * ((1.0 / a) - (b / a))) + (b / ((a / x) / b))) / y;
} else if (b <= 7e-5) {
tmp = ((a - ((a / x) * (x * b))) / (a * (a / x))) / y;
} else {
tmp = x / (y * (a + (a * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -2e-12: tmp = ((x * ((1.0 / a) - (b / a))) + (b / ((a / x) / b))) / y elif b <= 7e-5: tmp = ((a - ((a / x) * (x * b))) / (a * (a / x))) / y else: tmp = x / (y * (a + (a * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -2e-12) tmp = Float64(Float64(Float64(x * Float64(Float64(1.0 / a) - Float64(b / a))) + Float64(b / Float64(Float64(a / x) / b))) / y); elseif (b <= 7e-5) tmp = Float64(Float64(Float64(a - Float64(Float64(a / x) * Float64(x * b))) / Float64(a * Float64(a / x))) / y); else tmp = Float64(x / Float64(y * Float64(a + Float64(a * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -2e-12) tmp = ((x * ((1.0 / a) - (b / a))) + (b / ((a / x) / b))) / y; elseif (b <= 7e-5) tmp = ((a - ((a / x) * (x * b))) / (a * (a / x))) / y; else tmp = x / (y * (a + (a * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -2e-12], N[(N[(N[(x * N[(N[(1.0 / a), $MachinePrecision] - N[(b / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b / N[(N[(a / x), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 7e-5], N[(N[(N[(a - N[(N[(a / x), $MachinePrecision] * N[(x * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a * N[(a / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(y * N[(a + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2 \cdot 10^{-12}:\\
\;\;\;\;\frac{x \cdot \left(\frac{1}{a} - \frac{b}{a}\right) + \frac{b}{\frac{\frac{a}{x}}{b}}}{y}\\
\mathbf{elif}\;b \leq 7 \cdot 10^{-5}:\\
\;\;\;\;\frac{\frac{a - \frac{a}{x} \cdot \left(x \cdot b\right)}{a \cdot \frac{a}{x}}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a + a \cdot b\right)}\\
\end{array}
\end{array}
if b < -1.99999999999999996e-12Initial program 100.0%
Taylor expanded in t around 0 92.5%
+-commutative92.5%
mul-1-neg92.5%
unsub-neg92.5%
Simplified92.5%
Taylor expanded in y around 0 79.3%
exp-neg79.3%
associate-*r/79.3%
*-rgt-identity79.3%
+-commutative79.3%
exp-sum79.3%
rem-exp-log79.3%
Simplified79.3%
Taylor expanded in b around 0 13.5%
Taylor expanded in b around 0 66.3%
associate-+r+66.3%
associate-/l*66.3%
associate-/r/67.8%
associate-*r*67.8%
*-lft-identity67.8%
associate-*l/67.8%
distribute-rgt-in67.8%
+-commutative67.8%
mul-1-neg67.8%
unsub-neg67.8%
associate-/l*55.7%
unpow255.7%
associate-/l*57.5%
Simplified57.5%
if -1.99999999999999996e-12 < b < 6.9999999999999994e-5Initial program 97.0%
Taylor expanded in t around 0 77.3%
+-commutative77.3%
mul-1-neg77.3%
unsub-neg77.3%
Simplified77.3%
Taylor expanded in y around 0 35.1%
exp-neg35.1%
associate-*r/35.1%
*-rgt-identity35.1%
+-commutative35.1%
exp-sum35.1%
rem-exp-log36.1%
Simplified36.1%
Taylor expanded in b around 0 36.1%
+-commutative36.1%
clear-num36.1%
associate-*r/36.1%
frac-add43.7%
*-un-lft-identity43.7%
*-commutative43.7%
Applied egg-rr43.7%
if 6.9999999999999994e-5 < b Initial program 100.0%
Taylor expanded in t around 0 86.8%
+-commutative86.8%
mul-1-neg86.8%
unsub-neg86.8%
Simplified86.8%
Taylor expanded in y around 0 76.5%
exp-neg76.5%
associate-*r/76.5%
*-rgt-identity76.5%
+-commutative76.5%
exp-sum76.5%
rem-exp-log76.5%
Simplified76.5%
Taylor expanded in b around 0 30.3%
Taylor expanded in x around 0 31.8%
Final simplification44.2%
(FPCore (x y z t a b) :precision binary64 (if (<= b 8.6e-167) (/ (+ (* x (- (/ 1.0 a) (/ b a))) (/ b (/ (/ a x) b))) y) (/ x (* y (+ a (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 8.6e-167) {
tmp = ((x * ((1.0 / a) - (b / a))) + (b / ((a / x) / b))) / y;
} else {
tmp = x / (y * (a + (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 <= 8.6d-167) then
tmp = ((x * ((1.0d0 / a) - (b / a))) + (b / ((a / x) / b))) / y
else
tmp = x / (y * (a + (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 <= 8.6e-167) {
tmp = ((x * ((1.0 / a) - (b / a))) + (b / ((a / x) / b))) / y;
} else {
tmp = x / (y * (a + (a * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 8.6e-167: tmp = ((x * ((1.0 / a) - (b / a))) + (b / ((a / x) / b))) / y else: tmp = x / (y * (a + (a * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 8.6e-167) tmp = Float64(Float64(Float64(x * Float64(Float64(1.0 / a) - Float64(b / a))) + Float64(b / Float64(Float64(a / x) / b))) / y); else tmp = Float64(x / Float64(y * Float64(a + Float64(a * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= 8.6e-167) tmp = ((x * ((1.0 / a) - (b / a))) + (b / ((a / x) / b))) / y; else tmp = x / (y * (a + (a * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 8.6e-167], N[(N[(N[(x * N[(N[(1.0 / a), $MachinePrecision] - N[(b / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b / N[(N[(a / x), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(y * N[(a + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 8.6 \cdot 10^{-167}:\\
\;\;\;\;\frac{x \cdot \left(\frac{1}{a} - \frac{b}{a}\right) + \frac{b}{\frac{\frac{a}{x}}{b}}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a + a \cdot b\right)}\\
\end{array}
\end{array}
if b < 8.5999999999999995e-167Initial program 97.8%
Taylor expanded in t around 0 84.3%
+-commutative84.3%
mul-1-neg84.3%
unsub-neg84.3%
Simplified84.3%
Taylor expanded in y around 0 55.0%
exp-neg55.0%
associate-*r/55.0%
*-rgt-identity55.0%
+-commutative55.0%
exp-sum55.0%
rem-exp-log55.6%
Simplified55.6%
Taylor expanded in b around 0 26.8%
Taylor expanded in b around 0 50.0%
associate-+r+50.0%
associate-/l*48.6%
associate-/r/50.6%
associate-*r*50.6%
*-lft-identity50.6%
associate-*l/50.6%
distribute-rgt-in50.6%
+-commutative50.6%
mul-1-neg50.6%
unsub-neg50.6%
associate-/l*41.2%
unpow241.2%
associate-/l*46.1%
Simplified46.1%
if 8.5999999999999995e-167 < b Initial program 99.7%
Taylor expanded in t around 0 82.8%
+-commutative82.8%
mul-1-neg82.8%
unsub-neg82.8%
Simplified82.8%
Taylor expanded in y around 0 60.7%
exp-neg60.7%
associate-*r/60.7%
*-rgt-identity60.7%
+-commutative60.7%
exp-sum60.7%
rem-exp-log61.0%
Simplified61.0%
Taylor expanded in b around 0 31.5%
Taylor expanded in x around 0 33.4%
Final simplification40.9%
(FPCore (x y z t a b) :precision binary64 (if (<= b -0.115) (* (/ b a) (/ (- x) y)) (if (<= b 1.55e-5) (/ (/ 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 <= -0.115) {
tmp = (b / a) * (-x / y);
} else if (b <= 1.55e-5) {
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 <= (-0.115d0)) then
tmp = (b / a) * (-x / y)
else if (b <= 1.55d-5) 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 <= -0.115) {
tmp = (b / a) * (-x / y);
} else if (b <= 1.55e-5) {
tmp = (x / a) / y;
} else {
tmp = x / (a * (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -0.115: tmp = (b / a) * (-x / y) elif b <= 1.55e-5: 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 <= -0.115) tmp = Float64(Float64(b / a) * Float64(Float64(-x) / y)); elseif (b <= 1.55e-5) 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 <= -0.115) tmp = (b / a) * (-x / y); elseif (b <= 1.55e-5) 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, -0.115], N[(N[(b / a), $MachinePrecision] * N[((-x) / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.55e-5], 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 -0.115:\\
\;\;\;\;\frac{b}{a} \cdot \frac{-x}{y}\\
\mathbf{elif}\;b \leq 1.55 \cdot 10^{-5}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot b\right)}\\
\end{array}
\end{array}
if b < -0.115000000000000005Initial program 100.0%
Taylor expanded in t around 0 93.8%
+-commutative93.8%
mul-1-neg93.8%
unsub-neg93.8%
Simplified93.8%
Taylor expanded in y around 0 80.1%
exp-neg80.1%
associate-*r/80.1%
*-rgt-identity80.1%
+-commutative80.1%
exp-sum80.1%
rem-exp-log80.1%
Simplified80.1%
Taylor expanded in b around 0 45.7%
Taylor expanded in b around inf 40.4%
mul-1-neg40.4%
times-frac40.5%
distribute-rgt-neg-in40.5%
Simplified40.5%
if -0.115000000000000005 < b < 1.55000000000000007e-5Initial program 97.1%
Taylor expanded in t around 0 76.9%
+-commutative76.9%
mul-1-neg76.9%
unsub-neg76.9%
Simplified76.9%
Taylor expanded in y around 0 35.4%
exp-neg35.4%
associate-*r/35.4%
*-rgt-identity35.4%
+-commutative35.4%
exp-sum35.4%
rem-exp-log36.4%
Simplified36.4%
Taylor expanded in b around 0 36.4%
if 1.55000000000000007e-5 < b Initial program 100.0%
Taylor expanded in t around 0 86.8%
+-commutative86.8%
mul-1-neg86.8%
unsub-neg86.8%
Simplified86.8%
Taylor expanded in y around 0 76.5%
exp-neg76.5%
associate-*r/76.5%
*-rgt-identity76.5%
+-commutative76.5%
exp-sum76.5%
rem-exp-log76.5%
Simplified76.5%
Taylor expanded in b around 0 30.3%
Taylor expanded in b around inf 31.8%
Final simplification36.2%
(FPCore (x y z t a b) :precision binary64 (if (<= b -0.11) (/ (* (/ b a) (- x)) y) (if (<= b 8.5e-5) (/ (/ 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 <= -0.11) {
tmp = ((b / a) * -x) / y;
} else if (b <= 8.5e-5) {
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 <= (-0.11d0)) then
tmp = ((b / a) * -x) / y
else if (b <= 8.5d-5) 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 <= -0.11) {
tmp = ((b / a) * -x) / y;
} else if (b <= 8.5e-5) {
tmp = (x / a) / y;
} else {
tmp = x / (a * (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -0.11: tmp = ((b / a) * -x) / y elif b <= 8.5e-5: 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 <= -0.11) tmp = Float64(Float64(Float64(b / a) * Float64(-x)) / y); elseif (b <= 8.5e-5) 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 <= -0.11) tmp = ((b / a) * -x) / y; elseif (b <= 8.5e-5) 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, -0.11], N[(N[(N[(b / a), $MachinePrecision] * (-x)), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 8.5e-5], 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 -0.11:\\
\;\;\;\;\frac{\frac{b}{a} \cdot \left(-x\right)}{y}\\
\mathbf{elif}\;b \leq 8.5 \cdot 10^{-5}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot b\right)}\\
\end{array}
\end{array}
if b < -0.110000000000000001Initial program 100.0%
Taylor expanded in t around 0 93.8%
+-commutative93.8%
mul-1-neg93.8%
unsub-neg93.8%
Simplified93.8%
Taylor expanded in y around 0 80.1%
exp-neg80.1%
associate-*r/80.1%
*-rgt-identity80.1%
+-commutative80.1%
exp-sum80.1%
rem-exp-log80.1%
Simplified80.1%
Taylor expanded in b around 0 45.7%
Taylor expanded in b around inf 45.7%
associate-/l*41.1%
associate-/r/47.1%
associate-*r*47.1%
*-commutative47.1%
associate-*r/47.1%
mul-1-neg47.1%
Simplified47.1%
if -0.110000000000000001 < b < 8.500000000000001e-5Initial program 97.1%
Taylor expanded in t around 0 76.9%
+-commutative76.9%
mul-1-neg76.9%
unsub-neg76.9%
Simplified76.9%
Taylor expanded in y around 0 35.4%
exp-neg35.4%
associate-*r/35.4%
*-rgt-identity35.4%
+-commutative35.4%
exp-sum35.4%
rem-exp-log36.4%
Simplified36.4%
Taylor expanded in b around 0 36.4%
if 8.500000000000001e-5 < b Initial program 100.0%
Taylor expanded in t around 0 86.8%
+-commutative86.8%
mul-1-neg86.8%
unsub-neg86.8%
Simplified86.8%
Taylor expanded in y around 0 76.5%
exp-neg76.5%
associate-*r/76.5%
*-rgt-identity76.5%
+-commutative76.5%
exp-sum76.5%
rem-exp-log76.5%
Simplified76.5%
Taylor expanded in b around 0 30.3%
Taylor expanded in b around inf 31.8%
Final simplification37.9%
(FPCore (x y z t a b) :precision binary64 (if (<= b -0.0031) (/ (* (/ b a) (- x)) y) (/ x (* y (+ a (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -0.0031) {
tmp = ((b / a) * -x) / y;
} else {
tmp = x / (y * (a + (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 <= (-0.0031d0)) then
tmp = ((b / a) * -x) / y
else
tmp = x / (y * (a + (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 <= -0.0031) {
tmp = ((b / a) * -x) / y;
} else {
tmp = x / (y * (a + (a * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -0.0031: tmp = ((b / a) * -x) / y else: tmp = x / (y * (a + (a * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -0.0031) tmp = Float64(Float64(Float64(b / a) * Float64(-x)) / y); else tmp = Float64(x / Float64(y * Float64(a + Float64(a * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -0.0031) tmp = ((b / a) * -x) / y; else tmp = x / (y * (a + (a * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -0.0031], N[(N[(N[(b / a), $MachinePrecision] * (-x)), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(y * N[(a + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -0.0031:\\
\;\;\;\;\frac{\frac{b}{a} \cdot \left(-x\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a + a \cdot b\right)}\\
\end{array}
\end{array}
if b < -0.00309999999999999989Initial program 100.0%
Taylor expanded in t around 0 93.8%
+-commutative93.8%
mul-1-neg93.8%
unsub-neg93.8%
Simplified93.8%
Taylor expanded in y around 0 80.1%
exp-neg80.1%
associate-*r/80.1%
*-rgt-identity80.1%
+-commutative80.1%
exp-sum80.1%
rem-exp-log80.1%
Simplified80.1%
Taylor expanded in b around 0 45.7%
Taylor expanded in b around inf 45.7%
associate-/l*41.1%
associate-/r/47.1%
associate-*r*47.1%
*-commutative47.1%
associate-*r/47.1%
mul-1-neg47.1%
Simplified47.1%
if -0.00309999999999999989 < b Initial program 98.1%
Taylor expanded in t around 0 80.3%
+-commutative80.3%
mul-1-neg80.3%
unsub-neg80.3%
Simplified80.3%
Taylor expanded in y around 0 49.7%
exp-neg49.7%
associate-*r/49.7%
*-rgt-identity49.7%
+-commutative49.7%
exp-sum49.7%
rem-exp-log50.4%
Simplified50.4%
Taylor expanded in b around 0 34.3%
Taylor expanded in x around 0 33.7%
Final simplification37.1%
(FPCore (x y z t a b) :precision binary64 (if (<= b -0.125) (/ (* (/ b a) (- x)) y) (/ (/ x (+ a (* a b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -0.125) {
tmp = ((b / a) * -x) / 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 <= (-0.125d0)) then
tmp = ((b / a) * -x) / 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 <= -0.125) {
tmp = ((b / a) * -x) / y;
} else {
tmp = (x / (a + (a * b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -0.125: tmp = ((b / a) * -x) / y else: tmp = (x / (a + (a * b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -0.125) tmp = Float64(Float64(Float64(b / a) * Float64(-x)) / 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 <= -0.125) tmp = ((b / a) * -x) / y; else tmp = (x / (a + (a * b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -0.125], N[(N[(N[(b / a), $MachinePrecision] * (-x)), $MachinePrecision] / y), $MachinePrecision], N[(N[(x / N[(a + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -0.125:\\
\;\;\;\;\frac{\frac{b}{a} \cdot \left(-x\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a + a \cdot b}}{y}\\
\end{array}
\end{array}
if b < -0.125Initial program 100.0%
Taylor expanded in t around 0 93.8%
+-commutative93.8%
mul-1-neg93.8%
unsub-neg93.8%
Simplified93.8%
Taylor expanded in y around 0 80.1%
exp-neg80.1%
associate-*r/80.1%
*-rgt-identity80.1%
+-commutative80.1%
exp-sum80.1%
rem-exp-log80.1%
Simplified80.1%
Taylor expanded in b around 0 45.7%
Taylor expanded in b around inf 45.7%
associate-/l*41.1%
associate-/r/47.1%
associate-*r*47.1%
*-commutative47.1%
associate-*r/47.1%
mul-1-neg47.1%
Simplified47.1%
if -0.125 < b Initial program 98.1%
Taylor expanded in t around 0 80.3%
+-commutative80.3%
mul-1-neg80.3%
unsub-neg80.3%
Simplified80.3%
Taylor expanded in y around 0 49.7%
exp-neg49.7%
associate-*r/49.7%
*-rgt-identity49.7%
+-commutative49.7%
exp-sum49.7%
rem-exp-log50.4%
Simplified50.4%
Taylor expanded in b around 0 34.3%
Final simplification37.5%
(FPCore (x y z t a b) :precision binary64 (if (<= b 5e-171) (/ (/ (- x (* x b)) a) y) (/ x (* y (+ a (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 5e-171) {
tmp = ((x - (x * b)) / a) / y;
} else {
tmp = x / (y * (a + (a * b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= 5d-171) then
tmp = ((x - (x * b)) / a) / y
else
tmp = x / (y * (a + (a * b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 5e-171) {
tmp = ((x - (x * b)) / a) / y;
} else {
tmp = x / (y * (a + (a * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 5e-171: tmp = ((x - (x * b)) / a) / y else: tmp = x / (y * (a + (a * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 5e-171) tmp = Float64(Float64(Float64(x - Float64(x * b)) / a) / y); else tmp = Float64(x / Float64(y * Float64(a + Float64(a * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= 5e-171) tmp = ((x - (x * b)) / a) / y; else tmp = x / (y * (a + (a * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 5e-171], N[(N[(N[(x - N[(x * b), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(y * N[(a + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 5 \cdot 10^{-171}:\\
\;\;\;\;\frac{\frac{x - x \cdot b}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a + a \cdot b\right)}\\
\end{array}
\end{array}
if b < 4.99999999999999992e-171Initial program 97.8%
Taylor expanded in t around 0 84.3%
+-commutative84.3%
mul-1-neg84.3%
unsub-neg84.3%
Simplified84.3%
Taylor expanded in y around 0 55.0%
exp-neg55.0%
associate-*r/55.0%
*-rgt-identity55.0%
+-commutative55.0%
exp-sum55.0%
rem-exp-log55.6%
Simplified55.6%
Taylor expanded in b around 0 41.0%
Taylor expanded in a around 0 41.0%
mul-1-neg41.0%
*-commutative41.0%
unsub-neg41.0%
Simplified41.0%
if 4.99999999999999992e-171 < b Initial program 99.7%
Taylor expanded in t around 0 82.8%
+-commutative82.8%
mul-1-neg82.8%
unsub-neg82.8%
Simplified82.8%
Taylor expanded in y around 0 60.7%
exp-neg60.7%
associate-*r/60.7%
*-rgt-identity60.7%
+-commutative60.7%
exp-sum60.7%
rem-exp-log61.0%
Simplified61.0%
Taylor expanded in b around 0 31.5%
Taylor expanded in x around 0 33.4%
Final simplification37.9%
(FPCore (x y z t a b) :precision binary64 (if (<= b 2.6e+86) (/ x (* y a)) (/ x (* a (* y b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 2.6e+86) {
tmp = x / (y * a);
} else {
tmp = x / (a * (y * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= 2.6d+86) then
tmp = x / (y * a)
else
tmp = x / (a * (y * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 2.6e+86) {
tmp = x / (y * a);
} else {
tmp = x / (a * (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 2.6e+86: tmp = x / (y * a) else: tmp = x / (a * (y * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 2.6e+86) tmp = Float64(x / Float64(y * a)); else tmp = Float64(x / Float64(a * Float64(y * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= 2.6e+86) tmp = x / (y * a); else tmp = x / (a * (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 2.6e+86], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 2.6 \cdot 10^{+86}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot b\right)}\\
\end{array}
\end{array}
if b < 2.5999999999999998e86Initial program 98.3%
associate-*l/86.9%
*-commutative86.9%
+-commutative86.9%
associate--l+86.9%
exp-sum68.8%
*-commutative68.8%
exp-to-pow69.4%
sub-neg69.4%
metadata-eval69.4%
exp-diff62.7%
*-commutative62.7%
exp-to-pow62.7%
Simplified62.7%
Taylor expanded in t around 0 68.9%
times-frac66.0%
Simplified66.0%
Taylor expanded in y around 0 51.4%
Taylor expanded in b around 0 32.1%
if 2.5999999999999998e86 < b Initial program 100.0%
Taylor expanded in t around 0 89.3%
+-commutative89.3%
mul-1-neg89.3%
unsub-neg89.3%
Simplified89.3%
Taylor expanded in y around 0 82.9%
exp-neg82.9%
associate-*r/82.9%
*-rgt-identity82.9%
+-commutative82.9%
exp-sum82.9%
rem-exp-log82.9%
Simplified82.9%
Taylor expanded in b around 0 30.3%
Taylor expanded in b around inf 34.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 98.6%
associate-*l/86.1%
*-commutative86.1%
+-commutative86.1%
associate--l+86.1%
exp-sum68.2%
*-commutative68.2%
exp-to-pow68.6%
sub-neg68.6%
metadata-eval68.6%
exp-diff61.2%
*-commutative61.2%
exp-to-pow61.2%
Simplified61.2%
Taylor expanded in t around 0 69.8%
times-frac65.5%
Simplified65.5%
Taylor expanded in y around 0 57.0%
Taylor expanded in b around 0 29.0%
Final simplification29.0%
(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 2023271
(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))