
(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 19 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 99.0%
Final simplification99.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= (+ t -1.0) -2e+42) (not (<= (+ t -1.0) -0.999995))) (/ (* x (exp (- (* (+ t -1.0) (log a)) b))) y) (/ (* x (exp (- (- (* y (log z)) (log a)) b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((t + -1.0) <= -2e+42) || !((t + -1.0) <= -0.999995)) {
tmp = (x * exp((((t + -1.0) * log(a)) - b))) / y;
} else {
tmp = (x * exp((((y * log(z)) - log(a)) - b))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (((t + (-1.0d0)) <= (-2d+42)) .or. (.not. ((t + (-1.0d0)) <= (-0.999995d0)))) then
tmp = (x * exp((((t + (-1.0d0)) * log(a)) - b))) / y
else
tmp = (x * exp((((y * log(z)) - log(a)) - b))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((t + -1.0) <= -2e+42) || !((t + -1.0) <= -0.999995)) {
tmp = (x * Math.exp((((t + -1.0) * Math.log(a)) - b))) / y;
} else {
tmp = (x * Math.exp((((y * Math.log(z)) - Math.log(a)) - b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if ((t + -1.0) <= -2e+42) or not ((t + -1.0) <= -0.999995): tmp = (x * math.exp((((t + -1.0) * math.log(a)) - b))) / y else: tmp = (x * math.exp((((y * math.log(z)) - math.log(a)) - b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((Float64(t + -1.0) <= -2e+42) || !(Float64(t + -1.0) <= -0.999995)) tmp = Float64(Float64(x * exp(Float64(Float64(Float64(t + -1.0) * log(a)) - b))) / y); else tmp = Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) - log(a)) - b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (((t + -1.0) <= -2e+42) || ~(((t + -1.0) <= -0.999995))) tmp = (x * exp((((t + -1.0) * log(a)) - b))) / y; else tmp = (x * exp((((y * log(z)) - log(a)) - b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[N[(t + -1.0), $MachinePrecision], -2e+42], N[Not[LessEqual[N[(t + -1.0), $MachinePrecision], -0.999995]], $MachinePrecision]], N[(N[(x * N[Exp[N[(N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] - N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t + -1 \leq -2 \cdot 10^{+42} \lor \neg \left(t + -1 \leq -0.999995\right):\\
\;\;\;\;\frac{x \cdot e^{\left(t + -1\right) \cdot \log a - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\left(y \cdot \log z - \log a\right) - b}}{y}\\
\end{array}
\end{array}
if (-.f64 t 1) < -2.00000000000000009e42 or -0.99999499999999997 < (-.f64 t 1) Initial program 99.9%
Taylor expanded in y around 0 93.7%
if -2.00000000000000009e42 < (-.f64 t 1) < -0.99999499999999997Initial program 98.1%
Taylor expanded in t around 0 97.4%
mul-1-neg97.4%
Simplified97.4%
Final simplification95.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (pow z y) a)) (t_2 (/ (* x (/ (pow a t) a)) y)))
(if (<= t -2.3e+42)
t_2
(if (<= t -2.25e-46)
(/ (* x t_1) y)
(if (<= t 6.5e+61) (* x (/ t_1 (* y (exp b)))) t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = pow(z, y) / a;
double t_2 = (x * (pow(a, t) / a)) / y;
double tmp;
if (t <= -2.3e+42) {
tmp = t_2;
} else if (t <= -2.25e-46) {
tmp = (x * t_1) / y;
} else if (t <= 6.5e+61) {
tmp = x * (t_1 / (y * exp(b)));
} 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 = (z ** y) / a
t_2 = (x * ((a ** t) / a)) / y
if (t <= (-2.3d+42)) then
tmp = t_2
else if (t <= (-2.25d-46)) then
tmp = (x * t_1) / y
else if (t <= 6.5d+61) then
tmp = x * (t_1 / (y * exp(b)))
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(z, y) / a;
double t_2 = (x * (Math.pow(a, t) / a)) / y;
double tmp;
if (t <= -2.3e+42) {
tmp = t_2;
} else if (t <= -2.25e-46) {
tmp = (x * t_1) / y;
} else if (t <= 6.5e+61) {
tmp = x * (t_1 / (y * Math.exp(b)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = math.pow(z, y) / a t_2 = (x * (math.pow(a, t) / a)) / y tmp = 0 if t <= -2.3e+42: tmp = t_2 elif t <= -2.25e-46: tmp = (x * t_1) / y elif t <= 6.5e+61: tmp = x * (t_1 / (y * math.exp(b))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64((z ^ y) / a) t_2 = Float64(Float64(x * Float64((a ^ t) / a)) / y) tmp = 0.0 if (t <= -2.3e+42) tmp = t_2; elseif (t <= -2.25e-46) tmp = Float64(Float64(x * t_1) / y); elseif (t <= 6.5e+61) tmp = Float64(x * Float64(t_1 / Float64(y * exp(b)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z ^ y) / a; t_2 = (x * ((a ^ t) / a)) / y; tmp = 0.0; if (t <= -2.3e+42) tmp = t_2; elseif (t <= -2.25e-46) tmp = (x * t_1) / y; elseif (t <= 6.5e+61) tmp = x * (t_1 / (y * exp(b))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[(N[Power[a, t], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t, -2.3e+42], t$95$2, If[LessEqual[t, -2.25e-46], N[(N[(x * t$95$1), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 6.5e+61], N[(x * N[(t$95$1 / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{{z}^{y}}{a}\\
t_2 := \frac{x \cdot \frac{{a}^{t}}{a}}{y}\\
\mathbf{if}\;t \leq -2.3 \cdot 10^{+42}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -2.25 \cdot 10^{-46}:\\
\;\;\;\;\frac{x \cdot t_1}{y}\\
\mathbf{elif}\;t \leq 6.5 \cdot 10^{+61}:\\
\;\;\;\;x \cdot \frac{t_1}{y \cdot e^{b}}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -2.3e42 or 6.4999999999999996e61 < t Initial program 100.0%
Taylor expanded in y around 0 93.6%
Taylor expanded in b around 0 86.3%
exp-to-pow86.3%
sub-neg86.3%
metadata-eval86.3%
distribute-rgt-in86.3%
mul-1-neg86.3%
sub-neg86.3%
log-pow86.3%
log-div86.3%
rem-exp-log86.3%
Simplified86.3%
if -2.3e42 < t < -2.25e-46Initial program 99.4%
Taylor expanded in t around 0 96.2%
mul-1-neg96.2%
Simplified96.2%
Taylor expanded in b around 0 85.7%
div-exp85.7%
*-commutative85.7%
exp-to-pow85.7%
rem-exp-log86.2%
Simplified86.2%
if -2.25e-46 < t < 6.4999999999999996e61Initial program 98.0%
associate-*r/97.0%
sub-neg97.0%
exp-sum84.5%
associate-/l*84.5%
associate-/r/84.5%
exp-neg84.5%
associate-*r/84.5%
Simplified82.5%
Taylor expanded in t around 0 84.5%
associate-/r*86.2%
Simplified86.2%
Final simplification86.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2.3e+211) (not (<= y 3.1e+26))) (/ (* 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 <= -2.3e+211) || !(y <= 3.1e+26)) {
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 <= (-2.3d+211)) .or. (.not. (y <= 3.1d+26))) 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 <= -2.3e+211) || !(y <= 3.1e+26)) {
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 <= -2.3e+211) or not (y <= 3.1e+26): 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 <= -2.3e+211) || !(y <= 3.1e+26)) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y); else tmp = Float64(Float64(x * exp(Float64(Float64(Float64(t + -1.0) * log(a)) - b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -2.3e+211) || ~((y <= 3.1e+26))) 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, -2.3e+211], N[Not[LessEqual[y, 3.1e+26]], $MachinePrecision]], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[Exp[N[(N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.3 \cdot 10^{+211} \lor \neg \left(y \leq 3.1 \cdot 10^{+26}\right):\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\left(t + -1\right) \cdot \log a - b}}{y}\\
\end{array}
\end{array}
if y < -2.30000000000000011e211 or 3.1e26 < y Initial program 100.0%
Taylor expanded in t around 0 94.8%
mul-1-neg94.8%
Simplified94.8%
Taylor expanded in b around 0 89.5%
div-exp89.5%
*-commutative89.5%
exp-to-pow89.5%
rem-exp-log89.5%
Simplified89.5%
if -2.30000000000000011e211 < y < 3.1e26Initial program 98.4%
Taylor expanded in y around 0 90.7%
Final simplification90.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (/ (pow a t) a) (/ x y))) (t_2 (/ (* x (/ (pow z y) a)) y)))
(if (<= y -13500000000.0)
t_2
(if (<= y 5.7e-213)
t_1
(if (<= y 1.42e-65)
(/ (/ (/ x a) (exp b)) y)
(if (<= y 58000.0) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (pow(a, t) / a) * (x / y);
double t_2 = (x * (pow(z, y) / a)) / y;
double tmp;
if (y <= -13500000000.0) {
tmp = t_2;
} else if (y <= 5.7e-213) {
tmp = t_1;
} else if (y <= 1.42e-65) {
tmp = ((x / a) / exp(b)) / y;
} else if (y <= 58000.0) {
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 = ((a ** t) / a) * (x / y)
t_2 = (x * ((z ** y) / a)) / y
if (y <= (-13500000000.0d0)) then
tmp = t_2
else if (y <= 5.7d-213) then
tmp = t_1
else if (y <= 1.42d-65) then
tmp = ((x / a) / exp(b)) / y
else if (y <= 58000.0d0) 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 = (Math.pow(a, t) / a) * (x / y);
double t_2 = (x * (Math.pow(z, y) / a)) / y;
double tmp;
if (y <= -13500000000.0) {
tmp = t_2;
} else if (y <= 5.7e-213) {
tmp = t_1;
} else if (y <= 1.42e-65) {
tmp = ((x / a) / Math.exp(b)) / y;
} else if (y <= 58000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (math.pow(a, t) / a) * (x / y) t_2 = (x * (math.pow(z, y) / a)) / y tmp = 0 if y <= -13500000000.0: tmp = t_2 elif y <= 5.7e-213: tmp = t_1 elif y <= 1.42e-65: tmp = ((x / a) / math.exp(b)) / y elif y <= 58000.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64((a ^ t) / a) * Float64(x / y)) t_2 = Float64(Float64(x * Float64((z ^ y) / a)) / y) tmp = 0.0 if (y <= -13500000000.0) tmp = t_2; elseif (y <= 5.7e-213) tmp = t_1; elseif (y <= 1.42e-65) tmp = Float64(Float64(Float64(x / a) / exp(b)) / y); elseif (y <= 58000.0) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((a ^ t) / a) * (x / y); t_2 = (x * ((z ^ y) / a)) / y; tmp = 0.0; if (y <= -13500000000.0) tmp = t_2; elseif (y <= 5.7e-213) tmp = t_1; elseif (y <= 1.42e-65) tmp = ((x / a) / exp(b)) / y; elseif (y <= 58000.0) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[Power[a, t], $MachinePrecision] / a), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -13500000000.0], t$95$2, If[LessEqual[y, 5.7e-213], t$95$1, If[LessEqual[y, 1.42e-65], N[(N[(N[(x / a), $MachinePrecision] / N[Exp[b], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 58000.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{{a}^{t}}{a} \cdot \frac{x}{y}\\
t_2 := \frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{if}\;y \leq -13500000000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 5.7 \cdot 10^{-213}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.42 \cdot 10^{-65}:\\
\;\;\;\;\frac{\frac{\frac{x}{a}}{e^{b}}}{y}\\
\mathbf{elif}\;y \leq 58000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -1.35e10 or 58000 < y Initial program 100.0%
Taylor expanded in t around 0 91.5%
mul-1-neg91.5%
Simplified91.5%
Taylor expanded in b around 0 82.3%
div-exp82.3%
*-commutative82.3%
exp-to-pow82.3%
rem-exp-log82.3%
Simplified82.3%
if -1.35e10 < y < 5.69999999999999994e-213 or 1.41999999999999993e-65 < y < 58000Initial program 97.7%
associate-*r/97.2%
sub-neg97.2%
exp-sum81.0%
associate-/l*81.0%
associate-/r/81.0%
exp-neg81.0%
associate-*r/81.0%
Simplified80.2%
Taylor expanded in y around 0 72.9%
*-commutative72.9%
associate-*l*72.9%
*-commutative72.9%
times-frac77.5%
Simplified77.5%
Taylor expanded in b around 0 79.6%
if 5.69999999999999994e-213 < y < 1.41999999999999993e-65Initial program 98.2%
Taylor expanded in y around 0 98.2%
Taylor expanded in t around 0 83.5%
sub-neg83.5%
mul-1-neg83.5%
distribute-neg-in83.5%
+-commutative83.5%
exp-neg83.5%
associate-*l/83.5%
*-lft-identity83.5%
+-commutative83.5%
exp-sum83.5%
rem-exp-log85.0%
associate-/r*85.0%
Simplified85.0%
Final simplification81.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (/ (pow z y) a)) y)) (t_2 (/ (* x (/ (pow a t) a)) y)))
(if (<= t -3.7e+42)
t_2
(if (<= t -3.05e-46)
t_1
(if (<= t -9.6e-120)
(/ x (* y (* a (exp b))))
(if (<= t 8e+53) 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) / a)) / y;
double t_2 = (x * (pow(a, t) / a)) / y;
double tmp;
if (t <= -3.7e+42) {
tmp = t_2;
} else if (t <= -3.05e-46) {
tmp = t_1;
} else if (t <= -9.6e-120) {
tmp = x / (y * (a * exp(b)));
} else if (t <= 8e+53) {
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) / a)) / y
t_2 = (x * ((a ** t) / a)) / y
if (t <= (-3.7d+42)) then
tmp = t_2
else if (t <= (-3.05d-46)) then
tmp = t_1
else if (t <= (-9.6d-120)) then
tmp = x / (y * (a * exp(b)))
else if (t <= 8d+53) 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) / a)) / y;
double t_2 = (x * (Math.pow(a, t) / a)) / y;
double tmp;
if (t <= -3.7e+42) {
tmp = t_2;
} else if (t <= -3.05e-46) {
tmp = t_1;
} else if (t <= -9.6e-120) {
tmp = x / (y * (a * Math.exp(b)));
} else if (t <= 8e+53) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x * (math.pow(z, y) / a)) / y t_2 = (x * (math.pow(a, t) / a)) / y tmp = 0 if t <= -3.7e+42: tmp = t_2 elif t <= -3.05e-46: tmp = t_1 elif t <= -9.6e-120: tmp = x / (y * (a * math.exp(b))) elif t <= 8e+53: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * Float64((z ^ y) / a)) / y) t_2 = Float64(Float64(x * Float64((a ^ t) / a)) / y) tmp = 0.0 if (t <= -3.7e+42) tmp = t_2; elseif (t <= -3.05e-46) tmp = t_1; elseif (t <= -9.6e-120) tmp = Float64(x / Float64(y * Float64(a * exp(b)))); elseif (t <= 8e+53) 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) / a)) / y; t_2 = (x * ((a ^ t) / a)) / y; tmp = 0.0; if (t <= -3.7e+42) tmp = t_2; elseif (t <= -3.05e-46) tmp = t_1; elseif (t <= -9.6e-120) tmp = x / (y * (a * exp(b))); elseif (t <= 8e+53) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[(N[Power[a, t], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t, -3.7e+42], t$95$2, If[LessEqual[t, -3.05e-46], t$95$1, If[LessEqual[t, -9.6e-120], N[(x / N[(y * N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8e+53], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
t_2 := \frac{x \cdot \frac{{a}^{t}}{a}}{y}\\
\mathbf{if}\;t \leq -3.7 \cdot 10^{+42}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -3.05 \cdot 10^{-46}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -9.6 \cdot 10^{-120}:\\
\;\;\;\;\frac{x}{y \cdot \left(a \cdot e^{b}\right)}\\
\mathbf{elif}\;t \leq 8 \cdot 10^{+53}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -3.69999999999999996e42 or 7.9999999999999999e53 < t Initial program 100.0%
Taylor expanded in y around 0 93.7%
Taylor expanded in b around 0 85.7%
exp-to-pow85.7%
sub-neg85.7%
metadata-eval85.7%
distribute-rgt-in85.7%
mul-1-neg85.7%
sub-neg85.7%
log-pow85.7%
log-div85.7%
rem-exp-log85.7%
Simplified85.7%
if -3.69999999999999996e42 < t < -3.05000000000000018e-46 or -9.5999999999999998e-120 < t < 7.9999999999999999e53Initial program 98.8%
Taylor expanded in t around 0 95.3%
mul-1-neg95.3%
Simplified95.3%
Taylor expanded in b around 0 82.1%
div-exp82.1%
*-commutative82.1%
exp-to-pow82.1%
rem-exp-log83.1%
Simplified83.1%
if -3.05000000000000018e-46 < t < -9.5999999999999998e-120Initial program 94.8%
associate-*r/97.3%
sub-neg97.3%
exp-sum80.6%
associate-/l*80.6%
associate-/r/80.6%
exp-neg80.6%
associate-*r/80.6%
Simplified83.2%
Taylor expanded in t around 0 77.6%
associate-/r*83.2%
Simplified83.2%
Taylor expanded in y around 0 88.9%
Final simplification84.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -7e+83) (not (<= b 3.3e+83))) (/ x (* y (* a (exp b)))) (* (/ (pow a t) a) (/ x y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -7e+83) || !(b <= 3.3e+83)) {
tmp = x / (y * (a * exp(b)));
} else {
tmp = (pow(a, t) / a) * (x / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-7d+83)) .or. (.not. (b <= 3.3d+83))) then
tmp = x / (y * (a * exp(b)))
else
tmp = ((a ** t) / a) * (x / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -7e+83) || !(b <= 3.3e+83)) {
tmp = x / (y * (a * Math.exp(b)));
} else {
tmp = (Math.pow(a, t) / a) * (x / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -7e+83) or not (b <= 3.3e+83): tmp = x / (y * (a * math.exp(b))) else: tmp = (math.pow(a, t) / a) * (x / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -7e+83) || !(b <= 3.3e+83)) tmp = Float64(x / Float64(y * Float64(a * exp(b)))); else tmp = Float64(Float64((a ^ t) / a) * Float64(x / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -7e+83) || ~((b <= 3.3e+83))) tmp = x / (y * (a * exp(b))); else tmp = ((a ^ t) / a) * (x / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -7e+83], N[Not[LessEqual[b, 3.3e+83]], $MachinePrecision]], N[(x / N[(y * N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[a, t], $MachinePrecision] / a), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -7 \cdot 10^{+83} \lor \neg \left(b \leq 3.3 \cdot 10^{+83}\right):\\
\;\;\;\;\frac{x}{y \cdot \left(a \cdot e^{b}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{{a}^{t}}{a} \cdot \frac{x}{y}\\
\end{array}
\end{array}
if b < -6.99999999999999954e83 or 3.29999999999999985e83 < b Initial program 100.0%
associate-*r/100.0%
sub-neg100.0%
exp-sum67.4%
associate-/l*67.4%
associate-/r/67.4%
exp-neg67.4%
associate-*r/67.4%
Simplified52.3%
Taylor expanded in t around 0 72.2%
associate-/r*72.2%
Simplified72.2%
Taylor expanded in y around 0 87.4%
if -6.99999999999999954e83 < b < 3.29999999999999985e83Initial program 98.5%
associate-*r/97.8%
sub-neg97.8%
exp-sum86.0%
associate-/l*86.0%
associate-/r/86.0%
exp-neg86.0%
associate-*r/86.0%
Simplified75.9%
Taylor expanded in y around 0 63.4%
*-commutative63.4%
associate-*l*63.4%
*-commutative63.4%
times-frac65.3%
Simplified65.3%
Taylor expanded in b around 0 68.1%
Final simplification74.6%
(FPCore (x y z t a b) :precision binary64 (/ x (* y (* a (exp b)))))
double code(double x, double y, double z, double t, double a, double b) {
return x / (y * (a * exp(b)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x / (y * (a * exp(b)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x / (y * (a * Math.exp(b)));
}
def code(x, y, z, t, a, b): return x / (y * (a * math.exp(b)))
function code(x, y, z, t, a, b) return Float64(x / Float64(y * Float64(a * exp(b)))) end
function tmp = code(x, y, z, t, a, b) tmp = x / (y * (a * exp(b))); end
code[x_, y_, z_, t_, a_, b_] := N[(x / N[(y * N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y \cdot \left(a \cdot e^{b}\right)}
\end{array}
Initial program 99.0%
associate-*r/98.5%
sub-neg98.5%
exp-sum79.8%
associate-/l*79.8%
associate-/r/79.8%
exp-neg79.8%
associate-*r/79.8%
Simplified68.0%
Taylor expanded in t around 0 65.4%
associate-/r*67.7%
Simplified67.7%
Taylor expanded in y around 0 57.8%
Final simplification57.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (/ x a) y)))
(if (<= b -3.7e+126)
(* (/ b y) (- (/ x a)))
(if (<= b 8e-95)
t_1
(if (<= b 7e+68)
(/ 1.0 (* a (/ y x)))
(if (<= b 5.2e+69) t_1 (/ x (* a (* y b)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x / a) / y;
double tmp;
if (b <= -3.7e+126) {
tmp = (b / y) * -(x / a);
} else if (b <= 8e-95) {
tmp = t_1;
} else if (b <= 7e+68) {
tmp = 1.0 / (a * (y / x));
} else if (b <= 5.2e+69) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (x / a) / y
if (b <= (-3.7d+126)) then
tmp = (b / y) * -(x / a)
else if (b <= 8d-95) then
tmp = t_1
else if (b <= 7d+68) then
tmp = 1.0d0 / (a * (y / x))
else if (b <= 5.2d+69) then
tmp = t_1
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 t_1 = (x / a) / y;
double tmp;
if (b <= -3.7e+126) {
tmp = (b / y) * -(x / a);
} else if (b <= 8e-95) {
tmp = t_1;
} else if (b <= 7e+68) {
tmp = 1.0 / (a * (y / x));
} else if (b <= 5.2e+69) {
tmp = t_1;
} else {
tmp = x / (a * (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x / a) / y tmp = 0 if b <= -3.7e+126: tmp = (b / y) * -(x / a) elif b <= 8e-95: tmp = t_1 elif b <= 7e+68: tmp = 1.0 / (a * (y / x)) elif b <= 5.2e+69: tmp = t_1 else: tmp = x / (a * (y * b)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x / a) / y) tmp = 0.0 if (b <= -3.7e+126) tmp = Float64(Float64(b / y) * Float64(-Float64(x / a))); elseif (b <= 8e-95) tmp = t_1; elseif (b <= 7e+68) tmp = Float64(1.0 / Float64(a * Float64(y / x))); elseif (b <= 5.2e+69) tmp = t_1; else tmp = Float64(x / Float64(a * Float64(y * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x / a) / y; tmp = 0.0; if (b <= -3.7e+126) tmp = (b / y) * -(x / a); elseif (b <= 8e-95) tmp = t_1; elseif (b <= 7e+68) tmp = 1.0 / (a * (y / x)); elseif (b <= 5.2e+69) tmp = t_1; else tmp = x / (a * (y * 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[b, -3.7e+126], N[(N[(b / y), $MachinePrecision] * (-N[(x / a), $MachinePrecision])), $MachinePrecision], If[LessEqual[b, 8e-95], t$95$1, If[LessEqual[b, 7e+68], N[(1.0 / N[(a * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.2e+69], t$95$1, N[(x / N[(a * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{a}}{y}\\
\mathbf{if}\;b \leq -3.7 \cdot 10^{+126}:\\
\;\;\;\;\frac{b}{y} \cdot \left(-\frac{x}{a}\right)\\
\mathbf{elif}\;b \leq 8 \cdot 10^{-95}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 7 \cdot 10^{+68}:\\
\;\;\;\;\frac{1}{a \cdot \frac{y}{x}}\\
\mathbf{elif}\;b \leq 5.2 \cdot 10^{+69}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot b\right)}\\
\end{array}
\end{array}
if b < -3.6999999999999998e126Initial program 100.0%
Taylor expanded in y around 0 100.0%
Taylor expanded in t around 0 94.4%
sub-neg94.4%
mul-1-neg94.4%
distribute-neg-in94.4%
+-commutative94.4%
exp-neg94.4%
associate-*l/94.4%
*-lft-identity94.4%
+-commutative94.4%
exp-sum94.4%
rem-exp-log94.4%
associate-/r*91.5%
Simplified91.5%
Taylor expanded in b around 0 55.9%
+-commutative55.9%
mul-1-neg55.9%
unsub-neg55.9%
associate-/l*45.3%
Simplified45.3%
Taylor expanded in b around inf 50.4%
mul-1-neg50.4%
times-frac45.2%
Simplified45.2%
if -3.6999999999999998e126 < b < 7.99999999999999992e-95 or 6.99999999999999955e68 < b < 5.2000000000000004e69Initial program 98.8%
Taylor expanded in t around 0 71.7%
mul-1-neg71.7%
Simplified71.7%
Taylor expanded in b around 0 70.3%
div-exp70.4%
*-commutative70.4%
exp-to-pow70.4%
rem-exp-log71.4%
Simplified71.4%
Taylor expanded in y around 0 36.5%
*-commutative36.5%
associate-/r*38.5%
Simplified38.5%
if 7.99999999999999992e-95 < b < 6.99999999999999955e68Initial program 97.8%
associate-*r/96.8%
sub-neg96.8%
exp-sum77.9%
associate-/l*77.9%
associate-/r/77.9%
exp-neg77.9%
associate-*r/77.9%
Simplified70.5%
Taylor expanded in t around 0 62.9%
associate-/r*68.3%
Simplified68.3%
Taylor expanded in b around 0 64.4%
times-frac77.5%
Simplified77.5%
Taylor expanded in y around 0 48.6%
*-commutative48.6%
clear-num48.5%
frac-times48.6%
metadata-eval48.6%
Applied egg-rr48.6%
if 5.2000000000000004e69 < b Initial program 100.0%
associate-*r/100.0%
sub-neg100.0%
exp-sum62.5%
associate-/l*62.5%
associate-/r/62.5%
exp-neg62.5%
associate-*r/62.5%
Simplified54.2%
Taylor expanded in t around 0 71.0%
associate-/r*71.0%
Simplified71.0%
Taylor expanded in y around 0 77.4%
Taylor expanded in b around 0 46.5%
Taylor expanded in b around inf 52.3%
Final simplification43.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (/ x a) y)))
(if (<= b -1.05e+83)
(/ (* b (- (/ x a))) y)
(if (<= b 1.45e-94)
t_1
(if (<= b 6.2e+68)
(/ 1.0 (* a (/ y x)))
(if (<= b 2.65e+69) t_1 (/ x (* a (* y b)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x / a) / y;
double tmp;
if (b <= -1.05e+83) {
tmp = (b * -(x / a)) / y;
} else if (b <= 1.45e-94) {
tmp = t_1;
} else if (b <= 6.2e+68) {
tmp = 1.0 / (a * (y / x));
} else if (b <= 2.65e+69) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (x / a) / y
if (b <= (-1.05d+83)) then
tmp = (b * -(x / a)) / y
else if (b <= 1.45d-94) then
tmp = t_1
else if (b <= 6.2d+68) then
tmp = 1.0d0 / (a * (y / x))
else if (b <= 2.65d+69) then
tmp = t_1
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 t_1 = (x / a) / y;
double tmp;
if (b <= -1.05e+83) {
tmp = (b * -(x / a)) / y;
} else if (b <= 1.45e-94) {
tmp = t_1;
} else if (b <= 6.2e+68) {
tmp = 1.0 / (a * (y / x));
} else if (b <= 2.65e+69) {
tmp = t_1;
} else {
tmp = x / (a * (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x / a) / y tmp = 0 if b <= -1.05e+83: tmp = (b * -(x / a)) / y elif b <= 1.45e-94: tmp = t_1 elif b <= 6.2e+68: tmp = 1.0 / (a * (y / x)) elif b <= 2.65e+69: tmp = t_1 else: tmp = x / (a * (y * b)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x / a) / y) tmp = 0.0 if (b <= -1.05e+83) tmp = Float64(Float64(b * Float64(-Float64(x / a))) / y); elseif (b <= 1.45e-94) tmp = t_1; elseif (b <= 6.2e+68) tmp = Float64(1.0 / Float64(a * Float64(y / x))); elseif (b <= 2.65e+69) tmp = t_1; else tmp = Float64(x / Float64(a * Float64(y * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x / a) / y; tmp = 0.0; if (b <= -1.05e+83) tmp = (b * -(x / a)) / y; elseif (b <= 1.45e-94) tmp = t_1; elseif (b <= 6.2e+68) tmp = 1.0 / (a * (y / x)); elseif (b <= 2.65e+69) tmp = t_1; else tmp = x / (a * (y * 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[b, -1.05e+83], N[(N[(b * (-N[(x / a), $MachinePrecision])), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 1.45e-94], t$95$1, If[LessEqual[b, 6.2e+68], N[(1.0 / N[(a * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.65e+69], t$95$1, N[(x / N[(a * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{a}}{y}\\
\mathbf{if}\;b \leq -1.05 \cdot 10^{+83}:\\
\;\;\;\;\frac{b \cdot \left(-\frac{x}{a}\right)}{y}\\
\mathbf{elif}\;b \leq 1.45 \cdot 10^{-94}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 6.2 \cdot 10^{+68}:\\
\;\;\;\;\frac{1}{a \cdot \frac{y}{x}}\\
\mathbf{elif}\;b \leq 2.65 \cdot 10^{+69}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot b\right)}\\
\end{array}
\end{array}
if b < -1.05000000000000001e83Initial program 100.0%
Taylor expanded in y around 0 95.7%
Taylor expanded in t around 0 91.4%
sub-neg91.4%
mul-1-neg91.4%
distribute-neg-in91.4%
+-commutative91.4%
exp-neg91.4%
associate-*l/91.4%
*-lft-identity91.4%
+-commutative91.4%
exp-sum91.4%
rem-exp-log91.4%
associate-/r*84.9%
Simplified84.9%
Taylor expanded in b around 0 48.3%
+-commutative48.3%
mul-1-neg48.3%
unsub-neg48.3%
associate-/l*40.2%
Simplified40.2%
Taylor expanded in b around inf 48.3%
mul-1-neg48.3%
associate-*r/40.2%
distribute-lft-neg-out40.2%
*-commutative40.2%
Simplified40.2%
if -1.05000000000000001e83 < b < 1.44999999999999998e-94 or 6.1999999999999997e68 < b < 2.65e69Initial program 98.6%
Taylor expanded in t around 0 70.8%
mul-1-neg70.8%
Simplified70.8%
Taylor expanded in b around 0 70.1%
div-exp70.1%
*-commutative70.1%
exp-to-pow70.1%
rem-exp-log71.2%
Simplified71.2%
Taylor expanded in y around 0 37.9%
*-commutative37.9%
associate-/r*40.2%
Simplified40.2%
if 1.44999999999999998e-94 < b < 6.1999999999999997e68Initial program 97.8%
associate-*r/96.8%
sub-neg96.8%
exp-sum77.9%
associate-/l*77.9%
associate-/r/77.9%
exp-neg77.9%
associate-*r/77.9%
Simplified70.5%
Taylor expanded in t around 0 62.9%
associate-/r*68.3%
Simplified68.3%
Taylor expanded in b around 0 64.4%
times-frac77.5%
Simplified77.5%
Taylor expanded in y around 0 48.6%
*-commutative48.6%
clear-num48.5%
frac-times48.6%
metadata-eval48.6%
Applied egg-rr48.6%
if 2.65e69 < b Initial program 100.0%
associate-*r/100.0%
sub-neg100.0%
exp-sum62.5%
associate-/l*62.5%
associate-/r/62.5%
exp-neg62.5%
associate-*r/62.5%
Simplified54.2%
Taylor expanded in t around 0 71.0%
associate-/r*71.0%
Simplified71.0%
Taylor expanded in y around 0 77.4%
Taylor expanded in b around 0 46.5%
Taylor expanded in b around inf 52.3%
Final simplification43.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (/ x a) y)))
(if (<= b -1.25e+71)
(/ (- (* x b)) (* y a))
(if (<= b 1.06e-94)
t_1
(if (<= b 5e+67)
(/ 1.0 (* a (/ y x)))
(if (<= b 2.8e+69) t_1 (/ x (* a (* y b)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x / a) / y;
double tmp;
if (b <= -1.25e+71) {
tmp = -(x * b) / (y * a);
} else if (b <= 1.06e-94) {
tmp = t_1;
} else if (b <= 5e+67) {
tmp = 1.0 / (a * (y / x));
} else if (b <= 2.8e+69) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (x / a) / y
if (b <= (-1.25d+71)) then
tmp = -(x * b) / (y * a)
else if (b <= 1.06d-94) then
tmp = t_1
else if (b <= 5d+67) then
tmp = 1.0d0 / (a * (y / x))
else if (b <= 2.8d+69) then
tmp = t_1
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 t_1 = (x / a) / y;
double tmp;
if (b <= -1.25e+71) {
tmp = -(x * b) / (y * a);
} else if (b <= 1.06e-94) {
tmp = t_1;
} else if (b <= 5e+67) {
tmp = 1.0 / (a * (y / x));
} else if (b <= 2.8e+69) {
tmp = t_1;
} else {
tmp = x / (a * (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x / a) / y tmp = 0 if b <= -1.25e+71: tmp = -(x * b) / (y * a) elif b <= 1.06e-94: tmp = t_1 elif b <= 5e+67: tmp = 1.0 / (a * (y / x)) elif b <= 2.8e+69: tmp = t_1 else: tmp = x / (a * (y * b)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x / a) / y) tmp = 0.0 if (b <= -1.25e+71) tmp = Float64(Float64(-Float64(x * b)) / Float64(y * a)); elseif (b <= 1.06e-94) tmp = t_1; elseif (b <= 5e+67) tmp = Float64(1.0 / Float64(a * Float64(y / x))); elseif (b <= 2.8e+69) tmp = t_1; else tmp = Float64(x / Float64(a * Float64(y * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x / a) / y; tmp = 0.0; if (b <= -1.25e+71) tmp = -(x * b) / (y * a); elseif (b <= 1.06e-94) tmp = t_1; elseif (b <= 5e+67) tmp = 1.0 / (a * (y / x)); elseif (b <= 2.8e+69) tmp = t_1; else tmp = x / (a * (y * 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[b, -1.25e+71], N[((-N[(x * b), $MachinePrecision]) / N[(y * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.06e-94], t$95$1, If[LessEqual[b, 5e+67], N[(1.0 / N[(a * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.8e+69], t$95$1, N[(x / N[(a * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{a}}{y}\\
\mathbf{if}\;b \leq -1.25 \cdot 10^{+71}:\\
\;\;\;\;\frac{-x \cdot b}{y \cdot a}\\
\mathbf{elif}\;b \leq 1.06 \cdot 10^{-94}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 5 \cdot 10^{+67}:\\
\;\;\;\;\frac{1}{a \cdot \frac{y}{x}}\\
\mathbf{elif}\;b \leq 2.8 \cdot 10^{+69}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot b\right)}\\
\end{array}
\end{array}
if b < -1.24999999999999993e71Initial program 100.0%
Taylor expanded in y around 0 93.8%
Taylor expanded in t around 0 89.7%
sub-neg89.7%
mul-1-neg89.7%
distribute-neg-in89.7%
+-commutative89.7%
exp-neg89.7%
associate-*l/89.7%
*-lft-identity89.7%
+-commutative89.7%
exp-sum89.7%
rem-exp-log89.7%
associate-/r*83.5%
Simplified83.5%
Taylor expanded in b around 0 46.6%
+-commutative46.6%
mul-1-neg46.6%
unsub-neg46.6%
associate-/l*38.8%
Simplified38.8%
Taylor expanded in b around inf 47.5%
if -1.24999999999999993e71 < b < 1.06e-94 or 4.99999999999999976e67 < b < 2.79999999999999982e69Initial program 98.6%
Taylor expanded in t around 0 70.3%
mul-1-neg70.3%
Simplified70.3%
Taylor expanded in b around 0 70.4%
div-exp70.4%
*-commutative70.4%
exp-to-pow70.4%
rem-exp-log71.5%
Simplified71.5%
Taylor expanded in y around 0 36.9%
*-commutative36.9%
associate-/r*40.0%
Simplified40.0%
if 1.06e-94 < b < 4.99999999999999976e67Initial program 97.8%
associate-*r/96.8%
sub-neg96.8%
exp-sum77.9%
associate-/l*77.9%
associate-/r/77.9%
exp-neg77.9%
associate-*r/77.9%
Simplified70.5%
Taylor expanded in t around 0 62.9%
associate-/r*68.3%
Simplified68.3%
Taylor expanded in b around 0 64.4%
times-frac77.5%
Simplified77.5%
Taylor expanded in y around 0 48.6%
*-commutative48.6%
clear-num48.5%
frac-times48.6%
metadata-eval48.6%
Applied egg-rr48.6%
if 2.79999999999999982e69 < b Initial program 100.0%
associate-*r/100.0%
sub-neg100.0%
exp-sum62.5%
associate-/l*62.5%
associate-/r/62.5%
exp-neg62.5%
associate-*r/62.5%
Simplified54.2%
Taylor expanded in t around 0 71.0%
associate-/r*71.0%
Simplified71.0%
Taylor expanded in y around 0 77.4%
Taylor expanded in b around 0 46.5%
Taylor expanded in b around inf 52.3%
Final simplification44.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (/ x a) y)))
(if (<= b -1.75e+82)
(/ (/ (- (* x b)) a) y)
(if (<= b 7e-95)
t_1
(if (<= b 7.5e+67)
(/ 1.0 (* a (/ y x)))
(if (<= b 2.35e+69) t_1 (/ x (* a (* y b)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x / a) / y;
double tmp;
if (b <= -1.75e+82) {
tmp = (-(x * b) / a) / y;
} else if (b <= 7e-95) {
tmp = t_1;
} else if (b <= 7.5e+67) {
tmp = 1.0 / (a * (y / x));
} else if (b <= 2.35e+69) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (x / a) / y
if (b <= (-1.75d+82)) then
tmp = (-(x * b) / a) / y
else if (b <= 7d-95) then
tmp = t_1
else if (b <= 7.5d+67) then
tmp = 1.0d0 / (a * (y / x))
else if (b <= 2.35d+69) then
tmp = t_1
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 t_1 = (x / a) / y;
double tmp;
if (b <= -1.75e+82) {
tmp = (-(x * b) / a) / y;
} else if (b <= 7e-95) {
tmp = t_1;
} else if (b <= 7.5e+67) {
tmp = 1.0 / (a * (y / x));
} else if (b <= 2.35e+69) {
tmp = t_1;
} else {
tmp = x / (a * (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x / a) / y tmp = 0 if b <= -1.75e+82: tmp = (-(x * b) / a) / y elif b <= 7e-95: tmp = t_1 elif b <= 7.5e+67: tmp = 1.0 / (a * (y / x)) elif b <= 2.35e+69: tmp = t_1 else: tmp = x / (a * (y * b)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x / a) / y) tmp = 0.0 if (b <= -1.75e+82) tmp = Float64(Float64(Float64(-Float64(x * b)) / a) / y); elseif (b <= 7e-95) tmp = t_1; elseif (b <= 7.5e+67) tmp = Float64(1.0 / Float64(a * Float64(y / x))); elseif (b <= 2.35e+69) tmp = t_1; else tmp = Float64(x / Float64(a * Float64(y * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x / a) / y; tmp = 0.0; if (b <= -1.75e+82) tmp = (-(x * b) / a) / y; elseif (b <= 7e-95) tmp = t_1; elseif (b <= 7.5e+67) tmp = 1.0 / (a * (y / x)); elseif (b <= 2.35e+69) tmp = t_1; else tmp = x / (a * (y * 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[b, -1.75e+82], N[(N[((-N[(x * b), $MachinePrecision]) / a), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 7e-95], t$95$1, If[LessEqual[b, 7.5e+67], N[(1.0 / N[(a * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.35e+69], t$95$1, N[(x / N[(a * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{a}}{y}\\
\mathbf{if}\;b \leq -1.75 \cdot 10^{+82}:\\
\;\;\;\;\frac{\frac{-x \cdot b}{a}}{y}\\
\mathbf{elif}\;b \leq 7 \cdot 10^{-95}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 7.5 \cdot 10^{+67}:\\
\;\;\;\;\frac{1}{a \cdot \frac{y}{x}}\\
\mathbf{elif}\;b \leq 2.35 \cdot 10^{+69}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot b\right)}\\
\end{array}
\end{array}
if b < -1.75e82Initial program 100.0%
Taylor expanded in y around 0 95.7%
Taylor expanded in t around 0 91.4%
sub-neg91.4%
mul-1-neg91.4%
distribute-neg-in91.4%
+-commutative91.4%
exp-neg91.4%
associate-*l/91.4%
*-lft-identity91.4%
+-commutative91.4%
exp-sum91.4%
rem-exp-log91.4%
associate-/r*84.9%
Simplified84.9%
Taylor expanded in b around 0 48.3%
+-commutative48.3%
mul-1-neg48.3%
unsub-neg48.3%
associate-/l*40.2%
Simplified40.2%
Taylor expanded in b around inf 48.3%
if -1.75e82 < b < 6.9999999999999994e-95 or 7.5000000000000005e67 < b < 2.34999999999999998e69Initial program 98.6%
Taylor expanded in t around 0 70.8%
mul-1-neg70.8%
Simplified70.8%
Taylor expanded in b around 0 70.1%
div-exp70.1%
*-commutative70.1%
exp-to-pow70.1%
rem-exp-log71.2%
Simplified71.2%
Taylor expanded in y around 0 37.9%
*-commutative37.9%
associate-/r*40.2%
Simplified40.2%
if 6.9999999999999994e-95 < b < 7.5000000000000005e67Initial program 97.8%
associate-*r/96.8%
sub-neg96.8%
exp-sum77.9%
associate-/l*77.9%
associate-/r/77.9%
exp-neg77.9%
associate-*r/77.9%
Simplified70.5%
Taylor expanded in t around 0 62.9%
associate-/r*68.3%
Simplified68.3%
Taylor expanded in b around 0 64.4%
times-frac77.5%
Simplified77.5%
Taylor expanded in y around 0 48.6%
*-commutative48.6%
clear-num48.5%
frac-times48.6%
metadata-eval48.6%
Applied egg-rr48.6%
if 2.34999999999999998e69 < b Initial program 100.0%
associate-*r/100.0%
sub-neg100.0%
exp-sum62.5%
associate-/l*62.5%
associate-/r/62.5%
exp-neg62.5%
associate-*r/62.5%
Simplified54.2%
Taylor expanded in t around 0 71.0%
associate-/r*71.0%
Simplified71.0%
Taylor expanded in y around 0 77.4%
Taylor expanded in b around 0 46.5%
Taylor expanded in b around inf 52.3%
Final simplification45.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (/ x a) y)))
(if (<= b 7.4e-95)
t_1
(if (<= b 2e+68)
(/ 1.0 (* a (/ y x)))
(if (<= b 2.35e+69) t_1 (/ x (* a (* y b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x / a) / y;
double tmp;
if (b <= 7.4e-95) {
tmp = t_1;
} else if (b <= 2e+68) {
tmp = 1.0 / (a * (y / x));
} else if (b <= 2.35e+69) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (x / a) / y
if (b <= 7.4d-95) then
tmp = t_1
else if (b <= 2d+68) then
tmp = 1.0d0 / (a * (y / x))
else if (b <= 2.35d+69) then
tmp = t_1
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 t_1 = (x / a) / y;
double tmp;
if (b <= 7.4e-95) {
tmp = t_1;
} else if (b <= 2e+68) {
tmp = 1.0 / (a * (y / x));
} else if (b <= 2.35e+69) {
tmp = t_1;
} else {
tmp = x / (a * (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x / a) / y tmp = 0 if b <= 7.4e-95: tmp = t_1 elif b <= 2e+68: tmp = 1.0 / (a * (y / x)) elif b <= 2.35e+69: tmp = t_1 else: tmp = x / (a * (y * b)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x / a) / y) tmp = 0.0 if (b <= 7.4e-95) tmp = t_1; elseif (b <= 2e+68) tmp = Float64(1.0 / Float64(a * Float64(y / x))); elseif (b <= 2.35e+69) tmp = t_1; else tmp = Float64(x / Float64(a * Float64(y * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x / a) / y; tmp = 0.0; if (b <= 7.4e-95) tmp = t_1; elseif (b <= 2e+68) tmp = 1.0 / (a * (y / x)); elseif (b <= 2.35e+69) tmp = t_1; else tmp = x / (a * (y * 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[b, 7.4e-95], t$95$1, If[LessEqual[b, 2e+68], N[(1.0 / N[(a * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.35e+69], t$95$1, N[(x / N[(a * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{a}}{y}\\
\mathbf{if}\;b \leq 7.4 \cdot 10^{-95}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 2 \cdot 10^{+68}:\\
\;\;\;\;\frac{1}{a \cdot \frac{y}{x}}\\
\mathbf{elif}\;b \leq 2.35 \cdot 10^{+69}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot b\right)}\\
\end{array}
\end{array}
if b < 7.39999999999999989e-95 or 1.99999999999999991e68 < b < 2.34999999999999998e69Initial program 99.0%
Taylor expanded in t around 0 76.4%
mul-1-neg76.4%
Simplified76.4%
Taylor expanded in b around 0 64.4%
div-exp64.5%
*-commutative64.5%
exp-to-pow64.5%
rem-exp-log65.3%
Simplified65.3%
Taylor expanded in y around 0 34.7%
*-commutative34.7%
associate-/r*35.8%
Simplified35.8%
if 7.39999999999999989e-95 < b < 1.99999999999999991e68Initial program 97.8%
associate-*r/96.8%
sub-neg96.8%
exp-sum77.9%
associate-/l*77.9%
associate-/r/77.9%
exp-neg77.9%
associate-*r/77.9%
Simplified70.5%
Taylor expanded in t around 0 62.9%
associate-/r*68.3%
Simplified68.3%
Taylor expanded in b around 0 64.4%
times-frac77.5%
Simplified77.5%
Taylor expanded in y around 0 48.6%
*-commutative48.6%
clear-num48.5%
frac-times48.6%
metadata-eval48.6%
Applied egg-rr48.6%
if 2.34999999999999998e69 < b Initial program 100.0%
associate-*r/100.0%
sub-neg100.0%
exp-sum62.5%
associate-/l*62.5%
associate-/r/62.5%
exp-neg62.5%
associate-*r/62.5%
Simplified54.2%
Taylor expanded in t around 0 71.0%
associate-/r*71.0%
Simplified71.0%
Taylor expanded in y around 0 77.4%
Taylor expanded in b around 0 46.5%
Taylor expanded in b around inf 52.3%
Final simplification40.8%
(FPCore (x y z t a b) :precision binary64 (if (<= b 8e-95) (/ (- (/ x a) (/ (* x b) a)) y) (if (<= b 5.6e+69) (/ 1.0 (* a (/ y x))) (/ x (* a (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 8e-95) {
tmp = ((x / a) - ((x * b) / a)) / y;
} else if (b <= 5.6e+69) {
tmp = 1.0 / (a * (y / x));
} else {
tmp = x / (a * (y * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= 8d-95) then
tmp = ((x / a) - ((x * b) / a)) / y
else if (b <= 5.6d+69) then
tmp = 1.0d0 / (a * (y / x))
else
tmp = x / (a * (y * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 8e-95) {
tmp = ((x / a) - ((x * b) / a)) / y;
} else if (b <= 5.6e+69) {
tmp = 1.0 / (a * (y / x));
} else {
tmp = x / (a * (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 8e-95: tmp = ((x / a) - ((x * b) / a)) / y elif b <= 5.6e+69: tmp = 1.0 / (a * (y / x)) else: tmp = x / (a * (y * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 8e-95) tmp = Float64(Float64(Float64(x / a) - Float64(Float64(x * b) / a)) / y); elseif (b <= 5.6e+69) tmp = Float64(1.0 / Float64(a * Float64(y / x))); else tmp = Float64(x / Float64(a * Float64(y * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= 8e-95) tmp = ((x / a) - ((x * b) / a)) / y; elseif (b <= 5.6e+69) tmp = 1.0 / (a * (y / x)); else tmp = x / (a * (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 8e-95], N[(N[(N[(x / a), $MachinePrecision] - N[(N[(x * b), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 5.6e+69], N[(1.0 / N[(a * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 8 \cdot 10^{-95}:\\
\;\;\;\;\frac{\frac{x}{a} - \frac{x \cdot b}{a}}{y}\\
\mathbf{elif}\;b \leq 5.6 \cdot 10^{+69}:\\
\;\;\;\;\frac{1}{a \cdot \frac{y}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot b\right)}\\
\end{array}
\end{array}
if b < 7.99999999999999992e-95Initial program 99.0%
Taylor expanded in y around 0 80.7%
Taylor expanded in t around 0 53.8%
sub-neg53.8%
mul-1-neg53.8%
distribute-neg-in53.8%
+-commutative53.8%
exp-neg53.8%
associate-*l/53.8%
*-lft-identity53.8%
+-commutative53.8%
exp-sum53.8%
rem-exp-log54.5%
associate-/r*52.7%
Simplified52.7%
Taylor expanded in b around 0 41.1%
if 7.99999999999999992e-95 < b < 5.59999999999999964e69Initial program 97.9%
associate-*r/97.0%
sub-neg97.0%
exp-sum73.9%
associate-/l*73.9%
associate-/r/73.9%
exp-neg73.9%
associate-*r/73.9%
Simplified66.9%
Taylor expanded in t around 0 59.7%
associate-/r*64.8%
Simplified64.8%
Taylor expanded in b around 0 63.8%
times-frac76.2%
Simplified76.2%
Taylor expanded in y around 0 46.3%
*-commutative46.3%
clear-num46.3%
frac-times46.3%
metadata-eval46.3%
Applied egg-rr46.3%
if 5.59999999999999964e69 < b Initial program 100.0%
associate-*r/100.0%
sub-neg100.0%
exp-sum62.5%
associate-/l*62.5%
associate-/r/62.5%
exp-neg62.5%
associate-*r/62.5%
Simplified54.2%
Taylor expanded in t around 0 71.0%
associate-/r*71.0%
Simplified71.0%
Taylor expanded in y around 0 77.4%
Taylor expanded in b around 0 46.5%
Taylor expanded in b around inf 52.3%
Final simplification44.0%
(FPCore (x y z t a b) :precision binary64 (if (<= b 1.12e-123) (/ (- x (* x b)) (* y a)) (if (<= b 5.5e+69) (/ 1.0 (* a (/ y x))) (/ x (* a (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 1.12e-123) {
tmp = (x - (x * b)) / (y * a);
} else if (b <= 5.5e+69) {
tmp = 1.0 / (a * (y / x));
} else {
tmp = x / (a * (y * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= 1.12d-123) then
tmp = (x - (x * b)) / (y * a)
else if (b <= 5.5d+69) then
tmp = 1.0d0 / (a * (y / x))
else
tmp = x / (a * (y * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 1.12e-123) {
tmp = (x - (x * b)) / (y * a);
} else if (b <= 5.5e+69) {
tmp = 1.0 / (a * (y / x));
} else {
tmp = x / (a * (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 1.12e-123: tmp = (x - (x * b)) / (y * a) elif b <= 5.5e+69: tmp = 1.0 / (a * (y / x)) else: tmp = x / (a * (y * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 1.12e-123) tmp = Float64(Float64(x - Float64(x * b)) / Float64(y * a)); elseif (b <= 5.5e+69) tmp = Float64(1.0 / Float64(a * Float64(y / x))); else tmp = Float64(x / Float64(a * Float64(y * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= 1.12e-123) tmp = (x - (x * b)) / (y * a); elseif (b <= 5.5e+69) tmp = 1.0 / (a * (y / x)); else tmp = x / (a * (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 1.12e-123], N[(N[(x - N[(x * b), $MachinePrecision]), $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.5e+69], N[(1.0 / N[(a * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.12 \cdot 10^{-123}:\\
\;\;\;\;\frac{x - x \cdot b}{y \cdot a}\\
\mathbf{elif}\;b \leq 5.5 \cdot 10^{+69}:\\
\;\;\;\;\frac{1}{a \cdot \frac{y}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot b\right)}\\
\end{array}
\end{array}
if b < 1.11999999999999999e-123Initial program 99.0%
associate-*r/99.0%
sub-neg99.0%
exp-sum86.1%
associate-/l*86.1%
associate-/r/86.1%
exp-neg86.1%
associate-*r/86.1%
Simplified72.9%
Taylor expanded in t around 0 65.6%
associate-/r*68.1%
Simplified68.1%
Taylor expanded in y around 0 54.0%
Taylor expanded in b around 0 26.8%
Taylor expanded in b around 0 38.6%
mul-1-neg38.6%
sub-neg38.6%
*-commutative38.6%
div-sub40.5%
*-commutative40.5%
Simplified40.5%
if 1.11999999999999999e-123 < b < 5.50000000000000002e69Initial program 97.9%
associate-*r/95.3%
sub-neg95.3%
exp-sum75.3%
associate-/l*75.3%
associate-/r/75.3%
exp-neg75.3%
associate-*r/75.3%
Simplified64.7%
Taylor expanded in t around 0 58.6%
associate-/r*63.0%
Simplified63.0%
Taylor expanded in b around 0 62.1%
times-frac74.8%
Simplified74.8%
Taylor expanded in y around 0 46.8%
*-commutative46.8%
clear-num46.8%
frac-times46.8%
metadata-eval46.8%
Applied egg-rr46.8%
if 5.50000000000000002e69 < b Initial program 100.0%
associate-*r/100.0%
sub-neg100.0%
exp-sum62.5%
associate-/l*62.5%
associate-/r/62.5%
exp-neg62.5%
associate-*r/62.5%
Simplified54.2%
Taylor expanded in t around 0 71.0%
associate-/r*71.0%
Simplified71.0%
Taylor expanded in y around 0 77.4%
Taylor expanded in b around 0 46.5%
Taylor expanded in b around inf 52.3%
Final simplification43.8%
(FPCore (x y z t a b) :precision binary64 (if (<= x -1e+69) (/ (/ x a) y) (/ 1.0 (* a (/ y x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -1e+69) {
tmp = (x / a) / y;
} else {
tmp = 1.0 / (a * (y / x));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (x <= (-1d+69)) then
tmp = (x / a) / y
else
tmp = 1.0d0 / (a * (y / x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -1e+69) {
tmp = (x / a) / y;
} else {
tmp = 1.0 / (a * (y / x));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -1e+69: tmp = (x / a) / y else: tmp = 1.0 / (a * (y / x)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -1e+69) tmp = Float64(Float64(x / a) / y); else tmp = Float64(1.0 / Float64(a * Float64(y / x))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -1e+69) tmp = (x / a) / y; else tmp = 1.0 / (a * (y / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -1e+69], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision], N[(1.0 / N[(a * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1 \cdot 10^{+69}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{a \cdot \frac{y}{x}}\\
\end{array}
\end{array}
if x < -1.0000000000000001e69Initial program 99.4%
Taylor expanded in t around 0 82.7%
mul-1-neg82.7%
Simplified82.7%
Taylor expanded in b around 0 77.2%
div-exp77.2%
*-commutative77.2%
exp-to-pow77.2%
rem-exp-log77.8%
Simplified77.8%
Taylor expanded in y around 0 35.9%
*-commutative35.9%
associate-/r*43.0%
Simplified43.0%
if -1.0000000000000001e69 < x Initial program 98.9%
associate-*r/98.3%
sub-neg98.3%
exp-sum81.6%
associate-/l*81.6%
associate-/r/81.6%
exp-neg81.6%
associate-*r/81.6%
Simplified67.5%
Taylor expanded in t around 0 66.1%
associate-/r*69.1%
Simplified69.1%
Taylor expanded in b around 0 57.5%
times-frac55.5%
Simplified55.5%
Taylor expanded in y around 0 33.3%
*-commutative33.3%
clear-num33.8%
frac-times34.1%
metadata-eval34.1%
Applied egg-rr34.1%
Final simplification35.9%
(FPCore (x y z t a b) :precision binary64 (if (<= b 7.5e-95) (/ (/ x a) y) (/ (/ x y) a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 7.5e-95) {
tmp = (x / a) / y;
} else {
tmp = (x / y) / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= 7.5d-95) then
tmp = (x / a) / y
else
tmp = (x / y) / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 7.5e-95) {
tmp = (x / a) / y;
} else {
tmp = (x / y) / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 7.5e-95: tmp = (x / a) / y else: tmp = (x / y) / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 7.5e-95) tmp = Float64(Float64(x / a) / y); else tmp = Float64(Float64(x / y) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= 7.5e-95) tmp = (x / a) / y; else tmp = (x / y) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 7.5e-95], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 7.5 \cdot 10^{-95}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{a}\\
\end{array}
\end{array}
if b < 7.5000000000000003e-95Initial program 99.0%
Taylor expanded in t around 0 76.7%
mul-1-neg76.7%
Simplified76.7%
Taylor expanded in b around 0 64.6%
div-exp64.6%
*-commutative64.6%
exp-to-pow64.6%
rem-exp-log65.4%
Simplified65.4%
Taylor expanded in y around 0 35.1%
*-commutative35.1%
associate-/r*35.6%
Simplified35.6%
if 7.5000000000000003e-95 < b Initial program 99.1%
associate-*r/98.6%
sub-neg98.6%
exp-sum67.6%
associate-/l*67.6%
associate-/r/67.6%
exp-neg67.6%
associate-*r/67.6%
Simplified59.9%
Taylor expanded in t around 0 65.9%
associate-/r*68.2%
Simplified68.2%
Taylor expanded in b around 0 58.0%
times-frac64.6%
Simplified64.6%
Taylor expanded in y around 0 35.8%
associate-*l/35.8%
*-un-lft-identity35.8%
Applied egg-rr35.8%
Final simplification35.7%
(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 79.7%
mul-1-neg79.7%
Simplified79.7%
Taylor expanded in b around 0 65.1%
div-exp65.2%
*-commutative65.2%
exp-to-pow65.2%
rem-exp-log65.8%
Simplified65.8%
Taylor expanded in y around 0 32.8%
Final simplification32.8%
(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 79.7%
mul-1-neg79.7%
Simplified79.7%
Taylor expanded in b around 0 65.1%
div-exp65.2%
*-commutative65.2%
exp-to-pow65.2%
rem-exp-log65.8%
Simplified65.8%
Taylor expanded in y around 0 32.8%
*-commutative32.8%
associate-/r*33.3%
Simplified33.3%
Final simplification33.3%
(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 2023224
(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))