
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x * exp((((y * log(z)) + ((t - 1.0d0) * log(a))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x * Math.exp((((y * Math.log(z)) + ((t - 1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + ((t - 1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 21 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x * exp((((y * log(z)) + ((t - 1.0d0) * log(a))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x * Math.exp((((y * Math.log(z)) + ((t - 1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + ((t - 1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\end{array}
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (log a) (- t 1.0))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + (log(a) * (t - 1.0))) - b))) / y;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x * exp((((y * log(z)) + (log(a) * (t - 1.0d0))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x * Math.exp((((y * Math.log(z)) + (Math.log(a) * (t - 1.0))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + (math.log(a) * (t - 1.0))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(log(a) * Float64(t - 1.0))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + (log(a) * (t - 1.0))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[Log[a], $MachinePrecision] * N[(t - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \log a \cdot \left(t - 1\right)\right) - b}}{y}
\end{array}
Initial program 99.0%
Final simplification99.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.85e+65) (not (<= y 0.0017))) (/ (* x (exp (- (- (* y (log z)) (log a)) b))) y) (/ (* x (exp (- (* (log a) (- t 1.0)) b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.85e+65) || !(y <= 0.0017)) {
tmp = (x * exp((((y * log(z)) - log(a)) - b))) / y;
} else {
tmp = (x * exp(((log(a) * (t - 1.0)) - b))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-1.85d+65)) .or. (.not. (y <= 0.0017d0))) then
tmp = (x * exp((((y * log(z)) - log(a)) - b))) / y
else
tmp = (x * exp(((log(a) * (t - 1.0d0)) - b))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.85e+65) || !(y <= 0.0017)) {
tmp = (x * Math.exp((((y * Math.log(z)) - Math.log(a)) - b))) / y;
} else {
tmp = (x * Math.exp(((Math.log(a) * (t - 1.0)) - b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.85e+65) or not (y <= 0.0017): tmp = (x * math.exp((((y * math.log(z)) - math.log(a)) - b))) / y else: tmp = (x * math.exp(((math.log(a) * (t - 1.0)) - b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.85e+65) || !(y <= 0.0017)) tmp = Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) - log(a)) - b))) / y); else tmp = Float64(Float64(x * exp(Float64(Float64(log(a) * Float64(t - 1.0)) - b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.85e+65) || ~((y <= 0.0017))) tmp = (x * exp((((y * log(z)) - log(a)) - b))) / y; else tmp = (x * exp(((log(a) * (t - 1.0)) - b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.85e+65], N[Not[LessEqual[y, 0.0017]], $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[Log[a], $MachinePrecision] * N[(t - 1.0), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.85 \cdot 10^{+65} \lor \neg \left(y \leq 0.0017\right):\\
\;\;\;\;\frac{x \cdot e^{\left(y \cdot \log z - \log a\right) - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\log a \cdot \left(t - 1\right) - b}}{y}\\
\end{array}
\end{array}
if y < -1.84999999999999997e65 or 0.00169999999999999991 < y Initial program 100.0%
Taylor expanded in t around 0 90.7%
mul-1-neg90.7%
Simplified90.7%
if -1.84999999999999997e65 < y < 0.00169999999999999991Initial program 98.1%
Taylor expanded in y around 0 97.4%
Final simplification94.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (/ (pow z y) (* y (* a (exp b))))))
(t_2 (* x (/ (pow a (- t 1.0)) y))))
(if (<= t -9.5e+144)
t_2
(if (<= t -2.5e+71)
t_1
(if (<= t -3e+67)
(/ (- a (* a (/ (* x (/ y x)) (/ y b)))) (/ (* a a) (/ x y)))
(if (<= t -1.35e-6)
(/ (* x (/ (pow z y) a)) y)
(if (<= t 2.65e+19) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * (pow(z, y) / (y * (a * exp(b))));
double t_2 = x * (pow(a, (t - 1.0)) / y);
double tmp;
if (t <= -9.5e+144) {
tmp = t_2;
} else if (t <= -2.5e+71) {
tmp = t_1;
} else if (t <= -3e+67) {
tmp = (a - (a * ((x * (y / x)) / (y / b)))) / ((a * a) / (x / y));
} else if (t <= -1.35e-6) {
tmp = (x * (pow(z, y) / a)) / y;
} else if (t <= 2.65e+19) {
tmp = t_1;
} 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 = x * ((z ** y) / (y * (a * exp(b))))
t_2 = x * ((a ** (t - 1.0d0)) / y)
if (t <= (-9.5d+144)) then
tmp = t_2
else if (t <= (-2.5d+71)) then
tmp = t_1
else if (t <= (-3d+67)) then
tmp = (a - (a * ((x * (y / x)) / (y / b)))) / ((a * a) / (x / y))
else if (t <= (-1.35d-6)) then
tmp = (x * ((z ** y) / a)) / y
else if (t <= 2.65d+19) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * (Math.pow(z, y) / (y * (a * Math.exp(b))));
double t_2 = x * (Math.pow(a, (t - 1.0)) / y);
double tmp;
if (t <= -9.5e+144) {
tmp = t_2;
} else if (t <= -2.5e+71) {
tmp = t_1;
} else if (t <= -3e+67) {
tmp = (a - (a * ((x * (y / x)) / (y / b)))) / ((a * a) / (x / y));
} else if (t <= -1.35e-6) {
tmp = (x * (Math.pow(z, y) / a)) / y;
} else if (t <= 2.65e+19) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * (math.pow(z, y) / (y * (a * math.exp(b)))) t_2 = x * (math.pow(a, (t - 1.0)) / y) tmp = 0 if t <= -9.5e+144: tmp = t_2 elif t <= -2.5e+71: tmp = t_1 elif t <= -3e+67: tmp = (a - (a * ((x * (y / x)) / (y / b)))) / ((a * a) / (x / y)) elif t <= -1.35e-6: tmp = (x * (math.pow(z, y) / a)) / y elif t <= 2.65e+19: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * Float64((z ^ y) / Float64(y * Float64(a * exp(b))))) t_2 = Float64(x * Float64((a ^ Float64(t - 1.0)) / y)) tmp = 0.0 if (t <= -9.5e+144) tmp = t_2; elseif (t <= -2.5e+71) tmp = t_1; elseif (t <= -3e+67) tmp = Float64(Float64(a - Float64(a * Float64(Float64(x * Float64(y / x)) / Float64(y / b)))) / Float64(Float64(a * a) / Float64(x / y))); elseif (t <= -1.35e-6) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y); elseif (t <= 2.65e+19) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * ((z ^ y) / (y * (a * exp(b)))); t_2 = x * ((a ^ (t - 1.0)) / y); tmp = 0.0; if (t <= -9.5e+144) tmp = t_2; elseif (t <= -2.5e+71) tmp = t_1; elseif (t <= -3e+67) tmp = (a - (a * ((x * (y / x)) / (y / b)))) / ((a * a) / (x / y)); elseif (t <= -1.35e-6) tmp = (x * ((z ^ y) / a)) / y; elseif (t <= 2.65e+19) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(N[Power[z, y], $MachinePrecision] / N[(y * N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9.5e+144], t$95$2, If[LessEqual[t, -2.5e+71], t$95$1, If[LessEqual[t, -3e+67], N[(N[(a - N[(a * N[(N[(x * N[(y / x), $MachinePrecision]), $MachinePrecision] / N[(y / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a * a), $MachinePrecision] / N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.35e-6], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 2.65e+19], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{{z}^{y}}{y \cdot \left(a \cdot e^{b}\right)}\\
t_2 := x \cdot \frac{{a}^{\left(t - 1\right)}}{y}\\
\mathbf{if}\;t \leq -9.5 \cdot 10^{+144}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -2.5 \cdot 10^{+71}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -3 \cdot 10^{+67}:\\
\;\;\;\;\frac{a - a \cdot \frac{x \cdot \frac{y}{x}}{\frac{y}{b}}}{\frac{a \cdot a}{\frac{x}{y}}}\\
\mathbf{elif}\;t \leq -1.35 \cdot 10^{-6}:\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{elif}\;t \leq 2.65 \cdot 10^{+19}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -9.50000000000000031e144 or 2.65e19 < t Initial program 100.0%
associate-*l/91.5%
*-commutative91.5%
exp-diff59.6%
exp-sum48.9%
*-commutative48.9%
exp-to-pow48.9%
*-commutative48.9%
exp-to-pow48.9%
Simplified48.9%
Taylor expanded in y around 0 59.7%
associate-/l*58.6%
sub-neg58.6%
metadata-eval58.6%
associate-/l*58.6%
Simplified58.6%
Taylor expanded in b around 0 82.2%
Simplified82.2%
if -9.50000000000000031e144 < t < -2.49999999999999986e71 or -1.34999999999999999e-6 < t < 2.65e19Initial program 98.2%
associate-*r/98.3%
sub-neg98.3%
exp-sum83.3%
associate-/l*83.3%
associate-/r/79.9%
exp-neg79.9%
associate-*r/79.9%
Simplified78.1%
Taylor expanded in t around 0 86.3%
associate-*r*80.8%
*-commutative80.8%
associate-*r*86.3%
Simplified86.3%
if -2.49999999999999986e71 < t < -3.0000000000000001e67Initial program 100.0%
associate-*r/100.0%
sub-neg100.0%
exp-sum100.0%
associate-/l*100.0%
associate-/r/100.0%
exp-neg100.0%
associate-*r/100.0%
Simplified100.0%
Taylor expanded in t around 0 3.4%
associate-*r*3.4%
*-commutative3.4%
associate-*r*3.4%
Simplified3.4%
Taylor expanded in y around 0 3.4%
Taylor expanded in b around 0 3.4%
mul-1-neg3.4%
unsub-neg3.4%
associate-/r*3.4%
*-commutative3.4%
*-commutative3.4%
times-frac3.4%
Simplified3.4%
associate-/l/3.4%
clear-num3.4%
associate-*l/3.4%
frac-sub3.4%
*-un-lft-identity3.4%
*-commutative3.4%
*-un-lft-identity3.4%
times-frac3.4%
/-rgt-identity3.4%
clear-num3.4%
un-div-inv3.4%
*-commutative3.4%
*-un-lft-identity3.4%
times-frac3.4%
/-rgt-identity3.4%
Applied egg-rr3.4%
associate-*l*3.4%
associate-*r/3.4%
/-rgt-identity3.4%
associate-/l*3.4%
associate-*l/100.0%
associate-/r/100.0%
associate-*l/100.0%
*-lft-identity100.0%
Simplified100.0%
if -3.0000000000000001e67 < t < -1.34999999999999999e-6Initial program 100.0%
Taylor expanded in t around 0 79.2%
mul-1-neg79.2%
Simplified79.2%
Taylor expanded in b around 0 72.2%
div-exp72.2%
*-commutative72.2%
exp-to-pow72.2%
rem-exp-log72.2%
Simplified72.2%
Final simplification84.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -3e+133) (not (<= y 0.0017))) (/ (* x (/ (pow z y) a)) y) (/ (* x (exp (- (* (log a) (- t 1.0)) b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3e+133) || !(y <= 0.0017)) {
tmp = (x * (pow(z, y) / a)) / y;
} else {
tmp = (x * exp(((log(a) * (t - 1.0)) - b))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-3d+133)) .or. (.not. (y <= 0.0017d0))) then
tmp = (x * ((z ** y) / a)) / y
else
tmp = (x * exp(((log(a) * (t - 1.0d0)) - b))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3e+133) || !(y <= 0.0017)) {
tmp = (x * (Math.pow(z, y) / a)) / y;
} else {
tmp = (x * Math.exp(((Math.log(a) * (t - 1.0)) - b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -3e+133) or not (y <= 0.0017): tmp = (x * (math.pow(z, y) / a)) / y else: tmp = (x * math.exp(((math.log(a) * (t - 1.0)) - b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -3e+133) || !(y <= 0.0017)) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y); else tmp = Float64(Float64(x * exp(Float64(Float64(log(a) * Float64(t - 1.0)) - b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -3e+133) || ~((y <= 0.0017))) tmp = (x * ((z ^ y) / a)) / y; else tmp = (x * exp(((log(a) * (t - 1.0)) - b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -3e+133], N[Not[LessEqual[y, 0.0017]], $MachinePrecision]], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[Exp[N[(N[(N[Log[a], $MachinePrecision] * N[(t - 1.0), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3 \cdot 10^{+133} \lor \neg \left(y \leq 0.0017\right):\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\log a \cdot \left(t - 1\right) - b}}{y}\\
\end{array}
\end{array}
if y < -3.00000000000000007e133 or 0.00169999999999999991 < y Initial program 100.0%
Taylor expanded in t around 0 91.6%
mul-1-neg91.6%
Simplified91.6%
Taylor expanded in b around 0 87.0%
div-exp87.0%
*-commutative87.0%
exp-to-pow87.0%
rem-exp-log87.0%
Simplified87.0%
if -3.00000000000000007e133 < y < 0.00169999999999999991Initial program 98.2%
Taylor expanded in y around 0 95.0%
Final simplification91.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1.32e+144) (not (<= t 2.3e+20))) (* x (/ (pow a (- t 1.0)) y)) (* (/ (pow z y) y) (/ x (* a (exp b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.32e+144) || !(t <= 2.3e+20)) {
tmp = x * (pow(a, (t - 1.0)) / y);
} else {
tmp = (pow(z, y) / y) * (x / (a * exp(b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-1.32d+144)) .or. (.not. (t <= 2.3d+20))) then
tmp = x * ((a ** (t - 1.0d0)) / y)
else
tmp = ((z ** y) / y) * (x / (a * exp(b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.32e+144) || !(t <= 2.3e+20)) {
tmp = x * (Math.pow(a, (t - 1.0)) / y);
} else {
tmp = (Math.pow(z, y) / y) * (x / (a * Math.exp(b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.32e+144) or not (t <= 2.3e+20): tmp = x * (math.pow(a, (t - 1.0)) / y) else: tmp = (math.pow(z, y) / y) * (x / (a * math.exp(b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1.32e+144) || !(t <= 2.3e+20)) tmp = Float64(x * Float64((a ^ Float64(t - 1.0)) / y)); else tmp = Float64(Float64((z ^ y) / y) * Float64(x / Float64(a * exp(b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -1.32e+144) || ~((t <= 2.3e+20))) tmp = x * ((a ^ (t - 1.0)) / y); else tmp = ((z ^ y) / y) * (x / (a * exp(b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1.32e+144], N[Not[LessEqual[t, 2.3e+20]], $MachinePrecision]], N[(x * N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[z, y], $MachinePrecision] / y), $MachinePrecision] * N[(x / N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.32 \cdot 10^{+144} \lor \neg \left(t \leq 2.3 \cdot 10^{+20}\right):\\
\;\;\;\;x \cdot \frac{{a}^{\left(t - 1\right)}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{{z}^{y}}{y} \cdot \frac{x}{a \cdot e^{b}}\\
\end{array}
\end{array}
if t < -1.32e144 or 2.3e20 < t Initial program 100.0%
associate-*l/91.5%
*-commutative91.5%
exp-diff59.6%
exp-sum48.9%
*-commutative48.9%
exp-to-pow48.9%
*-commutative48.9%
exp-to-pow48.9%
Simplified48.9%
Taylor expanded in y around 0 59.7%
associate-/l*58.6%
sub-neg58.6%
metadata-eval58.6%
associate-/l*58.6%
Simplified58.6%
Taylor expanded in b around 0 82.2%
Simplified82.2%
if -1.32e144 < t < 2.3e20Initial program 98.4%
associate-*r/98.5%
sub-neg98.5%
exp-sum83.7%
associate-/l*83.7%
associate-/r/80.6%
exp-neg80.6%
associate-*r/80.6%
Simplified75.3%
Taylor expanded in t around 0 82.4%
times-frac83.2%
Simplified83.2%
Final simplification82.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -52.0) (not (<= y 2.1e-17))) (/ (* x (/ (pow z y) a)) y) (/ (* x (pow a t)) (* y (* a (exp b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -52.0) || !(y <= 2.1e-17)) {
tmp = (x * (pow(z, y) / a)) / y;
} else {
tmp = (x * pow(a, t)) / (y * (a * exp(b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-52.0d0)) .or. (.not. (y <= 2.1d-17))) then
tmp = (x * ((z ** y) / a)) / y
else
tmp = (x * (a ** t)) / (y * (a * exp(b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -52.0) || !(y <= 2.1e-17)) {
tmp = (x * (Math.pow(z, y) / a)) / y;
} else {
tmp = (x * Math.pow(a, t)) / (y * (a * Math.exp(b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -52.0) or not (y <= 2.1e-17): tmp = (x * (math.pow(z, y) / a)) / y else: tmp = (x * math.pow(a, t)) / (y * (a * math.exp(b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -52.0) || !(y <= 2.1e-17)) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y); else tmp = Float64(Float64(x * (a ^ t)) / Float64(y * Float64(a * exp(b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -52.0) || ~((y <= 2.1e-17))) tmp = (x * ((z ^ y) / a)) / y; else tmp = (x * (a ^ t)) / (y * (a * exp(b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -52.0], N[Not[LessEqual[y, 2.1e-17]], $MachinePrecision]], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[Power[a, t], $MachinePrecision]), $MachinePrecision] / N[(y * N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -52 \lor \neg \left(y \leq 2.1 \cdot 10^{-17}\right):\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot {a}^{t}}{y \cdot \left(a \cdot e^{b}\right)}\\
\end{array}
\end{array}
if y < -52 or 2.09999999999999992e-17 < y Initial program 100.0%
Taylor expanded in t around 0 88.2%
mul-1-neg88.2%
Simplified88.2%
Taylor expanded in b around 0 84.3%
div-exp84.3%
*-commutative84.3%
exp-to-pow84.3%
rem-exp-log84.4%
Simplified84.4%
if -52 < y < 2.09999999999999992e-17Initial program 98.0%
associate-*r/98.2%
sub-neg98.2%
exp-sum85.1%
associate-/l*85.1%
associate-/r/81.3%
exp-neg81.3%
associate-*r/81.3%
Simplified82.3%
Taylor expanded in y around 0 83.9%
Final simplification84.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -13500.0) (not (<= y 2.1e-17))) (/ (* x (/ (pow z y) a)) y) (/ (pow a (- t 1.0)) (/ y (/ x (exp b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -13500.0) || !(y <= 2.1e-17)) {
tmp = (x * (pow(z, y) / a)) / y;
} else {
tmp = pow(a, (t - 1.0)) / (y / (x / 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 <= (-13500.0d0)) .or. (.not. (y <= 2.1d-17))) then
tmp = (x * ((z ** y) / a)) / y
else
tmp = (a ** (t - 1.0d0)) / (y / (x / 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 <= -13500.0) || !(y <= 2.1e-17)) {
tmp = (x * (Math.pow(z, y) / a)) / y;
} else {
tmp = Math.pow(a, (t - 1.0)) / (y / (x / Math.exp(b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -13500.0) or not (y <= 2.1e-17): tmp = (x * (math.pow(z, y) / a)) / y else: tmp = math.pow(a, (t - 1.0)) / (y / (x / math.exp(b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -13500.0) || !(y <= 2.1e-17)) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y); else tmp = Float64((a ^ Float64(t - 1.0)) / Float64(y / Float64(x / exp(b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -13500.0) || ~((y <= 2.1e-17))) tmp = (x * ((z ^ y) / a)) / y; else tmp = (a ^ (t - 1.0)) / (y / (x / exp(b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -13500.0], N[Not[LessEqual[y, 2.1e-17]], $MachinePrecision]], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] / N[(y / N[(x / N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -13500 \lor \neg \left(y \leq 2.1 \cdot 10^{-17}\right):\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{{a}^{\left(t - 1\right)}}{\frac{y}{\frac{x}{e^{b}}}}\\
\end{array}
\end{array}
if y < -13500 or 2.09999999999999992e-17 < y Initial program 100.0%
Taylor expanded in t around 0 88.2%
mul-1-neg88.2%
Simplified88.2%
Taylor expanded in b around 0 84.3%
div-exp84.3%
*-commutative84.3%
exp-to-pow84.3%
rem-exp-log84.4%
Simplified84.4%
if -13500 < y < 2.09999999999999992e-17Initial program 98.0%
associate-*l/90.6%
*-commutative90.6%
exp-diff78.3%
exp-sum78.3%
*-commutative78.3%
exp-to-pow78.3%
*-commutative78.3%
exp-to-pow79.3%
Simplified79.3%
Taylor expanded in y around 0 81.3%
associate-/l*84.6%
sub-neg84.6%
metadata-eval84.6%
associate-/l*84.6%
Simplified84.6%
Final simplification84.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (/ (pow a (- t 1.0)) y)))
(t_2 (/ (* x (/ (pow z y) a)) y))
(t_3 (/ (/ x (* a (exp b))) y)))
(if (<= y -1800.0)
t_2
(if (<= y -2.2e-249)
t_1
(if (<= y 3.5e-150)
t_3
(if (<= y 1e-67) t_1 (if (<= y 6.7e-18) t_3 t_2)))))))
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 t_2 = (x * (pow(z, y) / a)) / y;
double t_3 = (x / (a * exp(b))) / y;
double tmp;
if (y <= -1800.0) {
tmp = t_2;
} else if (y <= -2.2e-249) {
tmp = t_1;
} else if (y <= 3.5e-150) {
tmp = t_3;
} else if (y <= 1e-67) {
tmp = t_1;
} else if (y <= 6.7e-18) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = x * ((a ** (t - 1.0d0)) / y)
t_2 = (x * ((z ** y) / a)) / y
t_3 = (x / (a * exp(b))) / y
if (y <= (-1800.0d0)) then
tmp = t_2
else if (y <= (-2.2d-249)) then
tmp = t_1
else if (y <= 3.5d-150) then
tmp = t_3
else if (y <= 1d-67) then
tmp = t_1
else if (y <= 6.7d-18) then
tmp = t_3
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * (Math.pow(a, (t - 1.0)) / y);
double t_2 = (x * (Math.pow(z, y) / a)) / y;
double t_3 = (x / (a * Math.exp(b))) / y;
double tmp;
if (y <= -1800.0) {
tmp = t_2;
} else if (y <= -2.2e-249) {
tmp = t_1;
} else if (y <= 3.5e-150) {
tmp = t_3;
} else if (y <= 1e-67) {
tmp = t_1;
} else if (y <= 6.7e-18) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * (math.pow(a, (t - 1.0)) / y) t_2 = (x * (math.pow(z, y) / a)) / y t_3 = (x / (a * math.exp(b))) / y tmp = 0 if y <= -1800.0: tmp = t_2 elif y <= -2.2e-249: tmp = t_1 elif y <= 3.5e-150: tmp = t_3 elif y <= 1e-67: tmp = t_1 elif y <= 6.7e-18: tmp = t_3 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * Float64((a ^ Float64(t - 1.0)) / y)) t_2 = Float64(Float64(x * Float64((z ^ y) / a)) / y) t_3 = Float64(Float64(x / Float64(a * exp(b))) / y) tmp = 0.0 if (y <= -1800.0) tmp = t_2; elseif (y <= -2.2e-249) tmp = t_1; elseif (y <= 3.5e-150) tmp = t_3; elseif (y <= 1e-67) tmp = t_1; elseif (y <= 6.7e-18) tmp = t_3; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * ((a ^ (t - 1.0)) / y); t_2 = (x * ((z ^ y) / a)) / y; t_3 = (x / (a * exp(b))) / y; tmp = 0.0; if (y <= -1800.0) tmp = t_2; elseif (y <= -2.2e-249) tmp = t_1; elseif (y <= 3.5e-150) tmp = t_3; elseif (y <= 1e-67) tmp = t_1; elseif (y <= 6.7e-18) tmp = t_3; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x / N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -1800.0], t$95$2, If[LessEqual[y, -2.2e-249], t$95$1, If[LessEqual[y, 3.5e-150], t$95$3, If[LessEqual[y, 1e-67], t$95$1, If[LessEqual[y, 6.7e-18], t$95$3, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{{a}^{\left(t - 1\right)}}{y}\\
t_2 := \frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
t_3 := \frac{\frac{x}{a \cdot e^{b}}}{y}\\
\mathbf{if}\;y \leq -1800:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -2.2 \cdot 10^{-249}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{-150}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y \leq 10^{-67}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 6.7 \cdot 10^{-18}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -1800 or 6.6999999999999998e-18 < y Initial program 100.0%
Taylor expanded in t around 0 87.6%
mul-1-neg87.6%
Simplified87.6%
Taylor expanded in b around 0 83.7%
div-exp83.7%
*-commutative83.7%
exp-to-pow83.7%
rem-exp-log83.7%
Simplified83.7%
if -1800 < y < -2.2e-249 or 3.4999999999999998e-150 < y < 9.99999999999999943e-68Initial program 97.5%
associate-*l/90.6%
*-commutative90.6%
exp-diff79.1%
exp-sum79.1%
*-commutative79.1%
exp-to-pow79.1%
*-commutative79.1%
exp-to-pow80.0%
Simplified80.0%
Taylor expanded in y around 0 82.5%
associate-/l*84.3%
sub-neg84.3%
metadata-eval84.3%
associate-/l*84.3%
Simplified84.3%
Taylor expanded in b around 0 81.5%
Simplified83.2%
if -2.2e-249 < y < 3.4999999999999998e-150 or 9.99999999999999943e-68 < y < 6.6999999999999998e-18Initial program 98.6%
Taylor expanded in t around 0 83.7%
mul-1-neg83.7%
Simplified83.7%
Taylor expanded in y around 0 83.7%
exp-neg83.7%
associate-*l/83.7%
*-lft-identity83.7%
+-commutative83.7%
exp-sum83.7%
rem-exp-log85.0%
Simplified85.0%
Final simplification83.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -45000000000.0) (not (<= t 1.95e+17))) (* x (/ (pow a (- t 1.0)) y)) (/ x (* y (* a (exp b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -45000000000.0) || !(t <= 1.95e+17)) {
tmp = x * (pow(a, (t - 1.0)) / y);
} else {
tmp = x / (y * (a * exp(b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-45000000000.0d0)) .or. (.not. (t <= 1.95d+17))) then
tmp = x * ((a ** (t - 1.0d0)) / y)
else
tmp = x / (y * (a * exp(b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -45000000000.0) || !(t <= 1.95e+17)) {
tmp = x * (Math.pow(a, (t - 1.0)) / y);
} else {
tmp = x / (y * (a * Math.exp(b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -45000000000.0) or not (t <= 1.95e+17): tmp = x * (math.pow(a, (t - 1.0)) / y) else: tmp = x / (y * (a * math.exp(b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -45000000000.0) || !(t <= 1.95e+17)) tmp = Float64(x * Float64((a ^ Float64(t - 1.0)) / y)); else tmp = Float64(x / Float64(y * Float64(a * exp(b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -45000000000.0) || ~((t <= 1.95e+17))) tmp = x * ((a ^ (t - 1.0)) / y); else tmp = x / (y * (a * exp(b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -45000000000.0], N[Not[LessEqual[t, 1.95e+17]], $MachinePrecision]], N[(x * N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -45000000000 \lor \neg \left(t \leq 1.95 \cdot 10^{+17}\right):\\
\;\;\;\;x \cdot \frac{{a}^{\left(t - 1\right)}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a \cdot e^{b}\right)}\\
\end{array}
\end{array}
if t < -4.5e10 or 1.95e17 < t Initial program 100.0%
associate-*l/91.5%
*-commutative91.5%
exp-diff62.0%
exp-sum49.6%
*-commutative49.6%
exp-to-pow49.6%
*-commutative49.6%
exp-to-pow49.6%
Simplified49.6%
Taylor expanded in y around 0 58.3%
associate-/l*56.7%
sub-neg56.7%
metadata-eval56.7%
associate-/l*56.7%
Simplified56.7%
Taylor expanded in b around 0 75.6%
Simplified75.6%
if -4.5e10 < t < 1.95e17Initial program 97.9%
associate-*r/98.1%
sub-neg98.1%
exp-sum85.5%
associate-/l*85.5%
associate-/r/81.6%
exp-neg81.6%
associate-*r/81.6%
Simplified81.1%
Taylor expanded in t around 0 86.6%
associate-*r*81.9%
*-commutative81.9%
associate-*r*86.6%
Simplified86.6%
Taylor expanded in y around 0 76.3%
Final simplification75.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -1.1e-111) (not (<= b 2.2e-240))) (/ x (* y (* a (exp b)))) (- (* (/ (/ x a) y) b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.1e-111) || !(b <= 2.2e-240)) {
tmp = x / (y * (a * exp(b)));
} else {
tmp = -(((x / a) / y) * b);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-1.1d-111)) .or. (.not. (b <= 2.2d-240))) then
tmp = x / (y * (a * exp(b)))
else
tmp = -(((x / a) / y) * b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.1e-111) || !(b <= 2.2e-240)) {
tmp = x / (y * (a * Math.exp(b)));
} else {
tmp = -(((x / a) / y) * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -1.1e-111) or not (b <= 2.2e-240): tmp = x / (y * (a * math.exp(b))) else: tmp = -(((x / a) / y) * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -1.1e-111) || !(b <= 2.2e-240)) tmp = Float64(x / Float64(y * Float64(a * exp(b)))); else tmp = Float64(-Float64(Float64(Float64(x / a) / y) * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -1.1e-111) || ~((b <= 2.2e-240))) tmp = x / (y * (a * exp(b))); else tmp = -(((x / a) / y) * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -1.1e-111], N[Not[LessEqual[b, 2.2e-240]], $MachinePrecision]], N[(x / N[(y * N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], (-N[(N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision] * b), $MachinePrecision])]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.1 \cdot 10^{-111} \lor \neg \left(b \leq 2.2 \cdot 10^{-240}\right):\\
\;\;\;\;\frac{x}{y \cdot \left(a \cdot e^{b}\right)}\\
\mathbf{else}:\\
\;\;\;\;-\frac{\frac{x}{a}}{y} \cdot b\\
\end{array}
\end{array}
if b < -1.1e-111 or 2.1999999999999999e-240 < b Initial program 99.4%
associate-*r/98.9%
sub-neg98.9%
exp-sum71.4%
associate-/l*71.4%
associate-/r/68.9%
exp-neg68.9%
associate-*r/68.9%
Simplified62.0%
Taylor expanded in t around 0 69.3%
associate-*r*63.9%
*-commutative63.9%
associate-*r*69.3%
Simplified69.3%
Taylor expanded in y around 0 64.9%
if -1.1e-111 < b < 2.1999999999999999e-240Initial program 97.5%
associate-*r/99.5%
sub-neg99.5%
exp-sum99.5%
associate-/l*99.5%
associate-/r/99.5%
exp-neg99.5%
associate-*r/99.5%
Simplified86.8%
Taylor expanded in t around 0 59.5%
associate-*r*59.5%
*-commutative59.5%
associate-*r*59.5%
Simplified59.5%
Taylor expanded in y around 0 28.4%
Taylor expanded in b around 0 26.5%
mul-1-neg26.5%
unsub-neg26.5%
associate-/r*29.6%
*-commutative29.6%
*-commutative29.6%
times-frac29.4%
Simplified29.4%
Taylor expanded in b around inf 39.4%
mul-1-neg39.4%
associate-*r/41.9%
associate-/r*43.9%
distribute-rgt-neg-in43.9%
distribute-frac-neg43.9%
distribute-frac-neg43.9%
Simplified43.9%
Final simplification60.5%
(FPCore (x y z t a b) :precision binary64 (/ (/ x (* a (exp b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x / (a * exp(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 / (a * exp(b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x / (a * Math.exp(b))) / y;
}
def code(x, y, z, t, a, b): return (x / (a * math.exp(b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x / Float64(a * exp(b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x / (a * exp(b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x / N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{x}{a \cdot e^{b}}}{y}
\end{array}
Initial program 99.0%
Taylor expanded in t around 0 80.6%
mul-1-neg80.6%
Simplified80.6%
Taylor expanded in y around 0 58.1%
exp-neg58.1%
associate-*l/58.1%
*-lft-identity58.1%
+-commutative58.1%
exp-sum58.1%
rem-exp-log58.6%
Simplified58.6%
Final simplification58.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= a 4.5e-239)
(/ 1.0 (* a (/ y x)))
(if (<= a 6.8e-63)
(/ (* a (- x (* y (* x (/ b y))))) (* y (* a a)))
(if (<= a 8e+249)
(/ x (* a (* y (+ 1.0 b))))
(/ (- (/ x y) (/ x (/ y b))) a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= 4.5e-239) {
tmp = 1.0 / (a * (y / x));
} else if (a <= 6.8e-63) {
tmp = (a * (x - (y * (x * (b / y))))) / (y * (a * a));
} else if (a <= 8e+249) {
tmp = x / (a * (y * (1.0 + b)));
} else {
tmp = ((x / y) - (x / (y / b))) / 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 <= 4.5d-239) then
tmp = 1.0d0 / (a * (y / x))
else if (a <= 6.8d-63) then
tmp = (a * (x - (y * (x * (b / y))))) / (y * (a * a))
else if (a <= 8d+249) then
tmp = x / (a * (y * (1.0d0 + b)))
else
tmp = ((x / y) - (x / (y / b))) / 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 <= 4.5e-239) {
tmp = 1.0 / (a * (y / x));
} else if (a <= 6.8e-63) {
tmp = (a * (x - (y * (x * (b / y))))) / (y * (a * a));
} else if (a <= 8e+249) {
tmp = x / (a * (y * (1.0 + b)));
} else {
tmp = ((x / y) - (x / (y / b))) / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= 4.5e-239: tmp = 1.0 / (a * (y / x)) elif a <= 6.8e-63: tmp = (a * (x - (y * (x * (b / y))))) / (y * (a * a)) elif a <= 8e+249: tmp = x / (a * (y * (1.0 + b))) else: tmp = ((x / y) - (x / (y / b))) / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= 4.5e-239) tmp = Float64(1.0 / Float64(a * Float64(y / x))); elseif (a <= 6.8e-63) tmp = Float64(Float64(a * Float64(x - Float64(y * Float64(x * Float64(b / y))))) / Float64(y * Float64(a * a))); elseif (a <= 8e+249) tmp = Float64(x / Float64(a * Float64(y * Float64(1.0 + b)))); else tmp = Float64(Float64(Float64(x / y) - Float64(x / Float64(y / b))) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= 4.5e-239) tmp = 1.0 / (a * (y / x)); elseif (a <= 6.8e-63) tmp = (a * (x - (y * (x * (b / y))))) / (y * (a * a)); elseif (a <= 8e+249) tmp = x / (a * (y * (1.0 + b))); else tmp = ((x / y) - (x / (y / b))) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, 4.5e-239], N[(1.0 / N[(a * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.8e-63], N[(N[(a * N[(x - N[(y * N[(x * N[(b / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 8e+249], N[(x / N[(a * N[(y * N[(1.0 + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x / y), $MachinePrecision] - N[(x / N[(y / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 4.5 \cdot 10^{-239}:\\
\;\;\;\;\frac{1}{a \cdot \frac{y}{x}}\\
\mathbf{elif}\;a \leq 6.8 \cdot 10^{-63}:\\
\;\;\;\;\frac{a \cdot \left(x - y \cdot \left(x \cdot \frac{b}{y}\right)\right)}{y \cdot \left(a \cdot a\right)}\\
\mathbf{elif}\;a \leq 8 \cdot 10^{+249}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot \left(1 + b\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y} - \frac{x}{\frac{y}{b}}}{a}\\
\end{array}
\end{array}
if a < 4.50000000000000013e-239Initial program 99.8%
associate-*l/89.1%
*-commutative89.1%
exp-diff74.8%
exp-sum67.5%
*-commutative67.5%
exp-to-pow67.5%
*-commutative67.5%
exp-to-pow67.9%
Simplified67.9%
Taylor expanded in y around 0 57.8%
associate-/l*67.8%
sub-neg67.8%
metadata-eval67.8%
associate-/l*67.8%
Simplified67.8%
Taylor expanded in b around 0 65.0%
Simplified61.5%
Taylor expanded in t around 0 43.4%
*-commutative43.4%
Simplified43.4%
associate-*l/43.4%
times-frac53.7%
associate-/r/54.6%
associate-/l*44.4%
*-commutative44.4%
*-un-lft-identity44.4%
times-frac58.0%
/-rgt-identity58.0%
Applied egg-rr58.0%
if 4.50000000000000013e-239 < a < 6.79999999999999997e-63Initial program 99.7%
associate-*r/98.5%
sub-neg98.5%
exp-sum75.6%
associate-/l*75.6%
associate-/r/68.5%
exp-neg68.5%
associate-*r/68.5%
Simplified61.5%
Taylor expanded in t around 0 74.6%
associate-*r*64.6%
*-commutative64.6%
associate-*r*74.6%
Simplified74.6%
Taylor expanded in y around 0 61.1%
Taylor expanded in b around 0 26.1%
mul-1-neg26.1%
unsub-neg26.1%
associate-/r*28.9%
*-commutative28.9%
*-commutative28.9%
times-frac26.1%
Simplified26.1%
associate-/l/26.1%
associate-*l/27.7%
frac-sub27.3%
*-commutative27.3%
clear-num27.3%
un-div-inv27.4%
*-commutative27.4%
Applied egg-rr27.4%
*-commutative27.4%
associate-*l*35.8%
distribute-lft-out--35.8%
associate-/r/35.8%
associate-*l/35.8%
associate-*r/35.8%
*-commutative35.8%
associate-*r*42.6%
Simplified42.6%
if 6.79999999999999997e-63 < a < 7.9999999999999994e249Initial program 99.2%
Taylor expanded in t around 0 78.7%
mul-1-neg78.7%
Simplified78.7%
Taylor expanded in y around 0 56.1%
exp-neg56.1%
associate-*l/56.1%
*-lft-identity56.1%
+-commutative56.1%
exp-sum56.1%
rem-exp-log56.7%
Simplified56.7%
Taylor expanded in b around 0 38.9%
Taylor expanded in a around 0 40.1%
if 7.9999999999999994e249 < a Initial program 95.6%
associate-*r/98.4%
sub-neg98.4%
exp-sum74.2%
associate-/l*74.2%
associate-/r/74.2%
exp-neg74.2%
associate-*r/74.2%
Simplified65.5%
Taylor expanded in t around 0 59.3%
associate-*r*59.3%
*-commutative59.3%
associate-*r*59.3%
Simplified59.3%
Taylor expanded in y around 0 59.6%
Taylor expanded in b around 0 39.6%
mul-1-neg39.6%
unsub-neg39.6%
associate-/r*39.7%
*-commutative39.7%
*-commutative39.7%
times-frac46.7%
Simplified46.7%
associate-/l/43.3%
associate-/r*40.0%
associate-*l/57.0%
sub-div57.0%
clear-num57.0%
un-div-inv57.0%
Applied egg-rr57.0%
Final simplification44.7%
(FPCore (x y z t a b)
:precision binary64
(if (<= a 1e-202)
(/ 1.0 (* a (/ y x)))
(if (<= a 2.4e-64)
(/ (* a (- (/ x y) (* x (/ b y)))) (* a a))
(if (<= a 8.5e+249)
(/ x (* a (* y (+ 1.0 b))))
(/ (- (/ x y) (/ x (/ y b))) a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= 1e-202) {
tmp = 1.0 / (a * (y / x));
} else if (a <= 2.4e-64) {
tmp = (a * ((x / y) - (x * (b / y)))) / (a * a);
} else if (a <= 8.5e+249) {
tmp = x / (a * (y * (1.0 + b)));
} else {
tmp = ((x / y) - (x / (y / b))) / 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-202) then
tmp = 1.0d0 / (a * (y / x))
else if (a <= 2.4d-64) then
tmp = (a * ((x / y) - (x * (b / y)))) / (a * a)
else if (a <= 8.5d+249) then
tmp = x / (a * (y * (1.0d0 + b)))
else
tmp = ((x / y) - (x / (y / b))) / 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-202) {
tmp = 1.0 / (a * (y / x));
} else if (a <= 2.4e-64) {
tmp = (a * ((x / y) - (x * (b / y)))) / (a * a);
} else if (a <= 8.5e+249) {
tmp = x / (a * (y * (1.0 + b)));
} else {
tmp = ((x / y) - (x / (y / b))) / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= 1e-202: tmp = 1.0 / (a * (y / x)) elif a <= 2.4e-64: tmp = (a * ((x / y) - (x * (b / y)))) / (a * a) elif a <= 8.5e+249: tmp = x / (a * (y * (1.0 + b))) else: tmp = ((x / y) - (x / (y / b))) / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= 1e-202) tmp = Float64(1.0 / Float64(a * Float64(y / x))); elseif (a <= 2.4e-64) tmp = Float64(Float64(a * Float64(Float64(x / y) - Float64(x * Float64(b / y)))) / Float64(a * a)); elseif (a <= 8.5e+249) tmp = Float64(x / Float64(a * Float64(y * Float64(1.0 + b)))); else tmp = Float64(Float64(Float64(x / y) - Float64(x / Float64(y / b))) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= 1e-202) tmp = 1.0 / (a * (y / x)); elseif (a <= 2.4e-64) tmp = (a * ((x / y) - (x * (b / y)))) / (a * a); elseif (a <= 8.5e+249) tmp = x / (a * (y * (1.0 + b))); else tmp = ((x / y) - (x / (y / b))) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, 1e-202], N[(1.0 / N[(a * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.4e-64], N[(N[(a * N[(N[(x / y), $MachinePrecision] - N[(x * N[(b / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 8.5e+249], N[(x / N[(a * N[(y * N[(1.0 + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x / y), $MachinePrecision] - N[(x / N[(y / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 10^{-202}:\\
\;\;\;\;\frac{1}{a \cdot \frac{y}{x}}\\
\mathbf{elif}\;a \leq 2.4 \cdot 10^{-64}:\\
\;\;\;\;\frac{a \cdot \left(\frac{x}{y} - x \cdot \frac{b}{y}\right)}{a \cdot a}\\
\mathbf{elif}\;a \leq 8.5 \cdot 10^{+249}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot \left(1 + b\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y} - \frac{x}{\frac{y}{b}}}{a}\\
\end{array}
\end{array}
if a < 1e-202Initial program 99.9%
associate-*l/92.2%
*-commutative92.2%
exp-diff76.8%
exp-sum71.5%
*-commutative71.5%
exp-to-pow71.5%
*-commutative71.5%
exp-to-pow71.8%
Simplified71.8%
Taylor expanded in y around 0 64.6%
associate-/l*69.4%
sub-neg69.4%
metadata-eval69.4%
associate-/l*69.4%
Simplified69.4%
Taylor expanded in b around 0 64.8%
Simplified59.9%
Taylor expanded in t around 0 36.9%
*-commutative36.9%
Simplified36.9%
associate-*l/36.9%
times-frac46.7%
associate-/r/47.4%
associate-/l*37.6%
*-commutative37.6%
*-un-lft-identity37.6%
times-frac49.8%
/-rgt-identity49.8%
Applied egg-rr49.8%
if 1e-202 < a < 2.39999999999999998e-64Initial program 99.6%
associate-*r/98.2%
sub-neg98.2%
exp-sum74.4%
associate-/l*74.4%
associate-/r/69.4%
exp-neg69.4%
associate-*r/69.4%
Simplified61.0%
Taylor expanded in t around 0 73.3%
associate-*r*64.7%
*-commutative64.7%
associate-*r*73.3%
Simplified73.3%
Taylor expanded in y around 0 63.8%
Taylor expanded in b around 0 27.1%
mul-1-neg27.1%
unsub-neg27.1%
associate-/r*28.8%
*-commutative28.8%
*-commutative28.8%
times-frac27.3%
Simplified27.3%
associate-/l/27.2%
associate-/r*28.8%
associate-*l/30.6%
frac-sub41.7%
clear-num41.7%
un-div-inv41.7%
Applied egg-rr41.7%
*-commutative41.7%
distribute-lft-out--41.7%
associate-/r/40.0%
associate-*l/43.3%
associate-*r/41.7%
Simplified41.7%
if 2.39999999999999998e-64 < a < 8.49999999999999933e249Initial program 99.2%
Taylor expanded in t around 0 78.7%
mul-1-neg78.7%
Simplified78.7%
Taylor expanded in y around 0 56.1%
exp-neg56.1%
associate-*l/56.1%
*-lft-identity56.1%
+-commutative56.1%
exp-sum56.1%
rem-exp-log56.7%
Simplified56.7%
Taylor expanded in b around 0 38.9%
Taylor expanded in a around 0 40.1%
if 8.49999999999999933e249 < a Initial program 95.6%
associate-*r/98.4%
sub-neg98.4%
exp-sum74.2%
associate-/l*74.2%
associate-/r/74.2%
exp-neg74.2%
associate-*r/74.2%
Simplified65.5%
Taylor expanded in t around 0 59.3%
associate-*r*59.3%
*-commutative59.3%
associate-*r*59.3%
Simplified59.3%
Taylor expanded in y around 0 59.6%
Taylor expanded in b around 0 39.6%
mul-1-neg39.6%
unsub-neg39.6%
associate-/r*39.7%
*-commutative39.7%
*-commutative39.7%
times-frac46.7%
Simplified46.7%
associate-/l/43.3%
associate-/r*40.0%
associate-*l/57.0%
sub-div57.0%
clear-num57.0%
un-div-inv57.0%
Applied egg-rr57.0%
Final simplification43.9%
(FPCore (x y z t a b) :precision binary64 (if (<= y 1.55e+142) (/ (+ (/ (- x (* x b)) a) (* x (/ (* b b) a))) y) (/ x (* a (* y (+ 1.0 b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 1.55e+142) {
tmp = (((x - (x * b)) / a) + (x * ((b * b) / a))) / y;
} else {
tmp = x / (a * (y * (1.0 + b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= 1.55d+142) then
tmp = (((x - (x * b)) / a) + (x * ((b * b) / a))) / y
else
tmp = x / (a * (y * (1.0d0 + b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 1.55e+142) {
tmp = (((x - (x * b)) / a) + (x * ((b * b) / a))) / y;
} else {
tmp = x / (a * (y * (1.0 + b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 1.55e+142: tmp = (((x - (x * b)) / a) + (x * ((b * b) / a))) / y else: tmp = x / (a * (y * (1.0 + b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 1.55e+142) tmp = Float64(Float64(Float64(Float64(x - Float64(x * b)) / a) + Float64(x * Float64(Float64(b * b) / a))) / y); else tmp = Float64(x / Float64(a * Float64(y * Float64(1.0 + b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= 1.55e+142) tmp = (((x - (x * b)) / a) + (x * ((b * b) / a))) / y; else tmp = x / (a * (y * (1.0 + b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 1.55e+142], N[(N[(N[(N[(x - N[(x * b), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] + N[(x * N[(N[(b * b), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(a * N[(y * N[(1.0 + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.55 \cdot 10^{+142}:\\
\;\;\;\;\frac{\frac{x - x \cdot b}{a} + x \cdot \frac{b \cdot b}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot \left(1 + b\right)\right)}\\
\end{array}
\end{array}
if y < 1.55e142Initial program 98.8%
Taylor expanded in t around 0 77.3%
mul-1-neg77.3%
Simplified77.3%
Taylor expanded in y around 0 60.4%
exp-neg60.4%
associate-*l/60.4%
*-lft-identity60.4%
+-commutative60.4%
exp-sum60.4%
rem-exp-log61.0%
Simplified61.0%
Taylor expanded in b around 0 34.1%
Taylor expanded in b around 0 42.9%
+-commutative42.9%
+-commutative42.9%
mul-1-neg42.9%
sub-neg42.9%
*-commutative42.9%
div-sub43.8%
associate-/l*38.1%
associate-/r/43.3%
unpow243.3%
Simplified43.3%
if 1.55e142 < y Initial program 100.0%
Taylor expanded in t around 0 97.7%
mul-1-neg97.7%
Simplified97.7%
Taylor expanded in y around 0 46.7%
exp-neg46.7%
associate-*l/46.7%
*-lft-identity46.7%
+-commutative46.7%
exp-sum46.7%
rem-exp-log46.7%
Simplified46.7%
Taylor expanded in b around 0 33.3%
Taylor expanded in a around 0 44.5%
Final simplification43.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= a 3.1e-50)
(/ (/ (- x (* x b)) a) y)
(if (<= a 9.2e+249)
(/ x (* a (* y (+ 1.0 b))))
(/ (- (/ x y) (/ x (/ y b))) a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= 3.1e-50) {
tmp = ((x - (x * b)) / a) / y;
} else if (a <= 9.2e+249) {
tmp = x / (a * (y * (1.0 + b)));
} else {
tmp = ((x / y) - (x / (y / b))) / 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 <= 3.1d-50) then
tmp = ((x - (x * b)) / a) / y
else if (a <= 9.2d+249) then
tmp = x / (a * (y * (1.0d0 + b)))
else
tmp = ((x / y) - (x / (y / b))) / 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 <= 3.1e-50) {
tmp = ((x - (x * b)) / a) / y;
} else if (a <= 9.2e+249) {
tmp = x / (a * (y * (1.0 + b)));
} else {
tmp = ((x / y) - (x / (y / b))) / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= 3.1e-50: tmp = ((x - (x * b)) / a) / y elif a <= 9.2e+249: tmp = x / (a * (y * (1.0 + b))) else: tmp = ((x / y) - (x / (y / b))) / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= 3.1e-50) tmp = Float64(Float64(Float64(x - Float64(x * b)) / a) / y); elseif (a <= 9.2e+249) tmp = Float64(x / Float64(a * Float64(y * Float64(1.0 + b)))); else tmp = Float64(Float64(Float64(x / y) - Float64(x / Float64(y / b))) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= 3.1e-50) tmp = ((x - (x * b)) / a) / y; elseif (a <= 9.2e+249) tmp = x / (a * (y * (1.0 + b))); else tmp = ((x / y) - (x / (y / b))) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, 3.1e-50], N[(N[(N[(x - N[(x * b), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[a, 9.2e+249], N[(x / N[(a * N[(y * N[(1.0 + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x / y), $MachinePrecision] - N[(x / N[(y / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 3.1 \cdot 10^{-50}:\\
\;\;\;\;\frac{\frac{x - x \cdot b}{a}}{y}\\
\mathbf{elif}\;a \leq 9.2 \cdot 10^{+249}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot \left(1 + b\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y} - \frac{x}{\frac{y}{b}}}{a}\\
\end{array}
\end{array}
if a < 3.1000000000000002e-50Initial program 99.7%
Taylor expanded in t around 0 85.5%
mul-1-neg85.5%
Simplified85.5%
Taylor expanded in y around 0 60.8%
exp-neg60.8%
associate-*l/60.8%
*-lft-identity60.8%
+-commutative60.8%
exp-sum60.8%
rem-exp-log60.9%
Simplified60.9%
Taylor expanded in b around 0 26.6%
Taylor expanded in b around 0 26.6%
associate-/r*31.3%
mul-1-neg31.3%
*-commutative31.3%
*-commutative31.3%
times-frac29.4%
distribute-lft-neg-in29.4%
cancel-sign-sub-inv29.4%
associate-/r*29.4%
times-frac26.6%
div-sub35.6%
associate-/r*41.0%
Simplified41.0%
if 3.1000000000000002e-50 < a < 9.1999999999999993e249Initial program 99.1%
Taylor expanded in t around 0 77.8%
mul-1-neg77.8%
Simplified77.8%
Taylor expanded in y around 0 55.1%
exp-neg55.1%
associate-*l/55.1%
*-lft-identity55.1%
+-commutative55.1%
exp-sum55.1%
rem-exp-log55.7%
Simplified55.7%
Taylor expanded in b around 0 37.3%
Taylor expanded in a around 0 39.2%
if 9.1999999999999993e249 < a Initial program 95.6%
associate-*r/98.4%
sub-neg98.4%
exp-sum74.2%
associate-/l*74.2%
associate-/r/74.2%
exp-neg74.2%
associate-*r/74.2%
Simplified65.5%
Taylor expanded in t around 0 59.3%
associate-*r*59.3%
*-commutative59.3%
associate-*r*59.3%
Simplified59.3%
Taylor expanded in y around 0 59.6%
Taylor expanded in b around 0 39.6%
mul-1-neg39.6%
unsub-neg39.6%
associate-/r*39.7%
*-commutative39.7%
*-commutative39.7%
times-frac46.7%
Simplified46.7%
associate-/l/43.3%
associate-/r*40.0%
associate-*l/57.0%
sub-div57.0%
clear-num57.0%
un-div-inv57.0%
Applied egg-rr57.0%
Final simplification41.9%
(FPCore (x y z t a b) :precision binary64 (if (<= a 9.5e-50) (/ (/ x a) y) (/ x (* a (* y (+ 1.0 b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= 9.5e-50) {
tmp = (x / a) / y;
} else {
tmp = x / (a * (y * (1.0 + b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= 9.5d-50) then
tmp = (x / a) / y
else
tmp = x / (a * (y * (1.0d0 + b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= 9.5e-50) {
tmp = (x / a) / y;
} else {
tmp = x / (a * (y * (1.0 + b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= 9.5e-50: tmp = (x / a) / y else: tmp = x / (a * (y * (1.0 + b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= 9.5e-50) tmp = Float64(Float64(x / a) / y); else tmp = Float64(x / Float64(a * Float64(y * Float64(1.0 + b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= 9.5e-50) tmp = (x / a) / y; else tmp = x / (a * (y * (1.0 + b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, 9.5e-50], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(a * N[(y * N[(1.0 + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 9.5 \cdot 10^{-50}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot \left(1 + b\right)\right)}\\
\end{array}
\end{array}
if a < 9.4999999999999993e-50Initial program 99.7%
Taylor expanded in t around 0 84.7%
mul-1-neg84.7%
Simplified84.7%
Taylor expanded in b around 0 67.0%
div-exp67.0%
*-commutative67.0%
exp-to-pow67.0%
rem-exp-log67.2%
Simplified67.2%
Taylor expanded in y around 0 31.7%
*-commutative31.7%
associate-/r*38.2%
Simplified38.2%
if 9.4999999999999993e-50 < a Initial program 98.4%
Taylor expanded in t around 0 77.8%
mul-1-neg77.8%
Simplified77.8%
Taylor expanded in y around 0 56.7%
exp-neg56.7%
associate-*l/56.7%
*-lft-identity56.7%
+-commutative56.7%
exp-sum56.7%
rem-exp-log57.5%
Simplified57.5%
Taylor expanded in b around 0 39.2%
Taylor expanded in a around 0 39.5%
Final simplification38.9%
(FPCore (x y z t a b) :precision binary64 (if (<= a 1e-49) (/ (/ x a) y) (/ x (* y (+ a (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= 1e-49) {
tmp = (x / 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 (a <= 1d-49) then
tmp = (x / 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 (a <= 1e-49) {
tmp = (x / a) / y;
} else {
tmp = x / (y * (a + (a * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= 1e-49: tmp = (x / a) / y else: tmp = x / (y * (a + (a * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= 1e-49) tmp = Float64(Float64(x / 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 (a <= 1e-49) tmp = (x / a) / y; else tmp = x / (y * (a + (a * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, 1e-49], N[(N[(x / 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}\;a \leq 10^{-49}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a + a \cdot b\right)}\\
\end{array}
\end{array}
if a < 9.99999999999999936e-50Initial program 99.7%
Taylor expanded in t around 0 84.7%
mul-1-neg84.7%
Simplified84.7%
Taylor expanded in b around 0 67.0%
div-exp67.0%
*-commutative67.0%
exp-to-pow67.0%
rem-exp-log67.2%
Simplified67.2%
Taylor expanded in y around 0 31.7%
*-commutative31.7%
associate-/r*38.2%
Simplified38.2%
if 9.99999999999999936e-50 < a Initial program 98.4%
associate-*r/99.2%
sub-neg99.2%
exp-sum76.8%
associate-/l*76.8%
associate-/r/76.8%
exp-neg76.8%
associate-*r/76.8%
Simplified67.7%
Taylor expanded in t around 0 61.8%
associate-*r*59.8%
*-commutative59.8%
associate-*r*61.8%
Simplified61.8%
Taylor expanded in y around 0 57.1%
Taylor expanded in b around 0 40.1%
Final simplification39.3%
(FPCore (x y z t a b) :precision binary64 (if (<= a 2.6e-50) (/ (/ (- 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 (a <= 2.6e-50) {
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 (a <= 2.6d-50) 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 (a <= 2.6e-50) {
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 a <= 2.6e-50: 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 (a <= 2.6e-50) 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 (a <= 2.6e-50) 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[a, 2.6e-50], 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}\;a \leq 2.6 \cdot 10^{-50}:\\
\;\;\;\;\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 a < 2.6000000000000001e-50Initial program 99.7%
Taylor expanded in t around 0 85.5%
mul-1-neg85.5%
Simplified85.5%
Taylor expanded in y around 0 60.8%
exp-neg60.8%
associate-*l/60.8%
*-lft-identity60.8%
+-commutative60.8%
exp-sum60.8%
rem-exp-log60.9%
Simplified60.9%
Taylor expanded in b around 0 26.6%
Taylor expanded in b around 0 26.6%
associate-/r*31.3%
mul-1-neg31.3%
*-commutative31.3%
*-commutative31.3%
times-frac29.4%
distribute-lft-neg-in29.4%
cancel-sign-sub-inv29.4%
associate-/r*29.4%
times-frac26.6%
div-sub35.6%
associate-/r*41.0%
Simplified41.0%
if 2.6000000000000001e-50 < a Initial program 98.5%
associate-*r/99.2%
sub-neg99.2%
exp-sum76.3%
associate-/l*76.3%
associate-/r/76.3%
exp-neg76.3%
associate-*r/76.3%
Simplified67.3%
Taylor expanded in t around 0 61.4%
associate-*r*59.4%
*-commutative59.4%
associate-*r*61.4%
Simplified61.4%
Taylor expanded in y around 0 56.8%
Taylor expanded in b around 0 39.8%
Final simplification40.3%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (/ (/ x a) y))) (if (<= y 5.8e+15) t_1 (- (* t_1 b)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x / a) / y;
double tmp;
if (y <= 5.8e+15) {
tmp = t_1;
} else {
tmp = -(t_1 * b);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (x / a) / y
if (y <= 5.8d+15) then
tmp = t_1
else
tmp = -(t_1 * b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x / a) / y;
double tmp;
if (y <= 5.8e+15) {
tmp = t_1;
} else {
tmp = -(t_1 * b);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x / a) / y tmp = 0 if y <= 5.8e+15: tmp = t_1 else: tmp = -(t_1 * b) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x / a) / y) tmp = 0.0 if (y <= 5.8e+15) tmp = t_1; else tmp = Float64(-Float64(t_1 * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x / a) / y; tmp = 0.0; if (y <= 5.8e+15) tmp = t_1; else tmp = -(t_1 * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, 5.8e+15], t$95$1, (-N[(t$95$1 * b), $MachinePrecision])]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{a}}{y}\\
\mathbf{if}\;y \leq 5.8 \cdot 10^{+15}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;-t_1 \cdot b\\
\end{array}
\end{array}
if y < 5.8e15Initial program 98.6%
Taylor expanded in t around 0 76.1%
mul-1-neg76.1%
Simplified76.1%
Taylor expanded in b around 0 55.1%
div-exp55.1%
*-commutative55.1%
exp-to-pow55.1%
rem-exp-log55.8%
Simplified55.8%
Taylor expanded in y around 0 35.5%
*-commutative35.5%
associate-/r*37.5%
Simplified37.5%
if 5.8e15 < y Initial program 100.0%
associate-*r/100.0%
sub-neg100.0%
exp-sum73.9%
associate-/l*73.9%
associate-/r/73.9%
exp-neg73.9%
associate-*r/73.9%
Simplified55.1%
Taylor expanded in t around 0 66.8%
associate-*r*65.3%
*-commutative65.3%
associate-*r*66.8%
Simplified66.8%
Taylor expanded in y around 0 45.3%
Taylor expanded in b around 0 21.6%
mul-1-neg21.6%
unsub-neg21.6%
associate-/r*24.2%
*-commutative24.2%
*-commutative24.2%
times-frac20.1%
Simplified20.1%
Taylor expanded in b around inf 32.5%
mul-1-neg32.5%
associate-*r/35.6%
associate-/r*35.4%
distribute-rgt-neg-in35.4%
distribute-frac-neg35.4%
distribute-frac-neg35.4%
Simplified35.4%
Final simplification36.9%
(FPCore (x y z t a b) :precision binary64 (/ x (* y a)))
double code(double x, double y, double z, double t, double a, double b) {
return x / (y * a);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x / (y * a)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x / (y * a);
}
def code(x, y, z, t, a, b): return x / (y * a)
function code(x, y, z, t, a, b) return Float64(x / Float64(y * a)) end
function tmp = code(x, y, z, t, a, b) tmp = x / (y * a); end
code[x_, y_, z_, t_, a_, b_] := N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y \cdot a}
\end{array}
Initial program 99.0%
Taylor expanded in t around 0 80.6%
mul-1-neg80.6%
Simplified80.6%
Taylor expanded in b around 0 63.0%
div-exp62.9%
*-commutative62.9%
exp-to-pow62.9%
rem-exp-log63.5%
Simplified63.5%
Taylor expanded in y around 0 32.5%
Final simplification32.5%
(FPCore (x y z t a b) :precision binary64 (/ (/ x a) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x / a) / 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 / a) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x / a) / y;
}
def code(x, y, z, t, a, b): return (x / a) / y
function code(x, y, z, t, a, b) return Float64(Float64(x / a) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x / a) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{x}{a}}{y}
\end{array}
Initial program 99.0%
Taylor expanded in t around 0 80.6%
mul-1-neg80.6%
Simplified80.6%
Taylor expanded in b around 0 63.0%
div-exp62.9%
*-commutative62.9%
exp-to-pow62.9%
rem-exp-log63.5%
Simplified63.5%
Taylor expanded in y around 0 32.5%
*-commutative32.5%
associate-/r*35.0%
Simplified35.0%
Final simplification35.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 2023192
(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))