
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x * exp((((y * log(z)) + ((t - 1.0d0) * log(a))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x * Math.exp((((y * Math.log(z)) + ((t - 1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + ((t - 1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 21 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x * exp((((y * log(z)) + ((t - 1.0d0) * log(a))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x * Math.exp((((y * Math.log(z)) + ((t - 1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + ((t - 1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\end{array}
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (+ t -1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + ((t + -1.0) * log(a))) - b))) / y;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x * exp((((y * log(z)) + ((t + (-1.0d0)) * log(a))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x * Math.exp((((y * Math.log(z)) + ((t + -1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + ((t + -1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t + -1.0) * log(a))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + ((t + -1.0) * log(a))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \left(t + -1\right) \cdot \log a\right) - b}}{y}
\end{array}
Initial program 98.9%
Final simplification98.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.3e+106) (not (<= y 66000.0))) (/ (* 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 <= -1.3e+106) || !(y <= 66000.0)) {
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 <= (-1.3d+106)) .or. (.not. (y <= 66000.0d0))) 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 <= -1.3e+106) || !(y <= 66000.0)) {
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 <= -1.3e+106) or not (y <= 66000.0): 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 <= -1.3e+106) || !(y <= 66000.0)) 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 <= -1.3e+106) || ~((y <= 66000.0))) 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, -1.3e+106], N[Not[LessEqual[y, 66000.0]], $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 -1.3 \cdot 10^{+106} \lor \neg \left(y \leq 66000\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 < -1.3000000000000001e106 or 66000 < y Initial program 100.0%
Taylor expanded in t around 0 94.5%
+-commutative94.5%
mul-1-neg94.5%
unsub-neg94.5%
Simplified94.5%
if -1.3000000000000001e106 < y < 66000Initial program 98.2%
Taylor expanded in y around 0 97.1%
Final simplification96.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.85e+106) (not (<= y 3.3e+43))) (/ (/ (* 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 <= -1.85e+106) || !(y <= 3.3e+43)) {
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 <= (-1.85d+106)) .or. (.not. (y <= 3.3d+43))) 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 <= -1.85e+106) || !(y <= 3.3e+43)) {
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 <= -1.85e+106) or not (y <= 3.3e+43): 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 <= -1.85e+106) || !(y <= 3.3e+43)) tmp = Float64(Float64(Float64(x * (z ^ y)) / a) / y); else tmp = Float64(Float64(x * exp(Float64(Float64(Float64(t + -1.0) * log(a)) - b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.85e+106) || ~((y <= 3.3e+43))) 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, -1.85e+106], N[Not[LessEqual[y, 3.3e+43]], $MachinePrecision]], N[(N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[Exp[N[(N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.85 \cdot 10^{+106} \lor \neg \left(y \leq 3.3 \cdot 10^{+43}\right):\\
\;\;\;\;\frac{\frac{x \cdot {z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\left(t + -1\right) \cdot \log a - b}}{y}\\
\end{array}
\end{array}
if y < -1.84999999999999997e106 or 3.3000000000000001e43 < y Initial program 100.0%
Taylor expanded in b around 0 93.8%
exp-sum76.9%
*-commutative76.9%
exp-to-pow76.9%
exp-to-pow76.9%
sub-neg76.9%
metadata-eval76.9%
Simplified76.9%
Taylor expanded in t around 0 89.6%
if -1.84999999999999997e106 < y < 3.3000000000000001e43Initial program 98.3%
Taylor expanded in y around 0 96.7%
Final simplification94.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -3.5e+106) (not (<= y 8.8e+42))) (/ (/ (* x (pow z y)) a) y) (/ (* x (/ (pow a (+ t -1.0)) (exp b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.5e+106) || !(y <= 8.8e+42)) {
tmp = ((x * pow(z, y)) / a) / y;
} else {
tmp = (x * (pow(a, (t + -1.0)) / exp(b))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-3.5d+106)) .or. (.not. (y <= 8.8d+42))) then
tmp = ((x * (z ** y)) / a) / y
else
tmp = (x * ((a ** (t + (-1.0d0))) / exp(b))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.5e+106) || !(y <= 8.8e+42)) {
tmp = ((x * Math.pow(z, y)) / a) / y;
} else {
tmp = (x * (Math.pow(a, (t + -1.0)) / Math.exp(b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -3.5e+106) or not (y <= 8.8e+42): tmp = ((x * math.pow(z, y)) / a) / y else: tmp = (x * (math.pow(a, (t + -1.0)) / math.exp(b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -3.5e+106) || !(y <= 8.8e+42)) tmp = Float64(Float64(Float64(x * (z ^ y)) / a) / y); else tmp = Float64(Float64(x * Float64((a ^ Float64(t + -1.0)) / exp(b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -3.5e+106) || ~((y <= 8.8e+42))) tmp = ((x * (z ^ y)) / a) / y; else tmp = (x * ((a ^ (t + -1.0)) / exp(b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -3.5e+106], N[Not[LessEqual[y, 8.8e+42]], $MachinePrecision]], N[(N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.5 \cdot 10^{+106} \lor \neg \left(y \leq 8.8 \cdot 10^{+42}\right):\\
\;\;\;\;\frac{\frac{x \cdot {z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \frac{{a}^{\left(t + -1\right)}}{e^{b}}}{y}\\
\end{array}
\end{array}
if y < -3.49999999999999981e106 or 8.8000000000000005e42 < y Initial program 100.0%
Taylor expanded in b around 0 93.8%
exp-sum76.9%
*-commutative76.9%
exp-to-pow76.9%
exp-to-pow76.9%
sub-neg76.9%
metadata-eval76.9%
Simplified76.9%
Taylor expanded in t around 0 89.6%
if -3.49999999999999981e106 < y < 8.8000000000000005e42Initial program 98.3%
Taylor expanded in y around 0 96.7%
div-exp91.2%
exp-to-pow92.1%
sub-neg92.1%
metadata-eval92.1%
Simplified92.1%
Final simplification91.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -3.3e+106) (not (<= y 1.3e+42))) (/ (/ (* x (pow z y)) a) y) (* x (/ (/ (pow a (+ t -1.0)) y) (exp b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.3e+106) || !(y <= 1.3e+42)) {
tmp = ((x * pow(z, y)) / a) / y;
} else {
tmp = x * ((pow(a, (t + -1.0)) / y) / exp(b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-3.3d+106)) .or. (.not. (y <= 1.3d+42))) then
tmp = ((x * (z ** y)) / a) / y
else
tmp = x * (((a ** (t + (-1.0d0))) / y) / exp(b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.3e+106) || !(y <= 1.3e+42)) {
tmp = ((x * Math.pow(z, y)) / a) / y;
} else {
tmp = x * ((Math.pow(a, (t + -1.0)) / y) / Math.exp(b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -3.3e+106) or not (y <= 1.3e+42): tmp = ((x * math.pow(z, y)) / a) / y else: tmp = x * ((math.pow(a, (t + -1.0)) / y) / math.exp(b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -3.3e+106) || !(y <= 1.3e+42)) tmp = Float64(Float64(Float64(x * (z ^ y)) / a) / y); else tmp = Float64(x * Float64(Float64((a ^ Float64(t + -1.0)) / y) / exp(b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -3.3e+106) || ~((y <= 1.3e+42))) tmp = ((x * (z ^ y)) / a) / y; else tmp = x * (((a ^ (t + -1.0)) / y) / exp(b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -3.3e+106], N[Not[LessEqual[y, 1.3e+42]], $MachinePrecision]], N[(N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision], N[(x * N[(N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision] / N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.3 \cdot 10^{+106} \lor \neg \left(y \leq 1.3 \cdot 10^{+42}\right):\\
\;\;\;\;\frac{\frac{x \cdot {z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{\frac{{a}^{\left(t + -1\right)}}{y}}{e^{b}}\\
\end{array}
\end{array}
if y < -3.30000000000000008e106 or 1.29999999999999995e42 < y Initial program 100.0%
Taylor expanded in b around 0 93.8%
exp-sum76.9%
*-commutative76.9%
exp-to-pow76.9%
exp-to-pow76.9%
sub-neg76.9%
metadata-eval76.9%
Simplified76.9%
Taylor expanded in t around 0 89.6%
if -3.30000000000000008e106 < y < 1.29999999999999995e42Initial program 98.3%
associate-/l*95.6%
associate--l+95.6%
exp-sum85.1%
associate-/l*84.5%
*-commutative84.5%
exp-to-pow84.5%
exp-diff78.9%
*-commutative78.9%
exp-to-pow79.6%
sub-neg79.6%
metadata-eval79.6%
Simplified79.6%
Taylor expanded in y around 0 88.7%
associate-/l*88.5%
associate-/r*85.4%
exp-to-pow86.0%
sub-neg86.0%
metadata-eval86.0%
Simplified86.0%
Final simplification87.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (exp b))) (t_2 (* x (/ (pow a t) y))))
(if (<= t -1100000000.0)
t_2
(if (<= t -4.8e-114)
(/ (/ x a) t_1)
(if (<= t 9.8e-247)
(/ (/ (* x (pow z y)) a) y)
(if (<= t 1.46e+35) (/ 1.0 (* a (/ t_1 x))) t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * exp(b);
double t_2 = x * (pow(a, t) / y);
double tmp;
if (t <= -1100000000.0) {
tmp = t_2;
} else if (t <= -4.8e-114) {
tmp = (x / a) / t_1;
} else if (t <= 9.8e-247) {
tmp = ((x * pow(z, y)) / a) / y;
} else if (t <= 1.46e+35) {
tmp = 1.0 / (a * (t_1 / x));
} 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 = y * exp(b)
t_2 = x * ((a ** t) / y)
if (t <= (-1100000000.0d0)) then
tmp = t_2
else if (t <= (-4.8d-114)) then
tmp = (x / a) / t_1
else if (t <= 9.8d-247) then
tmp = ((x * (z ** y)) / a) / y
else if (t <= 1.46d+35) then
tmp = 1.0d0 / (a * (t_1 / x))
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 = y * Math.exp(b);
double t_2 = x * (Math.pow(a, t) / y);
double tmp;
if (t <= -1100000000.0) {
tmp = t_2;
} else if (t <= -4.8e-114) {
tmp = (x / a) / t_1;
} else if (t <= 9.8e-247) {
tmp = ((x * Math.pow(z, y)) / a) / y;
} else if (t <= 1.46e+35) {
tmp = 1.0 / (a * (t_1 / x));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * math.exp(b) t_2 = x * (math.pow(a, t) / y) tmp = 0 if t <= -1100000000.0: tmp = t_2 elif t <= -4.8e-114: tmp = (x / a) / t_1 elif t <= 9.8e-247: tmp = ((x * math.pow(z, y)) / a) / y elif t <= 1.46e+35: tmp = 1.0 / (a * (t_1 / x)) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y * exp(b)) t_2 = Float64(x * Float64((a ^ t) / y)) tmp = 0.0 if (t <= -1100000000.0) tmp = t_2; elseif (t <= -4.8e-114) tmp = Float64(Float64(x / a) / t_1); elseif (t <= 9.8e-247) tmp = Float64(Float64(Float64(x * (z ^ y)) / a) / y); elseif (t <= 1.46e+35) tmp = Float64(1.0 / Float64(a * Float64(t_1 / x))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y * exp(b); t_2 = x * ((a ^ t) / y); tmp = 0.0; if (t <= -1100000000.0) tmp = t_2; elseif (t <= -4.8e-114) tmp = (x / a) / t_1; elseif (t <= 9.8e-247) tmp = ((x * (z ^ y)) / a) / y; elseif (t <= 1.46e+35) tmp = 1.0 / (a * (t_1 / x)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[Power[a, t], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1100000000.0], t$95$2, If[LessEqual[t, -4.8e-114], N[(N[(x / a), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t, 9.8e-247], N[(N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 1.46e+35], N[(1.0 / N[(a * N[(t$95$1 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot e^{b}\\
t_2 := x \cdot \frac{{a}^{t}}{y}\\
\mathbf{if}\;t \leq -1100000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -4.8 \cdot 10^{-114}:\\
\;\;\;\;\frac{\frac{x}{a}}{t\_1}\\
\mathbf{elif}\;t \leq 9.8 \cdot 10^{-247}:\\
\;\;\;\;\frac{\frac{x \cdot {z}^{y}}{a}}{y}\\
\mathbf{elif}\;t \leq 1.46 \cdot 10^{+35}:\\
\;\;\;\;\frac{1}{a \cdot \frac{t\_1}{x}}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -1.1e9 or 1.4599999999999999e35 < t Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum78.8%
associate-/l*78.8%
*-commutative78.8%
exp-to-pow78.8%
exp-diff69.5%
*-commutative69.5%
exp-to-pow69.5%
sub-neg69.5%
metadata-eval69.5%
Simplified69.5%
Taylor expanded in y around 0 81.5%
associate-/l*81.5%
associate-/r*81.5%
exp-to-pow81.5%
sub-neg81.5%
metadata-eval81.5%
Simplified81.5%
Taylor expanded in b around 0 90.0%
sub-neg90.0%
metadata-eval90.0%
exp-to-pow90.0%
associate-*r/90.0%
+-commutative90.0%
Simplified90.0%
Taylor expanded in t around inf 90.0%
if -1.1e9 < t < -4.8000000000000002e-114Initial program 97.5%
Taylor expanded in t around 0 97.5%
+-commutative97.5%
mul-1-neg97.5%
unsub-neg97.5%
Simplified97.5%
Taylor expanded in x around 0 97.5%
associate-/l*91.0%
associate--r+91.0%
remove-double-neg91.0%
log-rec91.0%
mul-1-neg91.0%
associate--r+91.0%
Simplified76.7%
Taylor expanded in y around 0 81.4%
associate-/r*96.1%
Simplified96.1%
if -4.8000000000000002e-114 < t < 9.8e-247Initial program 96.8%
Taylor expanded in b around 0 80.0%
exp-sum80.1%
*-commutative80.1%
exp-to-pow80.1%
exp-to-pow81.1%
sub-neg81.1%
metadata-eval81.1%
Simplified81.1%
Taylor expanded in t around 0 81.2%
if 9.8e-247 < t < 1.4599999999999999e35Initial program 99.3%
associate-/l*96.5%
associate--l+96.5%
exp-sum84.8%
associate-/l*81.5%
*-commutative81.5%
exp-to-pow81.5%
exp-diff78.2%
*-commutative78.2%
exp-to-pow78.4%
sub-neg78.4%
metadata-eval78.4%
Simplified78.4%
Taylor expanded in t around 0 81.3%
clear-num81.3%
inv-pow81.3%
Applied egg-rr81.3%
unpow-181.3%
associate-/l*87.7%
Simplified87.7%
Taylor expanded in y around 0 78.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (/ (pow a t) y))))
(if (<= t -8.2e+14)
t_1
(if (<= t -1.92e-112)
(/ (/ x a) (* y (exp b)))
(if (<= t 6.2e+33) (/ (/ (* x (pow z y)) a) y) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * (pow(a, t) / y);
double tmp;
if (t <= -8.2e+14) {
tmp = t_1;
} else if (t <= -1.92e-112) {
tmp = (x / a) / (y * exp(b));
} else if (t <= 6.2e+33) {
tmp = ((x * pow(z, y)) / a) / y;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x * ((a ** t) / y)
if (t <= (-8.2d+14)) then
tmp = t_1
else if (t <= (-1.92d-112)) then
tmp = (x / a) / (y * exp(b))
else if (t <= 6.2d+33) then
tmp = ((x * (z ** y)) / a) / y
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * (Math.pow(a, t) / y);
double tmp;
if (t <= -8.2e+14) {
tmp = t_1;
} else if (t <= -1.92e-112) {
tmp = (x / a) / (y * Math.exp(b));
} else if (t <= 6.2e+33) {
tmp = ((x * Math.pow(z, y)) / a) / y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * (math.pow(a, t) / y) tmp = 0 if t <= -8.2e+14: tmp = t_1 elif t <= -1.92e-112: tmp = (x / a) / (y * math.exp(b)) elif t <= 6.2e+33: tmp = ((x * math.pow(z, y)) / a) / y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * Float64((a ^ t) / y)) tmp = 0.0 if (t <= -8.2e+14) tmp = t_1; elseif (t <= -1.92e-112) tmp = Float64(Float64(x / a) / Float64(y * exp(b))); elseif (t <= 6.2e+33) tmp = Float64(Float64(Float64(x * (z ^ y)) / a) / y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * ((a ^ t) / y); tmp = 0.0; if (t <= -8.2e+14) tmp = t_1; elseif (t <= -1.92e-112) tmp = (x / a) / (y * exp(b)); elseif (t <= 6.2e+33) tmp = ((x * (z ^ y)) / a) / y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(N[Power[a, t], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.2e+14], t$95$1, If[LessEqual[t, -1.92e-112], N[(N[(x / a), $MachinePrecision] / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.2e+33], N[(N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{{a}^{t}}{y}\\
\mathbf{if}\;t \leq -8.2 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.92 \cdot 10^{-112}:\\
\;\;\;\;\frac{\frac{x}{a}}{y \cdot e^{b}}\\
\mathbf{elif}\;t \leq 6.2 \cdot 10^{+33}:\\
\;\;\;\;\frac{\frac{x \cdot {z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -8.2e14 or 6.2e33 < t Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum78.8%
associate-/l*78.8%
*-commutative78.8%
exp-to-pow78.8%
exp-diff69.5%
*-commutative69.5%
exp-to-pow69.5%
sub-neg69.5%
metadata-eval69.5%
Simplified69.5%
Taylor expanded in y around 0 81.5%
associate-/l*81.5%
associate-/r*81.5%
exp-to-pow81.5%
sub-neg81.5%
metadata-eval81.5%
Simplified81.5%
Taylor expanded in b around 0 90.0%
sub-neg90.0%
metadata-eval90.0%
exp-to-pow90.0%
associate-*r/90.0%
+-commutative90.0%
Simplified90.0%
Taylor expanded in t around inf 90.0%
if -8.2e14 < t < -1.9200000000000001e-112Initial program 97.5%
Taylor expanded in t around 0 97.5%
+-commutative97.5%
mul-1-neg97.5%
unsub-neg97.5%
Simplified97.5%
Taylor expanded in x around 0 97.5%
associate-/l*91.0%
associate--r+91.0%
remove-double-neg91.0%
log-rec91.0%
mul-1-neg91.0%
associate--r+91.0%
Simplified76.7%
Taylor expanded in y around 0 81.4%
associate-/r*96.1%
Simplified96.1%
if -1.9200000000000001e-112 < t < 6.2e33Initial program 98.1%
Taylor expanded in b around 0 74.7%
exp-sum72.9%
*-commutative72.9%
exp-to-pow72.9%
exp-to-pow73.6%
sub-neg73.6%
metadata-eval73.6%
Simplified73.6%
Taylor expanded in t around 0 75.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (/ (pow a t) y))))
(if (<= t -80000000.0)
t_1
(if (<= t 1.1e-173)
(/ (/ x a) (* y (exp b)))
(if (<= t 4.7e+33) (/ (* x (exp (- b))) y) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * (pow(a, t) / y);
double tmp;
if (t <= -80000000.0) {
tmp = t_1;
} else if (t <= 1.1e-173) {
tmp = (x / a) / (y * exp(b));
} else if (t <= 4.7e+33) {
tmp = (x * exp(-b)) / y;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x * ((a ** t) / y)
if (t <= (-80000000.0d0)) then
tmp = t_1
else if (t <= 1.1d-173) then
tmp = (x / a) / (y * exp(b))
else if (t <= 4.7d+33) then
tmp = (x * exp(-b)) / y
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * (Math.pow(a, t) / y);
double tmp;
if (t <= -80000000.0) {
tmp = t_1;
} else if (t <= 1.1e-173) {
tmp = (x / a) / (y * Math.exp(b));
} else if (t <= 4.7e+33) {
tmp = (x * Math.exp(-b)) / y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * (math.pow(a, t) / y) tmp = 0 if t <= -80000000.0: tmp = t_1 elif t <= 1.1e-173: tmp = (x / a) / (y * math.exp(b)) elif t <= 4.7e+33: tmp = (x * math.exp(-b)) / y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * Float64((a ^ t) / y)) tmp = 0.0 if (t <= -80000000.0) tmp = t_1; elseif (t <= 1.1e-173) tmp = Float64(Float64(x / a) / Float64(y * exp(b))); elseif (t <= 4.7e+33) tmp = Float64(Float64(x * exp(Float64(-b))) / y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * ((a ^ t) / y); tmp = 0.0; if (t <= -80000000.0) tmp = t_1; elseif (t <= 1.1e-173) tmp = (x / a) / (y * exp(b)); elseif (t <= 4.7e+33) tmp = (x * exp(-b)) / y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(N[Power[a, t], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -80000000.0], t$95$1, If[LessEqual[t, 1.1e-173], N[(N[(x / a), $MachinePrecision] / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.7e+33], N[(N[(x * N[Exp[(-b)], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{{a}^{t}}{y}\\
\mathbf{if}\;t \leq -80000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{-173}:\\
\;\;\;\;\frac{\frac{x}{a}}{y \cdot e^{b}}\\
\mathbf{elif}\;t \leq 4.7 \cdot 10^{+33}:\\
\;\;\;\;\frac{x \cdot e^{-b}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -8e7 or 4.6999999999999998e33 < t Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum78.8%
associate-/l*78.8%
*-commutative78.8%
exp-to-pow78.8%
exp-diff69.5%
*-commutative69.5%
exp-to-pow69.5%
sub-neg69.5%
metadata-eval69.5%
Simplified69.5%
Taylor expanded in y around 0 81.5%
associate-/l*81.5%
associate-/r*81.5%
exp-to-pow81.5%
sub-neg81.5%
metadata-eval81.5%
Simplified81.5%
Taylor expanded in b around 0 90.0%
sub-neg90.0%
metadata-eval90.0%
exp-to-pow90.0%
associate-*r/90.0%
+-commutative90.0%
Simplified90.0%
Taylor expanded in t around inf 90.0%
if -8e7 < t < 1.1e-173Initial program 97.3%
Taylor expanded in t around 0 97.3%
+-commutative97.3%
mul-1-neg97.3%
unsub-neg97.3%
Simplified97.3%
Taylor expanded in x around 0 97.3%
associate-/l*93.6%
associate--r+93.6%
remove-double-neg93.6%
log-rec93.6%
mul-1-neg93.6%
associate--r+93.6%
Simplified79.7%
Taylor expanded in y around 0 67.5%
associate-/r*73.3%
Simplified73.3%
if 1.1e-173 < t < 4.6999999999999998e33Initial program 99.6%
Taylor expanded in t around 0 99.0%
+-commutative99.0%
mul-1-neg99.0%
unsub-neg99.0%
Simplified99.0%
Taylor expanded in b around inf 69.3%
neg-mul-169.3%
Simplified69.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (/ (pow a t) y))))
(if (<= t -9.5e-5)
t_1
(if (<= t -1.85e-97)
(/ (/ x a) y)
(if (<= t 9.3e+33) (/ (* x (exp (- b))) y) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * (pow(a, t) / y);
double tmp;
if (t <= -9.5e-5) {
tmp = t_1;
} else if (t <= -1.85e-97) {
tmp = (x / a) / y;
} else if (t <= 9.3e+33) {
tmp = (x * exp(-b)) / y;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x * ((a ** t) / y)
if (t <= (-9.5d-5)) then
tmp = t_1
else if (t <= (-1.85d-97)) then
tmp = (x / a) / y
else if (t <= 9.3d+33) then
tmp = (x * exp(-b)) / y
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * (Math.pow(a, t) / y);
double tmp;
if (t <= -9.5e-5) {
tmp = t_1;
} else if (t <= -1.85e-97) {
tmp = (x / a) / y;
} else if (t <= 9.3e+33) {
tmp = (x * Math.exp(-b)) / y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * (math.pow(a, t) / y) tmp = 0 if t <= -9.5e-5: tmp = t_1 elif t <= -1.85e-97: tmp = (x / a) / y elif t <= 9.3e+33: tmp = (x * math.exp(-b)) / y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * Float64((a ^ t) / y)) tmp = 0.0 if (t <= -9.5e-5) tmp = t_1; elseif (t <= -1.85e-97) tmp = Float64(Float64(x / a) / y); elseif (t <= 9.3e+33) tmp = Float64(Float64(x * exp(Float64(-b))) / y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * ((a ^ t) / y); tmp = 0.0; if (t <= -9.5e-5) tmp = t_1; elseif (t <= -1.85e-97) tmp = (x / a) / y; elseif (t <= 9.3e+33) tmp = (x * exp(-b)) / y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(N[Power[a, t], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9.5e-5], t$95$1, If[LessEqual[t, -1.85e-97], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 9.3e+33], N[(N[(x * N[Exp[(-b)], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{{a}^{t}}{y}\\
\mathbf{if}\;t \leq -9.5 \cdot 10^{-5}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.85 \cdot 10^{-97}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\mathbf{elif}\;t \leq 9.3 \cdot 10^{+33}:\\
\;\;\;\;\frac{x \cdot e^{-b}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -9.5000000000000005e-5 or 9.30000000000000001e33 < t Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum77.0%
associate-/l*77.0%
*-commutative77.0%
exp-to-pow77.0%
exp-diff68.0%
*-commutative68.0%
exp-to-pow68.0%
sub-neg68.0%
metadata-eval68.0%
Simplified68.0%
Taylor expanded in y around 0 81.3%
associate-/l*81.3%
associate-/r*80.4%
exp-to-pow80.4%
sub-neg80.4%
metadata-eval80.4%
Simplified80.4%
Taylor expanded in b around 0 88.7%
sub-neg88.7%
metadata-eval88.7%
exp-to-pow88.7%
associate-*r/88.7%
+-commutative88.7%
Simplified88.7%
Taylor expanded in t around inf 88.7%
if -9.5000000000000005e-5 < t < -1.84999999999999988e-97Initial program 96.6%
Taylor expanded in b around 0 77.2%
exp-sum77.2%
*-commutative77.2%
exp-to-pow77.2%
exp-to-pow80.4%
sub-neg80.4%
metadata-eval80.4%
Simplified80.4%
Taylor expanded in t around 0 80.5%
Taylor expanded in y around 0 74.1%
if -1.84999999999999988e-97 < t < 9.30000000000000001e33Initial program 98.1%
Taylor expanded in t around 0 97.9%
+-commutative97.9%
mul-1-neg97.9%
unsub-neg97.9%
Simplified97.9%
Taylor expanded in b around inf 53.6%
neg-mul-153.6%
Simplified53.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (/ (pow a t) y))))
(if (<= t -0.00038)
t_1
(if (<= t 3.2e-201)
(/ (/ x a) y)
(if (<= t 4.2e+33) (/ (* x (+ 1.0 (* b (+ -1.0 (* b 0.5))))) y) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * (pow(a, t) / y);
double tmp;
if (t <= -0.00038) {
tmp = t_1;
} else if (t <= 3.2e-201) {
tmp = (x / a) / y;
} else if (t <= 4.2e+33) {
tmp = (x * (1.0 + (b * (-1.0 + (b * 0.5))))) / y;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x * ((a ** t) / y)
if (t <= (-0.00038d0)) then
tmp = t_1
else if (t <= 3.2d-201) then
tmp = (x / a) / y
else if (t <= 4.2d+33) then
tmp = (x * (1.0d0 + (b * ((-1.0d0) + (b * 0.5d0))))) / y
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * (Math.pow(a, t) / y);
double tmp;
if (t <= -0.00038) {
tmp = t_1;
} else if (t <= 3.2e-201) {
tmp = (x / a) / y;
} else if (t <= 4.2e+33) {
tmp = (x * (1.0 + (b * (-1.0 + (b * 0.5))))) / y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * (math.pow(a, t) / y) tmp = 0 if t <= -0.00038: tmp = t_1 elif t <= 3.2e-201: tmp = (x / a) / y elif t <= 4.2e+33: tmp = (x * (1.0 + (b * (-1.0 + (b * 0.5))))) / y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * Float64((a ^ t) / y)) tmp = 0.0 if (t <= -0.00038) tmp = t_1; elseif (t <= 3.2e-201) tmp = Float64(Float64(x / a) / y); elseif (t <= 4.2e+33) tmp = Float64(Float64(x * Float64(1.0 + Float64(b * Float64(-1.0 + Float64(b * 0.5))))) / y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * ((a ^ t) / y); tmp = 0.0; if (t <= -0.00038) tmp = t_1; elseif (t <= 3.2e-201) tmp = (x / a) / y; elseif (t <= 4.2e+33) tmp = (x * (1.0 + (b * (-1.0 + (b * 0.5))))) / y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(N[Power[a, t], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -0.00038], t$95$1, If[LessEqual[t, 3.2e-201], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 4.2e+33], N[(N[(x * N[(1.0 + N[(b * N[(-1.0 + N[(b * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{{a}^{t}}{y}\\
\mathbf{if}\;t \leq -0.00038:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{-201}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\mathbf{elif}\;t \leq 4.2 \cdot 10^{+33}:\\
\;\;\;\;\frac{x \cdot \left(1 + b \cdot \left(-1 + b \cdot 0.5\right)\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.8000000000000002e-4 or 4.2000000000000001e33 < t Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum77.0%
associate-/l*77.0%
*-commutative77.0%
exp-to-pow77.0%
exp-diff68.0%
*-commutative68.0%
exp-to-pow68.0%
sub-neg68.0%
metadata-eval68.0%
Simplified68.0%
Taylor expanded in y around 0 81.3%
associate-/l*81.3%
associate-/r*80.4%
exp-to-pow80.4%
sub-neg80.4%
metadata-eval80.4%
Simplified80.4%
Taylor expanded in b around 0 88.7%
sub-neg88.7%
metadata-eval88.7%
exp-to-pow88.7%
associate-*r/88.7%
+-commutative88.7%
Simplified88.7%
Taylor expanded in t around inf 88.7%
if -3.8000000000000002e-4 < t < 3.2000000000000001e-201Initial program 97.0%
Taylor expanded in b around 0 73.3%
exp-sum73.3%
*-commutative73.3%
exp-to-pow73.3%
exp-to-pow74.8%
sub-neg74.8%
metadata-eval74.8%
Simplified74.8%
Taylor expanded in t around 0 74.8%
Taylor expanded in y around 0 42.5%
if 3.2000000000000001e-201 < t < 4.2000000000000001e33Initial program 99.6%
Taylor expanded in t around 0 99.1%
+-commutative99.1%
mul-1-neg99.1%
unsub-neg99.1%
Simplified99.1%
Taylor expanded in b around inf 67.8%
neg-mul-167.8%
Simplified67.8%
Taylor expanded in b around 0 49.6%
Final simplification65.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1.6e+14) (not (<= t 4.4e+33))) (* x (/ (pow a t) y)) (/ (* x (/ (exp (- b)) a)) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.6e+14) || !(t <= 4.4e+33)) {
tmp = x * (pow(a, t) / y);
} else {
tmp = (x * (exp(-b) / a)) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-1.6d+14)) .or. (.not. (t <= 4.4d+33))) then
tmp = x * ((a ** t) / y)
else
tmp = (x * (exp(-b) / a)) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.6e+14) || !(t <= 4.4e+33)) {
tmp = x * (Math.pow(a, t) / y);
} else {
tmp = (x * (Math.exp(-b) / a)) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.6e+14) or not (t <= 4.4e+33): tmp = x * (math.pow(a, t) / y) else: tmp = (x * (math.exp(-b) / a)) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1.6e+14) || !(t <= 4.4e+33)) tmp = Float64(x * Float64((a ^ t) / y)); else tmp = Float64(Float64(x * Float64(exp(Float64(-b)) / a)) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -1.6e+14) || ~((t <= 4.4e+33))) tmp = x * ((a ^ t) / y); else tmp = (x * (exp(-b) / a)) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1.6e+14], N[Not[LessEqual[t, 4.4e+33]], $MachinePrecision]], N[(x * N[(N[Power[a, t], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[Exp[(-b)], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.6 \cdot 10^{+14} \lor \neg \left(t \leq 4.4 \cdot 10^{+33}\right):\\
\;\;\;\;x \cdot \frac{{a}^{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \frac{e^{-b}}{a}}{y}\\
\end{array}
\end{array}
if t < -1.6e14 or 4.39999999999999988e33 < t Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum78.8%
associate-/l*78.8%
*-commutative78.8%
exp-to-pow78.8%
exp-diff69.5%
*-commutative69.5%
exp-to-pow69.5%
sub-neg69.5%
metadata-eval69.5%
Simplified69.5%
Taylor expanded in y around 0 81.5%
associate-/l*81.5%
associate-/r*81.5%
exp-to-pow81.5%
sub-neg81.5%
metadata-eval81.5%
Simplified81.5%
Taylor expanded in b around 0 90.0%
sub-neg90.0%
metadata-eval90.0%
exp-to-pow90.0%
associate-*r/90.0%
+-commutative90.0%
Simplified90.0%
Taylor expanded in t around inf 90.0%
if -1.6e14 < t < 4.39999999999999988e33Initial program 98.0%
Taylor expanded in t around 0 97.8%
+-commutative97.8%
mul-1-neg97.8%
unsub-neg97.8%
Simplified97.8%
Taylor expanded in y around 0 70.9%
distribute-neg-in70.9%
sub-neg70.9%
exp-diff71.0%
rem-exp-log72.0%
Simplified72.0%
Final simplification80.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -190000000000.0) (not (<= t 4.2e+33))) (* x (/ (pow a t) y)) (/ x (* a (* y (exp b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -190000000000.0) || !(t <= 4.2e+33)) {
tmp = x * (pow(a, t) / y);
} else {
tmp = x / (a * (y * exp(b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-190000000000.0d0)) .or. (.not. (t <= 4.2d+33))) then
tmp = x * ((a ** t) / y)
else
tmp = x / (a * (y * exp(b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -190000000000.0) || !(t <= 4.2e+33)) {
tmp = x * (Math.pow(a, t) / y);
} else {
tmp = x / (a * (y * Math.exp(b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -190000000000.0) or not (t <= 4.2e+33): tmp = x * (math.pow(a, t) / y) else: tmp = x / (a * (y * math.exp(b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -190000000000.0) || !(t <= 4.2e+33)) tmp = Float64(x * Float64((a ^ t) / y)); else tmp = Float64(x / Float64(a * Float64(y * exp(b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -190000000000.0) || ~((t <= 4.2e+33))) tmp = x * ((a ^ t) / y); else tmp = x / (a * (y * exp(b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -190000000000.0], N[Not[LessEqual[t, 4.2e+33]], $MachinePrecision]], N[(x * N[(N[Power[a, t], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -190000000000 \lor \neg \left(t \leq 4.2 \cdot 10^{+33}\right):\\
\;\;\;\;x \cdot \frac{{a}^{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\end{array}
\end{array}
if t < -1.9e11 or 4.2000000000000001e33 < t Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum78.8%
associate-/l*78.8%
*-commutative78.8%
exp-to-pow78.8%
exp-diff69.5%
*-commutative69.5%
exp-to-pow69.5%
sub-neg69.5%
metadata-eval69.5%
Simplified69.5%
Taylor expanded in y around 0 81.5%
associate-/l*81.5%
associate-/r*81.5%
exp-to-pow81.5%
sub-neg81.5%
metadata-eval81.5%
Simplified81.5%
Taylor expanded in b around 0 90.0%
sub-neg90.0%
metadata-eval90.0%
exp-to-pow90.0%
associate-*r/90.0%
+-commutative90.0%
Simplified90.0%
Taylor expanded in t around inf 90.0%
if -1.9e11 < t < 4.2000000000000001e33Initial program 98.0%
associate-/l*94.9%
associate--l+94.9%
exp-sum81.2%
associate-/l*77.5%
*-commutative77.5%
exp-to-pow77.5%
exp-diff76.1%
*-commutative76.1%
exp-to-pow77.0%
sub-neg77.0%
metadata-eval77.0%
Simplified77.0%
Taylor expanded in y around 0 65.4%
associate-/l*64.5%
associate-/r*59.4%
exp-to-pow60.2%
sub-neg60.2%
metadata-eval60.2%
Simplified60.2%
Taylor expanded in t around 0 67.5%
Final simplification77.8%
(FPCore (x y z t a b) :precision binary64 (if (<= b -550000.0) (/ (* x (+ 1.0 (* b (+ -1.0 (* b (+ 0.5 (* b -0.16666666666666666))))))) y) (/ (/ x a) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -550000.0) {
tmp = (x * (1.0 + (b * (-1.0 + (b * (0.5 + (b * -0.16666666666666666))))))) / y;
} else {
tmp = (x / a) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-550000.0d0)) then
tmp = (x * (1.0d0 + (b * ((-1.0d0) + (b * (0.5d0 + (b * (-0.16666666666666666d0)))))))) / y
else
tmp = (x / a) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -550000.0) {
tmp = (x * (1.0 + (b * (-1.0 + (b * (0.5 + (b * -0.16666666666666666))))))) / y;
} else {
tmp = (x / a) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -550000.0: tmp = (x * (1.0 + (b * (-1.0 + (b * (0.5 + (b * -0.16666666666666666))))))) / y else: tmp = (x / a) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -550000.0) tmp = Float64(Float64(x * Float64(1.0 + Float64(b * Float64(-1.0 + Float64(b * Float64(0.5 + Float64(b * -0.16666666666666666))))))) / y); else tmp = Float64(Float64(x / a) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -550000.0) tmp = (x * (1.0 + (b * (-1.0 + (b * (0.5 + (b * -0.16666666666666666))))))) / y; else tmp = (x / a) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -550000.0], N[(N[(x * N[(1.0 + N[(b * N[(-1.0 + N[(b * N[(0.5 + N[(b * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -550000:\\
\;\;\;\;\frac{x \cdot \left(1 + b \cdot \left(-1 + b \cdot \left(0.5 + b \cdot -0.16666666666666666\right)\right)\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\end{array}
\end{array}
if b < -5.5e5Initial program 100.0%
Taylor expanded in t around 0 90.2%
+-commutative90.2%
mul-1-neg90.2%
unsub-neg90.2%
Simplified90.2%
Taylor expanded in b around inf 83.6%
neg-mul-183.6%
Simplified83.6%
Taylor expanded in b around 0 77.3%
if -5.5e5 < b Initial program 98.6%
Taylor expanded in b around 0 89.6%
exp-sum80.4%
*-commutative80.4%
exp-to-pow80.4%
exp-to-pow81.1%
sub-neg81.1%
metadata-eval81.1%
Simplified81.1%
Taylor expanded in t around 0 65.5%
Taylor expanded in y around 0 35.6%
Final simplification45.4%
(FPCore (x y z t a b) :precision binary64 (if (<= b -370.0) (/ (* x (+ 1.0 (* b (+ -1.0 (* b 0.5))))) y) (/ (/ x a) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -370.0) {
tmp = (x * (1.0 + (b * (-1.0 + (b * 0.5))))) / y;
} else {
tmp = (x / a) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-370.0d0)) then
tmp = (x * (1.0d0 + (b * ((-1.0d0) + (b * 0.5d0))))) / y
else
tmp = (x / a) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -370.0) {
tmp = (x * (1.0 + (b * (-1.0 + (b * 0.5))))) / y;
} else {
tmp = (x / a) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -370.0: tmp = (x * (1.0 + (b * (-1.0 + (b * 0.5))))) / y else: tmp = (x / a) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -370.0) tmp = Float64(Float64(x * Float64(1.0 + Float64(b * Float64(-1.0 + Float64(b * 0.5))))) / y); else tmp = Float64(Float64(x / a) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -370.0) tmp = (x * (1.0 + (b * (-1.0 + (b * 0.5))))) / y; else tmp = (x / a) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -370.0], N[(N[(x * N[(1.0 + N[(b * N[(-1.0 + N[(b * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -370:\\
\;\;\;\;\frac{x \cdot \left(1 + b \cdot \left(-1 + b \cdot 0.5\right)\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\end{array}
\end{array}
if b < -370Initial program 100.0%
Taylor expanded in t around 0 90.2%
+-commutative90.2%
mul-1-neg90.2%
unsub-neg90.2%
Simplified90.2%
Taylor expanded in b around inf 83.6%
neg-mul-183.6%
Simplified83.6%
Taylor expanded in b around 0 70.9%
if -370 < b Initial program 98.6%
Taylor expanded in b around 0 89.6%
exp-sum80.4%
*-commutative80.4%
exp-to-pow80.4%
exp-to-pow81.1%
sub-neg81.1%
metadata-eval81.1%
Simplified81.1%
Taylor expanded in t around 0 65.5%
Taylor expanded in y around 0 35.6%
Final simplification43.9%
(FPCore (x y z t a b) :precision binary64 (if (<= b -310.0) (+ (/ x y) (* b (* (* b 0.5) (/ x y)))) (/ (/ x a) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -310.0) {
tmp = (x / y) + (b * ((b * 0.5) * (x / y)));
} else {
tmp = (x / a) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-310.0d0)) then
tmp = (x / y) + (b * ((b * 0.5d0) * (x / y)))
else
tmp = (x / a) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -310.0) {
tmp = (x / y) + (b * ((b * 0.5) * (x / y)));
} else {
tmp = (x / a) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -310.0: tmp = (x / y) + (b * ((b * 0.5) * (x / y))) else: tmp = (x / a) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -310.0) tmp = Float64(Float64(x / y) + Float64(b * Float64(Float64(b * 0.5) * Float64(x / y)))); else tmp = Float64(Float64(x / a) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -310.0) tmp = (x / y) + (b * ((b * 0.5) * (x / y))); else tmp = (x / a) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -310.0], N[(N[(x / y), $MachinePrecision] + N[(b * N[(N[(b * 0.5), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -310:\\
\;\;\;\;\frac{x}{y} + b \cdot \left(\left(b \cdot 0.5\right) \cdot \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\end{array}
\end{array}
if b < -310Initial program 100.0%
Taylor expanded in t around 0 90.2%
+-commutative90.2%
mul-1-neg90.2%
unsub-neg90.2%
Simplified90.2%
Taylor expanded in b around inf 83.6%
neg-mul-183.6%
Simplified83.6%
Taylor expanded in b around 0 55.2%
Taylor expanded in b around inf 55.2%
associate-*r/53.7%
associate-*r*53.7%
Simplified53.7%
if -310 < b Initial program 98.6%
Taylor expanded in b around 0 89.6%
exp-sum80.4%
*-commutative80.4%
exp-to-pow80.4%
exp-to-pow81.1%
sub-neg81.1%
metadata-eval81.1%
Simplified81.1%
Taylor expanded in t around 0 65.5%
Taylor expanded in y around 0 35.6%
Final simplification39.9%
(FPCore (x y z t a b) :precision binary64 (if (<= x 7.4e+116) (/ (/ x a) y) (/ (* b (- (/ x b) x)) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= 7.4e+116) {
tmp = (x / a) / y;
} else {
tmp = (b * ((x / b) - x)) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (x <= 7.4d+116) then
tmp = (x / a) / y
else
tmp = (b * ((x / b) - x)) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= 7.4e+116) {
tmp = (x / a) / y;
} else {
tmp = (b * ((x / b) - x)) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= 7.4e+116: tmp = (x / a) / y else: tmp = (b * ((x / b) - x)) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= 7.4e+116) tmp = Float64(Float64(x / a) / y); else tmp = Float64(Float64(b * Float64(Float64(x / b) - x)) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= 7.4e+116) tmp = (x / a) / y; else tmp = (b * ((x / b) - x)) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, 7.4e+116], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision], N[(N[(b * N[(N[(x / b), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 7.4 \cdot 10^{+116}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{b \cdot \left(\frac{x}{b} - x\right)}{y}\\
\end{array}
\end{array}
if x < 7.4000000000000003e116Initial program 98.8%
Taylor expanded in b around 0 81.8%
exp-sum72.6%
*-commutative72.6%
exp-to-pow72.6%
exp-to-pow73.2%
sub-neg73.2%
metadata-eval73.2%
Simplified73.2%
Taylor expanded in t around 0 61.4%
Taylor expanded in y around 0 31.9%
if 7.4000000000000003e116 < x Initial program 99.9%
Taylor expanded in t around 0 76.9%
+-commutative76.9%
mul-1-neg76.9%
unsub-neg76.9%
Simplified76.9%
Taylor expanded in b around inf 56.8%
neg-mul-156.8%
Simplified56.8%
Taylor expanded in b around 0 43.9%
mul-1-neg43.9%
unsub-neg43.9%
Simplified43.9%
Taylor expanded in b around inf 48.8%
neg-mul-148.8%
+-commutative48.8%
unsub-neg48.8%
Simplified48.8%
(FPCore (x y z t a b) :precision binary64 (if (<= b -460000.0) (/ (* x (- b)) y) (/ (/ x a) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -460000.0) {
tmp = (x * -b) / y;
} else {
tmp = (x / a) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-460000.0d0)) then
tmp = (x * -b) / y
else
tmp = (x / a) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -460000.0) {
tmp = (x * -b) / y;
} else {
tmp = (x / a) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -460000.0: tmp = (x * -b) / y else: tmp = (x / a) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -460000.0) tmp = Float64(Float64(x * Float64(-b)) / y); else tmp = Float64(Float64(x / a) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -460000.0) tmp = (x * -b) / y; else tmp = (x / a) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -460000.0], N[(N[(x * (-b)), $MachinePrecision] / y), $MachinePrecision], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -460000:\\
\;\;\;\;\frac{x \cdot \left(-b\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\end{array}
\end{array}
if b < -4.6e5Initial program 100.0%
Taylor expanded in t around 0 90.2%
+-commutative90.2%
mul-1-neg90.2%
unsub-neg90.2%
Simplified90.2%
Taylor expanded in b around inf 83.6%
neg-mul-183.6%
Simplified83.6%
Taylor expanded in b around 0 39.3%
mul-1-neg39.3%
unsub-neg39.3%
Simplified39.3%
Taylor expanded in b around inf 39.3%
associate-*r/39.3%
mul-1-neg39.3%
*-commutative39.3%
distribute-rgt-neg-in39.3%
Simplified39.3%
if -4.6e5 < b Initial program 98.6%
Taylor expanded in b around 0 89.6%
exp-sum80.4%
*-commutative80.4%
exp-to-pow80.4%
exp-to-pow81.1%
sub-neg81.1%
metadata-eval81.1%
Simplified81.1%
Taylor expanded in t around 0 65.5%
Taylor expanded in y around 0 35.6%
(FPCore (x y z t a b) :precision binary64 (if (<= b -370000.0) (* b (/ x (- y))) (/ (/ x a) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -370000.0) {
tmp = b * (x / -y);
} else {
tmp = (x / a) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-370000.0d0)) then
tmp = b * (x / -y)
else
tmp = (x / a) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -370000.0) {
tmp = b * (x / -y);
} else {
tmp = (x / a) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -370000.0: tmp = b * (x / -y) else: tmp = (x / a) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -370000.0) tmp = Float64(b * Float64(x / Float64(-y))); else tmp = Float64(Float64(x / a) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -370000.0) tmp = b * (x / -y); else tmp = (x / a) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -370000.0], N[(b * N[(x / (-y)), $MachinePrecision]), $MachinePrecision], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -370000:\\
\;\;\;\;b \cdot \frac{x}{-y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\end{array}
\end{array}
if b < -3.7e5Initial program 100.0%
Taylor expanded in t around 0 90.2%
+-commutative90.2%
mul-1-neg90.2%
unsub-neg90.2%
Simplified90.2%
Taylor expanded in b around inf 83.6%
neg-mul-183.6%
Simplified83.6%
Taylor expanded in b around 0 39.3%
mul-1-neg39.3%
unsub-neg39.3%
Simplified39.3%
Taylor expanded in b around inf 39.3%
mul-1-neg39.3%
associate-*r/33.1%
*-commutative33.1%
distribute-rgt-neg-in33.1%
Simplified33.1%
if -3.7e5 < b Initial program 98.6%
Taylor expanded in b around 0 89.6%
exp-sum80.4%
*-commutative80.4%
exp-to-pow80.4%
exp-to-pow81.1%
sub-neg81.1%
metadata-eval81.1%
Simplified81.1%
Taylor expanded in t around 0 65.5%
Taylor expanded in y around 0 35.6%
Final simplification35.0%
(FPCore (x y z t a b) :precision binary64 (if (<= t 1e+88) (/ (/ x a) y) (/ x y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= 1e+88) {
tmp = (x / a) / y;
} else {
tmp = x / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= 1d+88) then
tmp = (x / a) / y
else
tmp = x / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= 1e+88) {
tmp = (x / a) / y;
} else {
tmp = x / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= 1e+88: tmp = (x / a) / y else: tmp = x / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= 1e+88) tmp = Float64(Float64(x / a) / y); else tmp = Float64(x / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= 1e+88) tmp = (x / a) / y; else tmp = x / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, 1e+88], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision], N[(x / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 10^{+88}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\end{array}
if t < 9.99999999999999959e87Initial program 98.7%
Taylor expanded in b around 0 78.7%
exp-sum71.6%
*-commutative71.6%
exp-to-pow71.6%
exp-to-pow72.2%
sub-neg72.2%
metadata-eval72.2%
Simplified72.2%
Taylor expanded in t around 0 65.5%
Taylor expanded in y around 0 37.7%
if 9.99999999999999959e87 < t Initial program 100.0%
Taylor expanded in t around 0 53.4%
+-commutative53.4%
mul-1-neg53.4%
unsub-neg53.4%
Simplified53.4%
Taylor expanded in b around inf 41.3%
neg-mul-141.3%
Simplified41.3%
Taylor expanded in b around 0 14.2%
(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.9%
associate-/l*97.3%
associate--l+97.3%
exp-sum80.1%
associate-/l*78.1%
*-commutative78.1%
exp-to-pow78.1%
exp-diff73.1%
*-commutative73.1%
exp-to-pow73.5%
sub-neg73.5%
metadata-eval73.5%
Simplified73.5%
Taylor expanded in y around 0 72.8%
associate-/l*72.3%
associate-/r*69.6%
exp-to-pow70.0%
sub-neg70.0%
metadata-eval70.0%
Simplified70.0%
Taylor expanded in b around 0 61.6%
sub-neg61.6%
metadata-eval61.6%
exp-to-pow62.1%
associate-*r/60.6%
+-commutative60.6%
Simplified60.6%
Taylor expanded in t around 0 30.7%
*-commutative30.7%
Simplified30.7%
(FPCore (x y z t a b) :precision binary64 (/ x y))
double code(double x, double y, double z, double t, double a, double b) {
return x / 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 / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x / y;
}
def code(x, y, z, t, a, b): return x / y
function code(x, y, z, t, a, b) return Float64(x / y) end
function tmp = code(x, y, z, t, a, b) tmp = x / y; end
code[x_, y_, z_, t_, a_, b_] := N[(x / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y}
\end{array}
Initial program 98.9%
Taylor expanded in t around 0 81.4%
+-commutative81.4%
mul-1-neg81.4%
unsub-neg81.4%
Simplified81.4%
Taylor expanded in b around inf 48.3%
neg-mul-148.3%
Simplified48.3%
Taylor expanded in b around 0 16.5%
(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 2024165
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:incompleteBetaWorker from math-functions-0.1.5.2, A"
:precision binary64
:alt
(! :herbie-platform default (if (< t -8845848504127471/10000000000000000) (/ (* x (/ (pow a (- t 1)) y)) (- (+ b 1) (* y (log z)))) (if (< t 8520312288374073/10000000000) (/ (* (/ x y) (pow a (- t 1))) (exp (- b (* (log z) y)))) (/ (* x (/ (pow a (- t 1)) y)) (- (+ b 1) (* y (log z)))))))
(/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))