
(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 27 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 -7.5e+49) (not (<= y 3.05e-12))) (/ (* x (exp (- (- (* y (log z)) (log a)) b))) y) (/ x (/ y (exp (- (* (+ t -1.0) (log a)) b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -7.5e+49) || !(y <= 3.05e-12)) {
tmp = (x * exp((((y * log(z)) - log(a)) - b))) / y;
} else {
tmp = x / (y / exp((((t + -1.0) * log(a)) - b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-7.5d+49)) .or. (.not. (y <= 3.05d-12))) then
tmp = (x * exp((((y * log(z)) - log(a)) - b))) / y
else
tmp = x / (y / exp((((t + (-1.0d0)) * log(a)) - b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -7.5e+49) || !(y <= 3.05e-12)) {
tmp = (x * Math.exp((((y * Math.log(z)) - Math.log(a)) - b))) / y;
} else {
tmp = x / (y / Math.exp((((t + -1.0) * Math.log(a)) - b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -7.5e+49) or not (y <= 3.05e-12): tmp = (x * math.exp((((y * math.log(z)) - math.log(a)) - b))) / y else: tmp = x / (y / math.exp((((t + -1.0) * math.log(a)) - b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -7.5e+49) || !(y <= 3.05e-12)) tmp = Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) - log(a)) - b))) / y); else tmp = Float64(x / Float64(y / exp(Float64(Float64(Float64(t + -1.0) * log(a)) - b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -7.5e+49) || ~((y <= 3.05e-12))) tmp = (x * exp((((y * log(z)) - log(a)) - b))) / y; else tmp = x / (y / exp((((t + -1.0) * log(a)) - b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -7.5e+49], N[Not[LessEqual[y, 3.05e-12]], $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[(x / N[(y / N[Exp[N[(N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.5 \cdot 10^{+49} \lor \neg \left(y \leq 3.05 \cdot 10^{-12}\right):\\
\;\;\;\;\frac{x \cdot e^{\left(y \cdot \log z - \log a\right) - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{y}{e^{\left(t + -1\right) \cdot \log a - b}}}\\
\end{array}
\end{array}
if y < -7.4999999999999995e49 or 3.0500000000000001e-12 < y Initial program 99.8%
associate-/l*99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in t around 0 94.3%
if -7.4999999999999995e49 < y < 3.0500000000000001e-12Initial program 98.0%
associate-/l*97.3%
fma-def97.3%
sub-neg97.3%
metadata-eval97.3%
Simplified97.3%
Taylor expanded in y around 0 97.3%
Final simplification95.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= (+ t -1.0) -1e+17) (not (<= (+ t -1.0) 2e+133))) (/ (* x (pow a (+ t -1.0))) y) (* (/ (pow z y) a) (/ x (* y (exp b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((t + -1.0) <= -1e+17) || !((t + -1.0) <= 2e+133)) {
tmp = (x * pow(a, (t + -1.0))) / y;
} else {
tmp = (pow(z, y) / a) * (x / (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 + (-1.0d0)) <= (-1d+17)) .or. (.not. ((t + (-1.0d0)) <= 2d+133))) then
tmp = (x * (a ** (t + (-1.0d0)))) / y
else
tmp = ((z ** y) / a) * (x / (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 + -1.0) <= -1e+17) || !((t + -1.0) <= 2e+133)) {
tmp = (x * Math.pow(a, (t + -1.0))) / y;
} else {
tmp = (Math.pow(z, y) / a) * (x / (y * Math.exp(b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if ((t + -1.0) <= -1e+17) or not ((t + -1.0) <= 2e+133): tmp = (x * math.pow(a, (t + -1.0))) / y else: tmp = (math.pow(z, y) / a) * (x / (y * math.exp(b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((Float64(t + -1.0) <= -1e+17) || !(Float64(t + -1.0) <= 2e+133)) tmp = Float64(Float64(x * (a ^ Float64(t + -1.0))) / y); else tmp = Float64(Float64((z ^ y) / a) * Float64(x / Float64(y * exp(b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (((t + -1.0) <= -1e+17) || ~(((t + -1.0) <= 2e+133))) tmp = (x * (a ^ (t + -1.0))) / y; else tmp = ((z ^ y) / a) * (x / (y * exp(b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[N[(t + -1.0), $MachinePrecision], -1e+17], N[Not[LessEqual[N[(t + -1.0), $MachinePrecision], 2e+133]], $MachinePrecision]], N[(N[(x * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] * N[(x / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t + -1 \leq -1 \cdot 10^{+17} \lor \neg \left(t + -1 \leq 2 \cdot 10^{+133}\right):\\
\;\;\;\;\frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{{z}^{y}}{a} \cdot \frac{x}{y \cdot e^{b}}\\
\end{array}
\end{array}
if (-.f64 t 1) < -1e17 or 2e133 < (-.f64 t 1) Initial program 100.0%
Taylor expanded in y around 0 92.3%
div-exp73.1%
exp-to-pow73.1%
sub-neg73.1%
metadata-eval73.1%
Simplified73.1%
Taylor expanded in b around 0 85.6%
exp-to-pow85.6%
sub-neg85.6%
metadata-eval85.6%
+-commutative85.6%
Simplified85.6%
if -1e17 < (-.f64 t 1) < 2e133Initial program 98.3%
associate-*l/89.5%
*-commutative89.5%
+-commutative89.5%
associate--l+89.5%
exp-sum83.5%
*-commutative83.5%
exp-to-pow84.3%
sub-neg84.3%
metadata-eval84.3%
exp-diff75.3%
*-commutative75.3%
exp-to-pow75.3%
Simplified75.3%
Taylor expanded in t around 0 76.1%
*-commutative76.1%
times-frac80.0%
Simplified80.0%
Final simplification81.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -6.8e+152) (not (<= y 6e+38))) (/ (* x (/ (pow z y) a)) y) (/ x (/ y (exp (- (* (+ t -1.0) (log a)) b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -6.8e+152) || !(y <= 6e+38)) {
tmp = (x * (pow(z, y) / a)) / y;
} else {
tmp = x / (y / exp((((t + -1.0) * log(a)) - b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-6.8d+152)) .or. (.not. (y <= 6d+38))) then
tmp = (x * ((z ** y) / a)) / y
else
tmp = x / (y / exp((((t + (-1.0d0)) * log(a)) - b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -6.8e+152) || !(y <= 6e+38)) {
tmp = (x * (Math.pow(z, y) / a)) / y;
} else {
tmp = x / (y / Math.exp((((t + -1.0) * Math.log(a)) - b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -6.8e+152) or not (y <= 6e+38): tmp = (x * (math.pow(z, y) / a)) / y else: tmp = x / (y / math.exp((((t + -1.0) * math.log(a)) - b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -6.8e+152) || !(y <= 6e+38)) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y); else tmp = Float64(x / Float64(y / exp(Float64(Float64(Float64(t + -1.0) * log(a)) - b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -6.8e+152) || ~((y <= 6e+38))) tmp = (x * ((z ^ y) / a)) / y; else tmp = x / (y / exp((((t + -1.0) * log(a)) - b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -6.8e+152], N[Not[LessEqual[y, 6e+38]], $MachinePrecision]], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(y / N[Exp[N[(N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.8 \cdot 10^{+152} \lor \neg \left(y \leq 6 \cdot 10^{+38}\right):\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{y}{e^{\left(t + -1\right) \cdot \log a - b}}}\\
\end{array}
\end{array}
if y < -6.80000000000000041e152 or 6.0000000000000002e38 < y Initial program 100.0%
associate-/l*100.0%
fma-def100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in t around 0 95.8%
Taylor expanded in b around 0 92.6%
+-commutative92.6%
mul-1-neg92.6%
sub-neg92.6%
exp-diff92.6%
*-commutative92.6%
exp-to-pow92.6%
rem-exp-log92.6%
*-commutative92.6%
Simplified92.6%
if -6.80000000000000041e152 < y < 6.0000000000000002e38Initial program 98.2%
associate-/l*97.6%
fma-def97.6%
sub-neg97.6%
metadata-eval97.6%
Simplified97.6%
Taylor expanded in y around 0 94.1%
Final simplification93.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -4.15e+152)
(/ (* x (/ (pow z y) a)) y)
(if (<= y 3.7e-12)
(/ x (/ (* y (exp b)) (pow a (+ t -1.0))))
(/ (/ (* x (pow z y)) a) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -4.15e+152) {
tmp = (x * (pow(z, y) / a)) / y;
} else if (y <= 3.7e-12) {
tmp = x / ((y * exp(b)) / pow(a, (t + -1.0)));
} else {
tmp = ((x * pow(z, y)) / 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 (y <= (-4.15d+152)) then
tmp = (x * ((z ** y) / a)) / y
else if (y <= 3.7d-12) then
tmp = x / ((y * exp(b)) / (a ** (t + (-1.0d0))))
else
tmp = ((x * (z ** y)) / 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 (y <= -4.15e+152) {
tmp = (x * (Math.pow(z, y) / a)) / y;
} else if (y <= 3.7e-12) {
tmp = x / ((y * Math.exp(b)) / Math.pow(a, (t + -1.0)));
} else {
tmp = ((x * Math.pow(z, y)) / a) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -4.15e+152: tmp = (x * (math.pow(z, y) / a)) / y elif y <= 3.7e-12: tmp = x / ((y * math.exp(b)) / math.pow(a, (t + -1.0))) else: tmp = ((x * math.pow(z, y)) / a) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -4.15e+152) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y); elseif (y <= 3.7e-12) tmp = Float64(x / Float64(Float64(y * exp(b)) / (a ^ Float64(t + -1.0)))); else tmp = Float64(Float64(Float64(x * (z ^ y)) / a) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -4.15e+152) tmp = (x * ((z ^ y) / a)) / y; elseif (y <= 3.7e-12) tmp = x / ((y * exp(b)) / (a ^ (t + -1.0))); else tmp = ((x * (z ^ y)) / a) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -4.15e+152], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 3.7e-12], N[(x / N[(N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision] / N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.15 \cdot 10^{+152}:\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{elif}\;y \leq 3.7 \cdot 10^{-12}:\\
\;\;\;\;\frac{x}{\frac{y \cdot e^{b}}{{a}^{\left(t + -1\right)}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x \cdot {z}^{y}}{a}}{y}\\
\end{array}
\end{array}
if y < -4.1500000000000001e152Initial program 100.0%
associate-/l*100.0%
fma-def100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in t around 0 95.1%
Taylor expanded in b around 0 95.1%
+-commutative95.1%
mul-1-neg95.1%
sub-neg95.1%
exp-diff95.1%
*-commutative95.1%
exp-to-pow95.1%
rem-exp-log95.1%
*-commutative95.1%
Simplified95.1%
if -4.1500000000000001e152 < y < 3.69999999999999999e-12Initial program 98.3%
associate-*l/94.7%
*-commutative94.7%
+-commutative94.7%
associate--l+94.7%
exp-sum82.6%
*-commutative82.6%
exp-to-pow83.3%
sub-neg83.3%
metadata-eval83.3%
exp-diff79.4%
*-commutative79.4%
exp-to-pow79.4%
Simplified79.4%
Taylor expanded in y around 0 80.6%
associate-/l*85.7%
exp-to-pow86.2%
sub-neg86.2%
metadata-eval86.2%
Simplified86.2%
if 3.69999999999999999e-12 < y Initial program 99.6%
expm1-log1p-u84.4%
expm1-udef81.6%
Applied egg-rr46.0%
expm1-def49.1%
expm1-log1p61.0%
*-commutative61.0%
associate-*l/61.0%
associate-*r/61.0%
associate-/l/61.0%
*-commutative61.0%
Simplified61.0%
Taylor expanded in t around 0 74.6%
associate-/r*74.6%
Simplified74.6%
Taylor expanded in b around 0 88.4%
Final simplification88.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -1.15e+166)
(/ (* x (/ (pow z y) a)) y)
(if (<= y 3.7e-12)
(/ (* x (/ (pow a (+ t -1.0)) (exp b))) y)
(/ (/ (* x (pow z y)) a) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.15e+166) {
tmp = (x * (pow(z, y) / a)) / y;
} else if (y <= 3.7e-12) {
tmp = (x * (pow(a, (t + -1.0)) / exp(b))) / y;
} else {
tmp = ((x * pow(z, y)) / 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 (y <= (-1.15d+166)) then
tmp = (x * ((z ** y) / a)) / y
else if (y <= 3.7d-12) then
tmp = (x * ((a ** (t + (-1.0d0))) / exp(b))) / y
else
tmp = ((x * (z ** y)) / 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 (y <= -1.15e+166) {
tmp = (x * (Math.pow(z, y) / a)) / y;
} else if (y <= 3.7e-12) {
tmp = (x * (Math.pow(a, (t + -1.0)) / Math.exp(b))) / y;
} else {
tmp = ((x * Math.pow(z, y)) / a) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.15e+166: tmp = (x * (math.pow(z, y) / a)) / y elif y <= 3.7e-12: tmp = (x * (math.pow(a, (t + -1.0)) / math.exp(b))) / y else: tmp = ((x * math.pow(z, y)) / a) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.15e+166) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y); elseif (y <= 3.7e-12) tmp = Float64(Float64(x * Float64((a ^ Float64(t + -1.0)) / exp(b))) / y); else tmp = Float64(Float64(Float64(x * (z ^ y)) / a) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.15e+166) tmp = (x * ((z ^ y) / a)) / y; elseif (y <= 3.7e-12) tmp = (x * ((a ^ (t + -1.0)) / exp(b))) / y; else tmp = ((x * (z ^ y)) / a) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.15e+166], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 3.7e-12], N[(N[(x * N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.15 \cdot 10^{+166}:\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{elif}\;y \leq 3.7 \cdot 10^{-12}:\\
\;\;\;\;\frac{x \cdot \frac{{a}^{\left(t + -1\right)}}{e^{b}}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x \cdot {z}^{y}}{a}}{y}\\
\end{array}
\end{array}
if y < -1.15000000000000004e166Initial program 100.0%
associate-/l*100.0%
fma-def100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in t around 0 94.7%
Taylor expanded in b around 0 94.7%
+-commutative94.7%
mul-1-neg94.7%
sub-neg94.7%
exp-diff94.7%
*-commutative94.7%
exp-to-pow94.7%
rem-exp-log94.7%
*-commutative94.7%
Simplified94.7%
if -1.15000000000000004e166 < y < 3.69999999999999999e-12Initial program 98.4%
Taylor expanded in y around 0 95.3%
div-exp86.6%
exp-to-pow87.2%
sub-neg87.2%
metadata-eval87.2%
Simplified87.2%
if 3.69999999999999999e-12 < y Initial program 99.6%
expm1-log1p-u84.4%
expm1-udef81.6%
Applied egg-rr46.0%
expm1-def49.1%
expm1-log1p61.0%
*-commutative61.0%
associate-*l/61.0%
associate-*r/61.0%
associate-/l/61.0%
*-commutative61.0%
Simplified61.0%
Taylor expanded in t around 0 74.6%
associate-/r*74.6%
Simplified74.6%
Taylor expanded in b around 0 88.4%
Final simplification88.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (/ (pow z y) a) (/ x y)))
(t_2 (/ x (* a (* y (exp b)))))
(t_3 (/ (* x (pow a (+ t -1.0))) y)))
(if (<= b -340.0)
t_2
(if (<= b -2.05e-202)
t_1
(if (<= b 1.1e-179)
t_3
(if (<= b 9e-135) t_1 (if (<= b 8.8e+29) t_3 t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (pow(z, y) / a) * (x / y);
double t_2 = x / (a * (y * exp(b)));
double t_3 = (x * pow(a, (t + -1.0))) / y;
double tmp;
if (b <= -340.0) {
tmp = t_2;
} else if (b <= -2.05e-202) {
tmp = t_1;
} else if (b <= 1.1e-179) {
tmp = t_3;
} else if (b <= 9e-135) {
tmp = t_1;
} else if (b <= 8.8e+29) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = ((z ** y) / a) * (x / y)
t_2 = x / (a * (y * exp(b)))
t_3 = (x * (a ** (t + (-1.0d0)))) / y
if (b <= (-340.0d0)) then
tmp = t_2
else if (b <= (-2.05d-202)) then
tmp = t_1
else if (b <= 1.1d-179) then
tmp = t_3
else if (b <= 9d-135) then
tmp = t_1
else if (b <= 8.8d+29) then
tmp = t_3
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (Math.pow(z, y) / a) * (x / y);
double t_2 = x / (a * (y * Math.exp(b)));
double t_3 = (x * Math.pow(a, (t + -1.0))) / y;
double tmp;
if (b <= -340.0) {
tmp = t_2;
} else if (b <= -2.05e-202) {
tmp = t_1;
} else if (b <= 1.1e-179) {
tmp = t_3;
} else if (b <= 9e-135) {
tmp = t_1;
} else if (b <= 8.8e+29) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (math.pow(z, y) / a) * (x / y) t_2 = x / (a * (y * math.exp(b))) t_3 = (x * math.pow(a, (t + -1.0))) / y tmp = 0 if b <= -340.0: tmp = t_2 elif b <= -2.05e-202: tmp = t_1 elif b <= 1.1e-179: tmp = t_3 elif b <= 9e-135: tmp = t_1 elif b <= 8.8e+29: tmp = t_3 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64((z ^ y) / a) * Float64(x / y)) t_2 = Float64(x / Float64(a * Float64(y * exp(b)))) t_3 = Float64(Float64(x * (a ^ Float64(t + -1.0))) / y) tmp = 0.0 if (b <= -340.0) tmp = t_2; elseif (b <= -2.05e-202) tmp = t_1; elseif (b <= 1.1e-179) tmp = t_3; elseif (b <= 9e-135) tmp = t_1; elseif (b <= 8.8e+29) tmp = t_3; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((z ^ y) / a) * (x / y); t_2 = x / (a * (y * exp(b))); t_3 = (x * (a ^ (t + -1.0))) / y; tmp = 0.0; if (b <= -340.0) tmp = t_2; elseif (b <= -2.05e-202) tmp = t_1; elseif (b <= 1.1e-179) tmp = t_3; elseif (b <= 9e-135) tmp = t_1; elseif (b <= 8.8e+29) tmp = t_3; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[b, -340.0], t$95$2, If[LessEqual[b, -2.05e-202], t$95$1, If[LessEqual[b, 1.1e-179], t$95$3, If[LessEqual[b, 9e-135], t$95$1, If[LessEqual[b, 8.8e+29], t$95$3, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{{z}^{y}}{a} \cdot \frac{x}{y}\\
t_2 := \frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
t_3 := \frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
\mathbf{if}\;b \leq -340:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq -2.05 \cdot 10^{-202}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 1.1 \cdot 10^{-179}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \leq 9 \cdot 10^{-135}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 8.8 \cdot 10^{+29}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if b < -340 or 8.8000000000000005e29 < b Initial program 100.0%
associate-*l/91.1%
*-commutative91.1%
+-commutative91.1%
associate--l+91.1%
exp-sum74.0%
*-commutative74.0%
exp-to-pow74.0%
sub-neg74.0%
metadata-eval74.0%
exp-diff58.5%
*-commutative58.5%
exp-to-pow58.5%
Simplified58.5%
Taylor expanded in t around 0 73.3%
*-commutative73.3%
times-frac73.3%
Simplified73.3%
Taylor expanded in y around 0 84.8%
if -340 < b < -2.0500000000000002e-202 or 1.10000000000000002e-179 < b < 8.99999999999999975e-135Initial program 98.3%
associate-/l*95.3%
fma-def95.3%
sub-neg95.3%
metadata-eval95.3%
Simplified95.3%
Taylor expanded in t around 0 86.0%
Taylor expanded in b around 0 86.0%
+-commutative86.0%
mul-1-neg86.0%
sub-neg86.0%
exp-diff85.9%
*-commutative85.9%
exp-to-pow85.9%
rem-exp-log87.3%
*-commutative87.3%
associate-*l/87.4%
*-commutative87.4%
associate-/r*67.3%
*-commutative67.3%
times-frac76.9%
Simplified76.9%
if -2.0500000000000002e-202 < b < 1.10000000000000002e-179 or 8.99999999999999975e-135 < b < 8.8000000000000005e29Initial program 97.6%
Taylor expanded in y around 0 77.8%
div-exp75.5%
exp-to-pow75.9%
sub-neg75.9%
metadata-eval75.9%
Simplified75.9%
Taylor expanded in b around 0 77.8%
exp-to-pow78.3%
sub-neg78.3%
metadata-eval78.3%
+-commutative78.3%
Simplified78.3%
Final simplification81.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (* a (* y (exp b)))))
(t_2 (/ (* x (/ (pow z y) a)) y))
(t_3 (/ (* x (pow a (+ t -1.0))) y)))
(if (<= y -6e+147)
t_2
(if (<= y -3.1e+21)
t_1
(if (<= y -9e-22)
t_3
(if (<= y 2.2e-277) t_1 (if (<= y 2.4e-12) t_3 t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a * (y * exp(b)));
double t_2 = (x * (pow(z, y) / a)) / y;
double t_3 = (x * pow(a, (t + -1.0))) / y;
double tmp;
if (y <= -6e+147) {
tmp = t_2;
} else if (y <= -3.1e+21) {
tmp = t_1;
} else if (y <= -9e-22) {
tmp = t_3;
} else if (y <= 2.2e-277) {
tmp = t_1;
} else if (y <= 2.4e-12) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = x / (a * (y * exp(b)))
t_2 = (x * ((z ** y) / a)) / y
t_3 = (x * (a ** (t + (-1.0d0)))) / y
if (y <= (-6d+147)) then
tmp = t_2
else if (y <= (-3.1d+21)) then
tmp = t_1
else if (y <= (-9d-22)) then
tmp = t_3
else if (y <= 2.2d-277) then
tmp = t_1
else if (y <= 2.4d-12) then
tmp = t_3
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a * (y * Math.exp(b)));
double t_2 = (x * (Math.pow(z, y) / a)) / y;
double t_3 = (x * Math.pow(a, (t + -1.0))) / y;
double tmp;
if (y <= -6e+147) {
tmp = t_2;
} else if (y <= -3.1e+21) {
tmp = t_1;
} else if (y <= -9e-22) {
tmp = t_3;
} else if (y <= 2.2e-277) {
tmp = t_1;
} else if (y <= 2.4e-12) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (a * (y * math.exp(b))) t_2 = (x * (math.pow(z, y) / a)) / y t_3 = (x * math.pow(a, (t + -1.0))) / y tmp = 0 if y <= -6e+147: tmp = t_2 elif y <= -3.1e+21: tmp = t_1 elif y <= -9e-22: tmp = t_3 elif y <= 2.2e-277: tmp = t_1 elif y <= 2.4e-12: tmp = t_3 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(a * Float64(y * exp(b)))) t_2 = Float64(Float64(x * Float64((z ^ y) / a)) / y) t_3 = Float64(Float64(x * (a ^ Float64(t + -1.0))) / y) tmp = 0.0 if (y <= -6e+147) tmp = t_2; elseif (y <= -3.1e+21) tmp = t_1; elseif (y <= -9e-22) tmp = t_3; elseif (y <= 2.2e-277) tmp = t_1; elseif (y <= 2.4e-12) tmp = t_3; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (a * (y * exp(b))); t_2 = (x * ((z ^ y) / a)) / y; t_3 = (x * (a ^ (t + -1.0))) / y; tmp = 0.0; if (y <= -6e+147) tmp = t_2; elseif (y <= -3.1e+21) tmp = t_1; elseif (y <= -9e-22) tmp = t_3; elseif (y <= 2.2e-277) tmp = t_1; elseif (y <= 2.4e-12) tmp = t_3; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -6e+147], t$95$2, If[LessEqual[y, -3.1e+21], t$95$1, If[LessEqual[y, -9e-22], t$95$3, If[LessEqual[y, 2.2e-277], t$95$1, If[LessEqual[y, 2.4e-12], t$95$3, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
t_2 := \frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
t_3 := \frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
\mathbf{if}\;y \leq -6 \cdot 10^{+147}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -3.1 \cdot 10^{+21}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -9 \cdot 10^{-22}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{-277}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{-12}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -5.99999999999999987e147 or 2.39999999999999987e-12 < y Initial program 99.8%
associate-/l*99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in t around 0 95.0%
Taylor expanded in b around 0 90.2%
+-commutative90.2%
mul-1-neg90.2%
sub-neg90.2%
exp-diff90.2%
*-commutative90.2%
exp-to-pow90.2%
rem-exp-log90.4%
*-commutative90.4%
Simplified90.4%
if -5.99999999999999987e147 < y < -3.1e21 or -8.99999999999999973e-22 < y < 2.19999999999999996e-277Initial program 97.7%
associate-*l/95.7%
*-commutative95.7%
+-commutative95.7%
associate--l+95.7%
exp-sum85.5%
*-commutative85.5%
exp-to-pow86.2%
sub-neg86.2%
metadata-eval86.2%
exp-diff79.4%
*-commutative79.4%
exp-to-pow79.4%
Simplified79.4%
Taylor expanded in t around 0 74.4%
*-commutative74.4%
times-frac72.2%
Simplified72.2%
Taylor expanded in y around 0 79.3%
if -3.1e21 < y < -8.99999999999999973e-22 or 2.19999999999999996e-277 < y < 2.39999999999999987e-12Initial program 99.1%
Taylor expanded in y around 0 99.1%
div-exp85.5%
exp-to-pow86.1%
sub-neg86.1%
metadata-eval86.1%
Simplified86.1%
Taylor expanded in b around 0 79.8%
exp-to-pow80.5%
sub-neg80.5%
metadata-eval80.5%
+-commutative80.5%
Simplified80.5%
Final simplification84.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (* a (* y (exp b))))) (t_2 (/ (* x (/ (pow z y) a)) y)))
(if (<= y -6e+147)
t_2
(if (<= y -1.75e+18)
t_1
(if (<= y -3.7e-22)
(/ (* x (pow a (+ t -1.0))) y)
(if (<= y 2e-276)
t_1
(if (<= y 3.7e-12) (/ (/ (* x (pow a t)) a) y) t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a * (y * exp(b)));
double t_2 = (x * (pow(z, y) / a)) / y;
double tmp;
if (y <= -6e+147) {
tmp = t_2;
} else if (y <= -1.75e+18) {
tmp = t_1;
} else if (y <= -3.7e-22) {
tmp = (x * pow(a, (t + -1.0))) / y;
} else if (y <= 2e-276) {
tmp = t_1;
} else if (y <= 3.7e-12) {
tmp = ((x * pow(a, t)) / a) / 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 = x / (a * (y * exp(b)))
t_2 = (x * ((z ** y) / a)) / y
if (y <= (-6d+147)) then
tmp = t_2
else if (y <= (-1.75d+18)) then
tmp = t_1
else if (y <= (-3.7d-22)) then
tmp = (x * (a ** (t + (-1.0d0)))) / y
else if (y <= 2d-276) then
tmp = t_1
else if (y <= 3.7d-12) then
tmp = ((x * (a ** t)) / a) / 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 = x / (a * (y * Math.exp(b)));
double t_2 = (x * (Math.pow(z, y) / a)) / y;
double tmp;
if (y <= -6e+147) {
tmp = t_2;
} else if (y <= -1.75e+18) {
tmp = t_1;
} else if (y <= -3.7e-22) {
tmp = (x * Math.pow(a, (t + -1.0))) / y;
} else if (y <= 2e-276) {
tmp = t_1;
} else if (y <= 3.7e-12) {
tmp = ((x * Math.pow(a, t)) / a) / y;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (a * (y * math.exp(b))) t_2 = (x * (math.pow(z, y) / a)) / y tmp = 0 if y <= -6e+147: tmp = t_2 elif y <= -1.75e+18: tmp = t_1 elif y <= -3.7e-22: tmp = (x * math.pow(a, (t + -1.0))) / y elif y <= 2e-276: tmp = t_1 elif y <= 3.7e-12: tmp = ((x * math.pow(a, t)) / a) / y else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(a * Float64(y * exp(b)))) t_2 = Float64(Float64(x * Float64((z ^ y) / a)) / y) tmp = 0.0 if (y <= -6e+147) tmp = t_2; elseif (y <= -1.75e+18) tmp = t_1; elseif (y <= -3.7e-22) tmp = Float64(Float64(x * (a ^ Float64(t + -1.0))) / y); elseif (y <= 2e-276) tmp = t_1; elseif (y <= 3.7e-12) tmp = Float64(Float64(Float64(x * (a ^ t)) / a) / y); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (a * (y * exp(b))); t_2 = (x * ((z ^ y) / a)) / y; tmp = 0.0; if (y <= -6e+147) tmp = t_2; elseif (y <= -1.75e+18) tmp = t_1; elseif (y <= -3.7e-22) tmp = (x * (a ^ (t + -1.0))) / y; elseif (y <= 2e-276) tmp = t_1; elseif (y <= 3.7e-12) tmp = ((x * (a ^ t)) / a) / y; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -6e+147], t$95$2, If[LessEqual[y, -1.75e+18], t$95$1, If[LessEqual[y, -3.7e-22], N[(N[(x * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 2e-276], t$95$1, If[LessEqual[y, 3.7e-12], N[(N[(N[(x * N[Power[a, t], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
t_2 := \frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{if}\;y \leq -6 \cdot 10^{+147}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -1.75 \cdot 10^{+18}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -3.7 \cdot 10^{-22}:\\
\;\;\;\;\frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
\mathbf{elif}\;y \leq 2 \cdot 10^{-276}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 3.7 \cdot 10^{-12}:\\
\;\;\;\;\frac{\frac{x \cdot {a}^{t}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -5.99999999999999987e147 or 3.69999999999999999e-12 < y Initial program 99.8%
associate-/l*99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in t around 0 95.0%
Taylor expanded in b around 0 90.2%
+-commutative90.2%
mul-1-neg90.2%
sub-neg90.2%
exp-diff90.2%
*-commutative90.2%
exp-to-pow90.2%
rem-exp-log90.4%
*-commutative90.4%
Simplified90.4%
if -5.99999999999999987e147 < y < -1.75e18 or -3.7e-22 < y < 2e-276Initial program 97.7%
associate-*l/95.7%
*-commutative95.7%
+-commutative95.7%
associate--l+95.7%
exp-sum85.5%
*-commutative85.5%
exp-to-pow86.2%
sub-neg86.2%
metadata-eval86.2%
exp-diff79.4%
*-commutative79.4%
exp-to-pow79.4%
Simplified79.4%
Taylor expanded in t around 0 74.4%
*-commutative74.4%
times-frac72.2%
Simplified72.2%
Taylor expanded in y around 0 79.3%
if -1.75e18 < y < -3.7e-22Initial program 100.0%
Taylor expanded in y around 0 100.0%
div-exp87.5%
exp-to-pow87.5%
sub-neg87.5%
metadata-eval87.5%
Simplified87.5%
Taylor expanded in b around 0 100.0%
exp-to-pow100.0%
sub-neg100.0%
metadata-eval100.0%
+-commutative100.0%
Simplified100.0%
if 2e-276 < y < 3.69999999999999999e-12Initial program 99.0%
expm1-log1p-u73.4%
expm1-udef67.3%
Applied egg-rr58.7%
expm1-def65.3%
expm1-log1p86.2%
*-commutative86.2%
associate-*l/86.2%
associate-*r/86.2%
associate-/l/86.2%
*-commutative86.2%
Simplified86.2%
Taylor expanded in y around 0 86.2%
associate-/r*79.3%
Simplified79.3%
Taylor expanded in b around 0 78.0%
Final simplification84.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (* a (* y (exp b))))))
(if (<= y -6e+147)
(/ (* x (/ (pow z y) a)) y)
(if (<= y -3.2e+17)
t_1
(if (<= y -3.7e-22)
(/ (* x (pow a (+ t -1.0))) y)
(if (<= y 7.5e-281)
t_1
(if (<= y 3.7e-12)
(/ (/ (* x (pow a t)) a) y)
(/ (/ (* x (pow z y)) a) y))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a * (y * exp(b)));
double tmp;
if (y <= -6e+147) {
tmp = (x * (pow(z, y) / a)) / y;
} else if (y <= -3.2e+17) {
tmp = t_1;
} else if (y <= -3.7e-22) {
tmp = (x * pow(a, (t + -1.0))) / y;
} else if (y <= 7.5e-281) {
tmp = t_1;
} else if (y <= 3.7e-12) {
tmp = ((x * pow(a, t)) / a) / y;
} else {
tmp = ((x * pow(z, y)) / 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) :: t_1
real(8) :: tmp
t_1 = x / (a * (y * exp(b)))
if (y <= (-6d+147)) then
tmp = (x * ((z ** y) / a)) / y
else if (y <= (-3.2d+17)) then
tmp = t_1
else if (y <= (-3.7d-22)) then
tmp = (x * (a ** (t + (-1.0d0)))) / y
else if (y <= 7.5d-281) then
tmp = t_1
else if (y <= 3.7d-12) then
tmp = ((x * (a ** t)) / a) / y
else
tmp = ((x * (z ** y)) / 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 t_1 = x / (a * (y * Math.exp(b)));
double tmp;
if (y <= -6e+147) {
tmp = (x * (Math.pow(z, y) / a)) / y;
} else if (y <= -3.2e+17) {
tmp = t_1;
} else if (y <= -3.7e-22) {
tmp = (x * Math.pow(a, (t + -1.0))) / y;
} else if (y <= 7.5e-281) {
tmp = t_1;
} else if (y <= 3.7e-12) {
tmp = ((x * Math.pow(a, t)) / a) / y;
} else {
tmp = ((x * Math.pow(z, y)) / a) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (a * (y * math.exp(b))) tmp = 0 if y <= -6e+147: tmp = (x * (math.pow(z, y) / a)) / y elif y <= -3.2e+17: tmp = t_1 elif y <= -3.7e-22: tmp = (x * math.pow(a, (t + -1.0))) / y elif y <= 7.5e-281: tmp = t_1 elif y <= 3.7e-12: tmp = ((x * math.pow(a, t)) / a) / y else: tmp = ((x * math.pow(z, y)) / a) / y return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(a * Float64(y * exp(b)))) tmp = 0.0 if (y <= -6e+147) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y); elseif (y <= -3.2e+17) tmp = t_1; elseif (y <= -3.7e-22) tmp = Float64(Float64(x * (a ^ Float64(t + -1.0))) / y); elseif (y <= 7.5e-281) tmp = t_1; elseif (y <= 3.7e-12) tmp = Float64(Float64(Float64(x * (a ^ t)) / a) / y); else tmp = Float64(Float64(Float64(x * (z ^ y)) / a) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (a * (y * exp(b))); tmp = 0.0; if (y <= -6e+147) tmp = (x * ((z ^ y) / a)) / y; elseif (y <= -3.2e+17) tmp = t_1; elseif (y <= -3.7e-22) tmp = (x * (a ^ (t + -1.0))) / y; elseif (y <= 7.5e-281) tmp = t_1; elseif (y <= 3.7e-12) tmp = ((x * (a ^ t)) / a) / y; else tmp = ((x * (z ^ y)) / a) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6e+147], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, -3.2e+17], t$95$1, If[LessEqual[y, -3.7e-22], N[(N[(x * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 7.5e-281], t$95$1, If[LessEqual[y, 3.7e-12], N[(N[(N[(x * N[Power[a, t], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision], N[(N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\mathbf{if}\;y \leq -6 \cdot 10^{+147}:\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{elif}\;y \leq -3.2 \cdot 10^{+17}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -3.7 \cdot 10^{-22}:\\
\;\;\;\;\frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{-281}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 3.7 \cdot 10^{-12}:\\
\;\;\;\;\frac{\frac{x \cdot {a}^{t}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x \cdot {z}^{y}}{a}}{y}\\
\end{array}
\end{array}
if y < -5.99999999999999987e147Initial program 100.0%
associate-/l*100.0%
fma-def100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in t around 0 93.1%
Taylor expanded in b around 0 93.1%
+-commutative93.1%
mul-1-neg93.1%
sub-neg93.1%
exp-diff93.1%
*-commutative93.1%
exp-to-pow93.1%
rem-exp-log93.1%
*-commutative93.1%
Simplified93.1%
if -5.99999999999999987e147 < y < -3.2e17 or -3.7e-22 < y < 7.49999999999999968e-281Initial program 97.7%
associate-*l/95.7%
*-commutative95.7%
+-commutative95.7%
associate--l+95.7%
exp-sum85.5%
*-commutative85.5%
exp-to-pow86.2%
sub-neg86.2%
metadata-eval86.2%
exp-diff79.4%
*-commutative79.4%
exp-to-pow79.4%
Simplified79.4%
Taylor expanded in t around 0 74.4%
*-commutative74.4%
times-frac72.2%
Simplified72.2%
Taylor expanded in y around 0 79.3%
if -3.2e17 < y < -3.7e-22Initial program 100.0%
Taylor expanded in y around 0 100.0%
div-exp87.5%
exp-to-pow87.5%
sub-neg87.5%
metadata-eval87.5%
Simplified87.5%
Taylor expanded in b around 0 100.0%
exp-to-pow100.0%
sub-neg100.0%
metadata-eval100.0%
+-commutative100.0%
Simplified100.0%
if 7.49999999999999968e-281 < y < 3.69999999999999999e-12Initial program 99.0%
expm1-log1p-u73.4%
expm1-udef67.3%
Applied egg-rr58.7%
expm1-def65.3%
expm1-log1p86.2%
*-commutative86.2%
associate-*l/86.2%
associate-*r/86.2%
associate-/l/86.2%
*-commutative86.2%
Simplified86.2%
Taylor expanded in y around 0 86.2%
associate-/r*79.3%
Simplified79.3%
Taylor expanded in b around 0 78.0%
if 3.69999999999999999e-12 < y Initial program 99.6%
expm1-log1p-u84.4%
expm1-udef81.6%
Applied egg-rr46.0%
expm1-def49.1%
expm1-log1p61.0%
*-commutative61.0%
associate-*l/61.0%
associate-*r/61.0%
associate-/l/61.0%
*-commutative61.0%
Simplified61.0%
Taylor expanded in t around 0 74.6%
associate-/r*74.6%
Simplified74.6%
Taylor expanded in b around 0 88.4%
Final simplification84.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -850.0) (not (<= b 62000000000000.0))) (/ x (* a (* y (exp b)))) (* (/ (pow z y) a) (/ x y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -850.0) || !(b <= 62000000000000.0)) {
tmp = x / (a * (y * exp(b)));
} else {
tmp = (pow(z, y) / 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 <= (-850.0d0)) .or. (.not. (b <= 62000000000000.0d0))) then
tmp = x / (a * (y * exp(b)))
else
tmp = ((z ** y) / 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 <= -850.0) || !(b <= 62000000000000.0)) {
tmp = x / (a * (y * Math.exp(b)));
} else {
tmp = (Math.pow(z, y) / a) * (x / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -850.0) or not (b <= 62000000000000.0): tmp = x / (a * (y * math.exp(b))) else: tmp = (math.pow(z, y) / a) * (x / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -850.0) || !(b <= 62000000000000.0)) tmp = Float64(x / Float64(a * Float64(y * exp(b)))); else tmp = Float64(Float64((z ^ y) / a) * Float64(x / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -850.0) || ~((b <= 62000000000000.0))) tmp = x / (a * (y * exp(b))); else tmp = ((z ^ y) / a) * (x / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -850.0], N[Not[LessEqual[b, 62000000000000.0]], $MachinePrecision]], N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -850 \lor \neg \left(b \leq 62000000000000\right):\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{{z}^{y}}{a} \cdot \frac{x}{y}\\
\end{array}
\end{array}
if b < -850 or 6.2e13 < b Initial program 100.0%
associate-*l/91.3%
*-commutative91.3%
+-commutative91.3%
associate--l+91.3%
exp-sum74.6%
*-commutative74.6%
exp-to-pow74.6%
sub-neg74.6%
metadata-eval74.6%
exp-diff58.7%
*-commutative58.7%
exp-to-pow58.7%
Simplified58.7%
Taylor expanded in t around 0 73.1%
*-commutative73.1%
times-frac73.1%
Simplified73.1%
Taylor expanded in y around 0 84.4%
if -850 < b < 6.2e13Initial program 97.8%
associate-/l*97.0%
fma-def97.0%
sub-neg97.0%
metadata-eval97.0%
Simplified97.0%
Taylor expanded in t around 0 72.2%
Taylor expanded in b around 0 73.0%
+-commutative73.0%
mul-1-neg73.0%
sub-neg73.0%
exp-diff73.0%
*-commutative73.0%
exp-to-pow73.0%
rem-exp-log73.8%
*-commutative73.8%
associate-*l/73.9%
*-commutative73.9%
associate-/r*64.1%
*-commutative64.1%
times-frac69.2%
Simplified69.2%
Final simplification76.7%
(FPCore (x y z t a b) :precision binary64 (/ x (* a (* y (exp b)))))
double code(double x, double y, double z, double t, double a, double b) {
return x / (a * (y * exp(b)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x / (a * (y * exp(b)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x / (a * (y * Math.exp(b)));
}
def code(x, y, z, t, a, b): return x / (a * (y * math.exp(b)))
function code(x, y, z, t, a, b) return Float64(x / Float64(a * Float64(y * exp(b)))) end
function tmp = code(x, y, z, t, a, b) tmp = x / (a * (y * exp(b))); end
code[x_, y_, z_, t_, a_, b_] := N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{a \cdot \left(y \cdot e^{b}\right)}
\end{array}
Initial program 98.9%
associate-*l/92.0%
*-commutative92.0%
+-commutative92.0%
associate--l+92.0%
exp-sum77.1%
*-commutative77.1%
exp-to-pow77.6%
sub-neg77.6%
metadata-eval77.6%
exp-diff69.8%
*-commutative69.8%
exp-to-pow69.8%
Simplified69.8%
Taylor expanded in t around 0 68.1%
*-commutative68.1%
times-frac70.7%
Simplified70.7%
Taylor expanded in y around 0 59.8%
Final simplification59.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* y b))))
(if (<= y -5.5e+200)
(/ 1.0 (/ a (/ x t_1)))
(if (<= y -120000000000.0)
(- (* (* b b) (/ (* x 0.5) (* y a))) (/ x (* y (/ a b))))
(if (<= y -1.7e-244)
(+ (/ (- x (* x b)) (* y a)) (* (/ x y) (/ (* b b) a)))
(if (<= y 2.15e-255)
(/ x (* y (+ a (* a b))))
(if (<= y 2.55e-126)
(/ (/ (* x (- 1.0 b)) y) a)
(/ x (* a t_1)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (y * b);
double tmp;
if (y <= -5.5e+200) {
tmp = 1.0 / (a / (x / t_1));
} else if (y <= -120000000000.0) {
tmp = ((b * b) * ((x * 0.5) / (y * a))) - (x / (y * (a / b)));
} else if (y <= -1.7e-244) {
tmp = ((x - (x * b)) / (y * a)) + ((x / y) * ((b * b) / a));
} else if (y <= 2.15e-255) {
tmp = x / (y * (a + (a * b)));
} else if (y <= 2.55e-126) {
tmp = ((x * (1.0 - b)) / y) / a;
} else {
tmp = x / (a * 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 = y + (y * b)
if (y <= (-5.5d+200)) then
tmp = 1.0d0 / (a / (x / t_1))
else if (y <= (-120000000000.0d0)) then
tmp = ((b * b) * ((x * 0.5d0) / (y * a))) - (x / (y * (a / b)))
else if (y <= (-1.7d-244)) then
tmp = ((x - (x * b)) / (y * a)) + ((x / y) * ((b * b) / a))
else if (y <= 2.15d-255) then
tmp = x / (y * (a + (a * b)))
else if (y <= 2.55d-126) then
tmp = ((x * (1.0d0 - b)) / y) / a
else
tmp = x / (a * 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 = y + (y * b);
double tmp;
if (y <= -5.5e+200) {
tmp = 1.0 / (a / (x / t_1));
} else if (y <= -120000000000.0) {
tmp = ((b * b) * ((x * 0.5) / (y * a))) - (x / (y * (a / b)));
} else if (y <= -1.7e-244) {
tmp = ((x - (x * b)) / (y * a)) + ((x / y) * ((b * b) / a));
} else if (y <= 2.15e-255) {
tmp = x / (y * (a + (a * b)));
} else if (y <= 2.55e-126) {
tmp = ((x * (1.0 - b)) / y) / a;
} else {
tmp = x / (a * t_1);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (y * b) tmp = 0 if y <= -5.5e+200: tmp = 1.0 / (a / (x / t_1)) elif y <= -120000000000.0: tmp = ((b * b) * ((x * 0.5) / (y * a))) - (x / (y * (a / b))) elif y <= -1.7e-244: tmp = ((x - (x * b)) / (y * a)) + ((x / y) * ((b * b) / a)) elif y <= 2.15e-255: tmp = x / (y * (a + (a * b))) elif y <= 2.55e-126: tmp = ((x * (1.0 - b)) / y) / a else: tmp = x / (a * t_1) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(y * b)) tmp = 0.0 if (y <= -5.5e+200) tmp = Float64(1.0 / Float64(a / Float64(x / t_1))); elseif (y <= -120000000000.0) tmp = Float64(Float64(Float64(b * b) * Float64(Float64(x * 0.5) / Float64(y * a))) - Float64(x / Float64(y * Float64(a / b)))); elseif (y <= -1.7e-244) tmp = Float64(Float64(Float64(x - Float64(x * b)) / Float64(y * a)) + Float64(Float64(x / y) * Float64(Float64(b * b) / a))); elseif (y <= 2.15e-255) tmp = Float64(x / Float64(y * Float64(a + Float64(a * b)))); elseif (y <= 2.55e-126) tmp = Float64(Float64(Float64(x * Float64(1.0 - b)) / y) / a); else tmp = Float64(x / Float64(a * t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (y * b); tmp = 0.0; if (y <= -5.5e+200) tmp = 1.0 / (a / (x / t_1)); elseif (y <= -120000000000.0) tmp = ((b * b) * ((x * 0.5) / (y * a))) - (x / (y * (a / b))); elseif (y <= -1.7e-244) tmp = ((x - (x * b)) / (y * a)) + ((x / y) * ((b * b) / a)); elseif (y <= 2.15e-255) tmp = x / (y * (a + (a * b))); elseif (y <= 2.55e-126) tmp = ((x * (1.0 - b)) / y) / a; else tmp = x / (a * t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(y * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.5e+200], N[(1.0 / N[(a / N[(x / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -120000000000.0], N[(N[(N[(b * b), $MachinePrecision] * N[(N[(x * 0.5), $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[(y * N[(a / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.7e-244], N[(N[(N[(x - N[(x * b), $MachinePrecision]), $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision] + N[(N[(x / y), $MachinePrecision] * N[(N[(b * b), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.15e-255], N[(x / N[(y * N[(a + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.55e-126], N[(N[(N[(x * N[(1.0 - b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] / a), $MachinePrecision], N[(x / N[(a * t$95$1), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + y \cdot b\\
\mathbf{if}\;y \leq -5.5 \cdot 10^{+200}:\\
\;\;\;\;\frac{1}{\frac{a}{\frac{x}{t_1}}}\\
\mathbf{elif}\;y \leq -120000000000:\\
\;\;\;\;\left(b \cdot b\right) \cdot \frac{x \cdot 0.5}{y \cdot a} - \frac{x}{y \cdot \frac{a}{b}}\\
\mathbf{elif}\;y \leq -1.7 \cdot 10^{-244}:\\
\;\;\;\;\frac{x - x \cdot b}{y \cdot a} + \frac{x}{y} \cdot \frac{b \cdot b}{a}\\
\mathbf{elif}\;y \leq 2.15 \cdot 10^{-255}:\\
\;\;\;\;\frac{x}{y \cdot \left(a + a \cdot b\right)}\\
\mathbf{elif}\;y \leq 2.55 \cdot 10^{-126}:\\
\;\;\;\;\frac{\frac{x \cdot \left(1 - b\right)}{y}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot t_1}\\
\end{array}
\end{array}
if y < -5.5e200Initial program 100.0%
associate-*l/93.1%
*-commutative93.1%
+-commutative93.1%
associate--l+93.1%
exp-sum69.0%
*-commutative69.0%
exp-to-pow69.0%
sub-neg69.0%
metadata-eval69.0%
exp-diff62.1%
*-commutative62.1%
exp-to-pow62.1%
Simplified62.1%
Taylor expanded in t around 0 69.0%
*-commutative69.0%
times-frac82.8%
Simplified82.8%
Taylor expanded in y around 0 49.5%
Taylor expanded in b around 0 42.6%
clear-num42.6%
inv-pow42.6%
distribute-lft-out46.2%
*-commutative46.2%
Applied egg-rr46.2%
unpow-146.2%
associate-/l*46.3%
Simplified46.3%
if -5.5e200 < y < -1.2e11Initial program 100.0%
associate-*l/95.6%
*-commutative95.6%
+-commutative95.6%
associate--l+95.6%
exp-sum68.9%
*-commutative68.9%
exp-to-pow68.9%
sub-neg68.9%
metadata-eval68.9%
exp-diff51.1%
*-commutative51.1%
exp-to-pow51.1%
Simplified51.1%
Taylor expanded in t around 0 60.1%
*-commutative60.1%
times-frac60.2%
Simplified60.2%
Taylor expanded in y around 0 52.9%
Taylor expanded in b around 0 22.4%
+-commutative22.4%
+-commutative22.4%
mul-1-neg22.4%
unsub-neg22.4%
associate-/l/20.4%
times-frac20.4%
mul-1-neg20.4%
distribute-rgt-neg-in20.4%
distribute-rgt-out22.7%
metadata-eval22.7%
*-commutative22.7%
distribute-lft-neg-in22.7%
metadata-eval22.7%
unpow222.7%
Simplified24.9%
Taylor expanded in b around inf 37.9%
mul-1-neg37.9%
times-frac39.8%
distribute-lft-neg-out39.8%
+-commutative39.8%
*-commutative39.8%
distribute-rgt-neg-in39.8%
unsub-neg39.8%
associate-*r/39.8%
unpow239.8%
associate-*l*39.8%
*-commutative39.8%
*-commutative39.8%
associate-*l*39.8%
associate-*r/37.8%
times-frac35.8%
associate-/l*39.9%
associate-*r/39.9%
Simplified39.9%
if -1.2e11 < y < -1.70000000000000004e-244Initial program 96.4%
associate-*l/96.9%
*-commutative96.9%
+-commutative96.9%
associate--l+96.9%
exp-sum93.0%
*-commutative93.0%
exp-to-pow93.9%
sub-neg93.9%
metadata-eval93.9%
exp-diff93.9%
*-commutative93.9%
exp-to-pow93.9%
Simplified93.9%
Taylor expanded in t around 0 81.1%
*-commutative81.1%
times-frac77.4%
Simplified77.4%
Taylor expanded in y around 0 79.2%
Taylor expanded in b around 0 21.0%
Taylor expanded in b around 0 46.3%
mul-1-neg46.3%
times-frac44.4%
distribute-lft-neg-out44.4%
associate-+r+44.4%
*-commutative44.4%
+-commutative44.4%
cancel-sign-sub-inv44.4%
times-frac46.3%
*-commutative46.3%
div-sub46.4%
*-commutative46.4%
unpow246.4%
times-frac48.4%
Simplified48.4%
if -1.70000000000000004e-244 < y < 2.14999999999999994e-255Initial program 98.8%
associate-*l/88.3%
*-commutative88.3%
+-commutative88.3%
associate--l+88.3%
exp-sum83.0%
*-commutative83.0%
exp-to-pow84.1%
sub-neg84.1%
metadata-eval84.1%
exp-diff84.1%
*-commutative84.1%
exp-to-pow84.1%
Simplified84.1%
Taylor expanded in t around 0 69.7%
*-commutative69.7%
times-frac74.6%
Simplified74.6%
Taylor expanded in y around 0 69.7%
Taylor expanded in b around 0 34.2%
Taylor expanded in y around 0 49.3%
if 2.14999999999999994e-255 < y < 2.55000000000000001e-126Initial program 98.6%
associate-*l/90.6%
*-commutative90.6%
+-commutative90.6%
associate--l+90.6%
exp-sum74.6%
*-commutative74.6%
exp-to-pow75.8%
sub-neg75.8%
metadata-eval75.8%
exp-diff75.8%
*-commutative75.8%
exp-to-pow75.8%
Simplified75.8%
Taylor expanded in t around 0 68.0%
*-commutative68.0%
times-frac74.5%
Simplified74.5%
Taylor expanded in y around 0 68.0%
Taylor expanded in b around 0 28.9%
Taylor expanded in b around 0 32.8%
mul-1-neg32.8%
times-frac24.9%
distribute-lft-neg-out24.9%
*-commutative24.9%
+-commutative24.9%
cancel-sign-sub-inv24.9%
times-frac32.8%
*-commutative32.8%
div-sub37.1%
associate-/r*51.2%
*-rgt-identity51.2%
*-commutative51.2%
distribute-lft-out--51.2%
Simplified51.2%
if 2.55000000000000001e-126 < y Initial program 99.5%
associate-*l/88.0%
*-commutative88.0%
+-commutative88.0%
associate--l+88.0%
exp-sum74.2%
*-commutative74.2%
exp-to-pow74.6%
sub-neg74.6%
metadata-eval74.6%
exp-diff63.1%
*-commutative63.1%
exp-to-pow63.1%
Simplified63.1%
Taylor expanded in t around 0 64.0%
*-commutative64.0%
times-frac66.3%
Simplified66.3%
Taylor expanded in y around 0 51.0%
Taylor expanded in b around 0 35.1%
distribute-lft-out37.5%
*-commutative37.5%
Simplified37.5%
Final simplification43.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* y b))))
(if (<= y -1.6e+200)
(/ 1.0 (/ a (/ x t_1)))
(if (<= y -1000000000000.0)
(- (* (* b b) (* 0.5 (/ (/ x y) a))) (* (/ x y) (/ b a)))
(if (<= y -3.2e-242)
(+ (/ (- x (* x b)) (* y a)) (* (/ x y) (/ (* b b) a)))
(if (<= y 1.8e-254)
(/ x (* y (+ a (* a b))))
(if (<= y 1.36e-126)
(/ (/ (* x (- 1.0 b)) y) a)
(/ x (* a t_1)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (y * b);
double tmp;
if (y <= -1.6e+200) {
tmp = 1.0 / (a / (x / t_1));
} else if (y <= -1000000000000.0) {
tmp = ((b * b) * (0.5 * ((x / y) / a))) - ((x / y) * (b / a));
} else if (y <= -3.2e-242) {
tmp = ((x - (x * b)) / (y * a)) + ((x / y) * ((b * b) / a));
} else if (y <= 1.8e-254) {
tmp = x / (y * (a + (a * b)));
} else if (y <= 1.36e-126) {
tmp = ((x * (1.0 - b)) / y) / a;
} else {
tmp = x / (a * 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 = y + (y * b)
if (y <= (-1.6d+200)) then
tmp = 1.0d0 / (a / (x / t_1))
else if (y <= (-1000000000000.0d0)) then
tmp = ((b * b) * (0.5d0 * ((x / y) / a))) - ((x / y) * (b / a))
else if (y <= (-3.2d-242)) then
tmp = ((x - (x * b)) / (y * a)) + ((x / y) * ((b * b) / a))
else if (y <= 1.8d-254) then
tmp = x / (y * (a + (a * b)))
else if (y <= 1.36d-126) then
tmp = ((x * (1.0d0 - b)) / y) / a
else
tmp = x / (a * 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 = y + (y * b);
double tmp;
if (y <= -1.6e+200) {
tmp = 1.0 / (a / (x / t_1));
} else if (y <= -1000000000000.0) {
tmp = ((b * b) * (0.5 * ((x / y) / a))) - ((x / y) * (b / a));
} else if (y <= -3.2e-242) {
tmp = ((x - (x * b)) / (y * a)) + ((x / y) * ((b * b) / a));
} else if (y <= 1.8e-254) {
tmp = x / (y * (a + (a * b)));
} else if (y <= 1.36e-126) {
tmp = ((x * (1.0 - b)) / y) / a;
} else {
tmp = x / (a * t_1);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (y * b) tmp = 0 if y <= -1.6e+200: tmp = 1.0 / (a / (x / t_1)) elif y <= -1000000000000.0: tmp = ((b * b) * (0.5 * ((x / y) / a))) - ((x / y) * (b / a)) elif y <= -3.2e-242: tmp = ((x - (x * b)) / (y * a)) + ((x / y) * ((b * b) / a)) elif y <= 1.8e-254: tmp = x / (y * (a + (a * b))) elif y <= 1.36e-126: tmp = ((x * (1.0 - b)) / y) / a else: tmp = x / (a * t_1) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(y * b)) tmp = 0.0 if (y <= -1.6e+200) tmp = Float64(1.0 / Float64(a / Float64(x / t_1))); elseif (y <= -1000000000000.0) tmp = Float64(Float64(Float64(b * b) * Float64(0.5 * Float64(Float64(x / y) / a))) - Float64(Float64(x / y) * Float64(b / a))); elseif (y <= -3.2e-242) tmp = Float64(Float64(Float64(x - Float64(x * b)) / Float64(y * a)) + Float64(Float64(x / y) * Float64(Float64(b * b) / a))); elseif (y <= 1.8e-254) tmp = Float64(x / Float64(y * Float64(a + Float64(a * b)))); elseif (y <= 1.36e-126) tmp = Float64(Float64(Float64(x * Float64(1.0 - b)) / y) / a); else tmp = Float64(x / Float64(a * t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (y * b); tmp = 0.0; if (y <= -1.6e+200) tmp = 1.0 / (a / (x / t_1)); elseif (y <= -1000000000000.0) tmp = ((b * b) * (0.5 * ((x / y) / a))) - ((x / y) * (b / a)); elseif (y <= -3.2e-242) tmp = ((x - (x * b)) / (y * a)) + ((x / y) * ((b * b) / a)); elseif (y <= 1.8e-254) tmp = x / (y * (a + (a * b))); elseif (y <= 1.36e-126) tmp = ((x * (1.0 - b)) / y) / a; else tmp = x / (a * t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(y * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.6e+200], N[(1.0 / N[(a / N[(x / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1000000000000.0], N[(N[(N[(b * b), $MachinePrecision] * N[(0.5 * N[(N[(x / y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x / y), $MachinePrecision] * N[(b / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.2e-242], N[(N[(N[(x - N[(x * b), $MachinePrecision]), $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision] + N[(N[(x / y), $MachinePrecision] * N[(N[(b * b), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.8e-254], N[(x / N[(y * N[(a + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.36e-126], N[(N[(N[(x * N[(1.0 - b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] / a), $MachinePrecision], N[(x / N[(a * t$95$1), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + y \cdot b\\
\mathbf{if}\;y \leq -1.6 \cdot 10^{+200}:\\
\;\;\;\;\frac{1}{\frac{a}{\frac{x}{t_1}}}\\
\mathbf{elif}\;y \leq -1000000000000:\\
\;\;\;\;\left(b \cdot b\right) \cdot \left(0.5 \cdot \frac{\frac{x}{y}}{a}\right) - \frac{x}{y} \cdot \frac{b}{a}\\
\mathbf{elif}\;y \leq -3.2 \cdot 10^{-242}:\\
\;\;\;\;\frac{x - x \cdot b}{y \cdot a} + \frac{x}{y} \cdot \frac{b \cdot b}{a}\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{-254}:\\
\;\;\;\;\frac{x}{y \cdot \left(a + a \cdot b\right)}\\
\mathbf{elif}\;y \leq 1.36 \cdot 10^{-126}:\\
\;\;\;\;\frac{\frac{x \cdot \left(1 - b\right)}{y}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot t_1}\\
\end{array}
\end{array}
if y < -1.60000000000000016e200Initial program 100.0%
associate-*l/93.1%
*-commutative93.1%
+-commutative93.1%
associate--l+93.1%
exp-sum69.0%
*-commutative69.0%
exp-to-pow69.0%
sub-neg69.0%
metadata-eval69.0%
exp-diff62.1%
*-commutative62.1%
exp-to-pow62.1%
Simplified62.1%
Taylor expanded in t around 0 69.0%
*-commutative69.0%
times-frac82.8%
Simplified82.8%
Taylor expanded in y around 0 49.5%
Taylor expanded in b around 0 42.6%
clear-num42.6%
inv-pow42.6%
distribute-lft-out46.2%
*-commutative46.2%
Applied egg-rr46.2%
unpow-146.2%
associate-/l*46.3%
Simplified46.3%
if -1.60000000000000016e200 < y < -1e12Initial program 100.0%
associate-*l/95.6%
*-commutative95.6%
+-commutative95.6%
associate--l+95.6%
exp-sum68.9%
*-commutative68.9%
exp-to-pow68.9%
sub-neg68.9%
metadata-eval68.9%
exp-diff51.1%
*-commutative51.1%
exp-to-pow51.1%
Simplified51.1%
Taylor expanded in t around 0 60.1%
*-commutative60.1%
times-frac60.2%
Simplified60.2%
Taylor expanded in y around 0 52.9%
Taylor expanded in b around 0 22.4%
+-commutative22.4%
+-commutative22.4%
mul-1-neg22.4%
unsub-neg22.4%
associate-/l/20.4%
times-frac20.4%
mul-1-neg20.4%
distribute-rgt-neg-in20.4%
distribute-rgt-out22.7%
metadata-eval22.7%
*-commutative22.7%
distribute-lft-neg-in22.7%
metadata-eval22.7%
unpow222.7%
Simplified24.9%
Taylor expanded in b around inf 35.8%
mul-1-neg35.8%
times-frac40.0%
distribute-lft-neg-out40.0%
*-commutative40.0%
distribute-neg-frac40.0%
Simplified40.0%
if -1e12 < y < -3.19999999999999999e-242Initial program 96.4%
associate-*l/96.9%
*-commutative96.9%
+-commutative96.9%
associate--l+96.9%
exp-sum93.0%
*-commutative93.0%
exp-to-pow93.9%
sub-neg93.9%
metadata-eval93.9%
exp-diff93.9%
*-commutative93.9%
exp-to-pow93.9%
Simplified93.9%
Taylor expanded in t around 0 81.1%
*-commutative81.1%
times-frac77.4%
Simplified77.4%
Taylor expanded in y around 0 79.2%
Taylor expanded in b around 0 21.0%
Taylor expanded in b around 0 46.3%
mul-1-neg46.3%
times-frac44.4%
distribute-lft-neg-out44.4%
associate-+r+44.4%
*-commutative44.4%
+-commutative44.4%
cancel-sign-sub-inv44.4%
times-frac46.3%
*-commutative46.3%
div-sub46.4%
*-commutative46.4%
unpow246.4%
times-frac48.4%
Simplified48.4%
if -3.19999999999999999e-242 < y < 1.79999999999999992e-254Initial program 98.8%
associate-*l/88.3%
*-commutative88.3%
+-commutative88.3%
associate--l+88.3%
exp-sum83.0%
*-commutative83.0%
exp-to-pow84.1%
sub-neg84.1%
metadata-eval84.1%
exp-diff84.1%
*-commutative84.1%
exp-to-pow84.1%
Simplified84.1%
Taylor expanded in t around 0 69.7%
*-commutative69.7%
times-frac74.6%
Simplified74.6%
Taylor expanded in y around 0 69.7%
Taylor expanded in b around 0 34.2%
Taylor expanded in y around 0 49.3%
if 1.79999999999999992e-254 < y < 1.3599999999999999e-126Initial program 98.6%
associate-*l/90.6%
*-commutative90.6%
+-commutative90.6%
associate--l+90.6%
exp-sum74.6%
*-commutative74.6%
exp-to-pow75.8%
sub-neg75.8%
metadata-eval75.8%
exp-diff75.8%
*-commutative75.8%
exp-to-pow75.8%
Simplified75.8%
Taylor expanded in t around 0 68.0%
*-commutative68.0%
times-frac74.5%
Simplified74.5%
Taylor expanded in y around 0 68.0%
Taylor expanded in b around 0 28.9%
Taylor expanded in b around 0 32.8%
mul-1-neg32.8%
times-frac24.9%
distribute-lft-neg-out24.9%
*-commutative24.9%
+-commutative24.9%
cancel-sign-sub-inv24.9%
times-frac32.8%
*-commutative32.8%
div-sub37.1%
associate-/r*51.2%
*-rgt-identity51.2%
*-commutative51.2%
distribute-lft-out--51.2%
Simplified51.2%
if 1.3599999999999999e-126 < y Initial program 99.5%
associate-*l/88.0%
*-commutative88.0%
+-commutative88.0%
associate--l+88.0%
exp-sum74.2%
*-commutative74.2%
exp-to-pow74.6%
sub-neg74.6%
metadata-eval74.6%
exp-diff63.1%
*-commutative63.1%
exp-to-pow63.1%
Simplified63.1%
Taylor expanded in t around 0 64.0%
*-commutative64.0%
times-frac66.3%
Simplified66.3%
Taylor expanded in y around 0 51.0%
Taylor expanded in b around 0 35.1%
distribute-lft-out37.5%
*-commutative37.5%
Simplified37.5%
Final simplification43.3%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -13500000000.0)
(+ (/ x (* a (/ (- y) b))) (* (* b b) (* 0.5 (/ (/ x y) a))))
(if (<= y 6.2e-126)
(+ (* x (* 0.5 (* (/ b a) (/ b y)))) (/ (/ (* x (- 1.0 b)) y) a))
(/ x (* a (+ y (* y b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -13500000000.0) {
tmp = (x / (a * (-y / b))) + ((b * b) * (0.5 * ((x / y) / a)));
} else if (y <= 6.2e-126) {
tmp = (x * (0.5 * ((b / a) * (b / y)))) + (((x * (1.0 - b)) / y) / a);
} else {
tmp = x / (a * (y + (y * b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-13500000000.0d0)) then
tmp = (x / (a * (-y / b))) + ((b * b) * (0.5d0 * ((x / y) / a)))
else if (y <= 6.2d-126) then
tmp = (x * (0.5d0 * ((b / a) * (b / y)))) + (((x * (1.0d0 - b)) / y) / a)
else
tmp = x / (a * (y + (y * b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -13500000000.0) {
tmp = (x / (a * (-y / b))) + ((b * b) * (0.5 * ((x / y) / a)));
} else if (y <= 6.2e-126) {
tmp = (x * (0.5 * ((b / a) * (b / y)))) + (((x * (1.0 - b)) / y) / a);
} else {
tmp = x / (a * (y + (y * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -13500000000.0: tmp = (x / (a * (-y / b))) + ((b * b) * (0.5 * ((x / y) / a))) elif y <= 6.2e-126: tmp = (x * (0.5 * ((b / a) * (b / y)))) + (((x * (1.0 - b)) / y) / a) else: tmp = x / (a * (y + (y * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -13500000000.0) tmp = Float64(Float64(x / Float64(a * Float64(Float64(-y) / b))) + Float64(Float64(b * b) * Float64(0.5 * Float64(Float64(x / y) / a)))); elseif (y <= 6.2e-126) tmp = Float64(Float64(x * Float64(0.5 * Float64(Float64(b / a) * Float64(b / y)))) + Float64(Float64(Float64(x * Float64(1.0 - b)) / y) / a)); else tmp = Float64(x / Float64(a * Float64(y + Float64(y * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -13500000000.0) tmp = (x / (a * (-y / b))) + ((b * b) * (0.5 * ((x / y) / a))); elseif (y <= 6.2e-126) tmp = (x * (0.5 * ((b / a) * (b / y)))) + (((x * (1.0 - b)) / y) / a); else tmp = x / (a * (y + (y * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -13500000000.0], N[(N[(x / N[(a * N[((-y) / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(b * b), $MachinePrecision] * N[(0.5 * N[(N[(x / y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.2e-126], N[(N[(x * N[(0.5 * N[(N[(b / a), $MachinePrecision] * N[(b / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x * N[(1.0 - b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -13500000000:\\
\;\;\;\;\frac{x}{a \cdot \frac{-y}{b}} + \left(b \cdot b\right) \cdot \left(0.5 \cdot \frac{\frac{x}{y}}{a}\right)\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{-126}:\\
\;\;\;\;x \cdot \left(0.5 \cdot \left(\frac{b}{a} \cdot \frac{b}{y}\right)\right) + \frac{\frac{x \cdot \left(1 - b\right)}{y}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y + y \cdot b\right)}\\
\end{array}
\end{array}
if y < -1.35e10Initial program 100.0%
associate-*l/94.6%
*-commutative94.6%
+-commutative94.6%
associate--l+94.6%
exp-sum68.9%
*-commutative68.9%
exp-to-pow68.9%
sub-neg68.9%
metadata-eval68.9%
exp-diff55.4%
*-commutative55.4%
exp-to-pow55.4%
Simplified55.4%
Taylor expanded in t around 0 63.6%
*-commutative63.6%
times-frac69.0%
Simplified69.0%
Taylor expanded in y around 0 51.5%
Taylor expanded in b around 0 20.9%
+-commutative20.9%
+-commutative20.9%
mul-1-neg20.9%
unsub-neg20.9%
associate-/l/18.8%
times-frac21.1%
mul-1-neg21.1%
distribute-rgt-neg-in21.1%
distribute-rgt-out22.5%
metadata-eval22.5%
*-commutative22.5%
distribute-lft-neg-in22.5%
metadata-eval22.5%
unpow222.5%
Simplified23.9%
Taylor expanded in b around inf 30.9%
mul-1-neg30.9%
times-frac35.6%
*-commutative35.6%
times-frac30.9%
associate-/l*36.1%
associate-*r/36.1%
*-rgt-identity36.1%
times-frac35.6%
distribute-lft-neg-in35.6%
*-lft-identity35.6%
metadata-eval35.6%
times-frac35.6%
neg-mul-135.6%
neg-mul-135.6%
distribute-frac-neg35.6%
remove-double-neg35.6%
times-frac36.1%
*-rgt-identity36.1%
associate-*r/36.1%
distribute-lft-neg-in36.1%
distribute-rgt-neg-in36.1%
*-commutative36.1%
*-lft-identity36.1%
times-frac38.4%
Simplified38.4%
if -1.35e10 < y < 6.2000000000000003e-126Initial program 97.5%
associate-*l/93.5%
*-commutative93.5%
+-commutative93.5%
associate--l+93.5%
exp-sum86.2%
*-commutative86.2%
exp-to-pow87.2%
sub-neg87.2%
metadata-eval87.2%
exp-diff87.2%
*-commutative87.2%
exp-to-pow87.2%
Simplified87.2%
Taylor expanded in t around 0 75.4%
*-commutative75.4%
times-frac76.1%
Simplified76.1%
Taylor expanded in y around 0 74.4%
Taylor expanded in b around 0 23.1%
+-commutative23.1%
+-commutative23.1%
mul-1-neg23.1%
unsub-neg23.1%
associate-/l/24.7%
times-frac23.7%
mul-1-neg23.7%
distribute-rgt-neg-in23.7%
distribute-rgt-out37.5%
metadata-eval37.5%
*-commutative37.5%
distribute-lft-neg-in37.5%
metadata-eval37.5%
unpow237.5%
Simplified38.6%
Taylor expanded in x around 0 37.5%
Simplified48.0%
if 6.2000000000000003e-126 < y Initial program 99.5%
associate-*l/88.0%
*-commutative88.0%
+-commutative88.0%
associate--l+88.0%
exp-sum74.2%
*-commutative74.2%
exp-to-pow74.6%
sub-neg74.6%
metadata-eval74.6%
exp-diff63.1%
*-commutative63.1%
exp-to-pow63.1%
Simplified63.1%
Taylor expanded in t around 0 64.0%
*-commutative64.0%
times-frac66.3%
Simplified66.3%
Taylor expanded in y around 0 51.0%
Taylor expanded in b around 0 35.1%
distribute-lft-out37.5%
*-commutative37.5%
Simplified37.5%
Final simplification41.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -122000000000.0)
(+ (/ x (* a (/ (- y) b))) (* (* b b) (* 0.5 (/ (/ x y) a))))
(if (<= y -9.5e-244)
(+ (/ (- x (* x b)) (* y a)) (* (/ x y) (/ (* b b) a)))
(if (<= y 5.2e-256)
(/ x (* y (+ a (* a b))))
(if (<= y 4.5e-126)
(/ (/ (* x (- 1.0 b)) y) a)
(/ x (* a (+ y (* y b)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -122000000000.0) {
tmp = (x / (a * (-y / b))) + ((b * b) * (0.5 * ((x / y) / a)));
} else if (y <= -9.5e-244) {
tmp = ((x - (x * b)) / (y * a)) + ((x / y) * ((b * b) / a));
} else if (y <= 5.2e-256) {
tmp = x / (y * (a + (a * b)));
} else if (y <= 4.5e-126) {
tmp = ((x * (1.0 - b)) / y) / a;
} else {
tmp = x / (a * (y + (y * b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-122000000000.0d0)) then
tmp = (x / (a * (-y / b))) + ((b * b) * (0.5d0 * ((x / y) / a)))
else if (y <= (-9.5d-244)) then
tmp = ((x - (x * b)) / (y * a)) + ((x / y) * ((b * b) / a))
else if (y <= 5.2d-256) then
tmp = x / (y * (a + (a * b)))
else if (y <= 4.5d-126) then
tmp = ((x * (1.0d0 - b)) / y) / a
else
tmp = x / (a * (y + (y * b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -122000000000.0) {
tmp = (x / (a * (-y / b))) + ((b * b) * (0.5 * ((x / y) / a)));
} else if (y <= -9.5e-244) {
tmp = ((x - (x * b)) / (y * a)) + ((x / y) * ((b * b) / a));
} else if (y <= 5.2e-256) {
tmp = x / (y * (a + (a * b)));
} else if (y <= 4.5e-126) {
tmp = ((x * (1.0 - b)) / y) / a;
} else {
tmp = x / (a * (y + (y * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -122000000000.0: tmp = (x / (a * (-y / b))) + ((b * b) * (0.5 * ((x / y) / a))) elif y <= -9.5e-244: tmp = ((x - (x * b)) / (y * a)) + ((x / y) * ((b * b) / a)) elif y <= 5.2e-256: tmp = x / (y * (a + (a * b))) elif y <= 4.5e-126: tmp = ((x * (1.0 - b)) / y) / a else: tmp = x / (a * (y + (y * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -122000000000.0) tmp = Float64(Float64(x / Float64(a * Float64(Float64(-y) / b))) + Float64(Float64(b * b) * Float64(0.5 * Float64(Float64(x / y) / a)))); elseif (y <= -9.5e-244) tmp = Float64(Float64(Float64(x - Float64(x * b)) / Float64(y * a)) + Float64(Float64(x / y) * Float64(Float64(b * b) / a))); elseif (y <= 5.2e-256) tmp = Float64(x / Float64(y * Float64(a + Float64(a * b)))); elseif (y <= 4.5e-126) tmp = Float64(Float64(Float64(x * Float64(1.0 - b)) / y) / a); else tmp = Float64(x / Float64(a * Float64(y + Float64(y * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -122000000000.0) tmp = (x / (a * (-y / b))) + ((b * b) * (0.5 * ((x / y) / a))); elseif (y <= -9.5e-244) tmp = ((x - (x * b)) / (y * a)) + ((x / y) * ((b * b) / a)); elseif (y <= 5.2e-256) tmp = x / (y * (a + (a * b))); elseif (y <= 4.5e-126) tmp = ((x * (1.0 - b)) / y) / a; else tmp = x / (a * (y + (y * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -122000000000.0], N[(N[(x / N[(a * N[((-y) / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(b * b), $MachinePrecision] * N[(0.5 * N[(N[(x / y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -9.5e-244], N[(N[(N[(x - N[(x * b), $MachinePrecision]), $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision] + N[(N[(x / y), $MachinePrecision] * N[(N[(b * b), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.2e-256], N[(x / N[(y * N[(a + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.5e-126], N[(N[(N[(x * N[(1.0 - b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] / a), $MachinePrecision], N[(x / N[(a * N[(y + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -122000000000:\\
\;\;\;\;\frac{x}{a \cdot \frac{-y}{b}} + \left(b \cdot b\right) \cdot \left(0.5 \cdot \frac{\frac{x}{y}}{a}\right)\\
\mathbf{elif}\;y \leq -9.5 \cdot 10^{-244}:\\
\;\;\;\;\frac{x - x \cdot b}{y \cdot a} + \frac{x}{y} \cdot \frac{b \cdot b}{a}\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{-256}:\\
\;\;\;\;\frac{x}{y \cdot \left(a + a \cdot b\right)}\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{-126}:\\
\;\;\;\;\frac{\frac{x \cdot \left(1 - b\right)}{y}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y + y \cdot b\right)}\\
\end{array}
\end{array}
if y < -1.22e11Initial program 100.0%
associate-*l/94.6%
*-commutative94.6%
+-commutative94.6%
associate--l+94.6%
exp-sum68.9%
*-commutative68.9%
exp-to-pow68.9%
sub-neg68.9%
metadata-eval68.9%
exp-diff55.4%
*-commutative55.4%
exp-to-pow55.4%
Simplified55.4%
Taylor expanded in t around 0 63.6%
*-commutative63.6%
times-frac69.0%
Simplified69.0%
Taylor expanded in y around 0 51.5%
Taylor expanded in b around 0 20.9%
+-commutative20.9%
+-commutative20.9%
mul-1-neg20.9%
unsub-neg20.9%
associate-/l/18.8%
times-frac21.1%
mul-1-neg21.1%
distribute-rgt-neg-in21.1%
distribute-rgt-out22.5%
metadata-eval22.5%
*-commutative22.5%
distribute-lft-neg-in22.5%
metadata-eval22.5%
unpow222.5%
Simplified23.9%
Taylor expanded in b around inf 30.9%
mul-1-neg30.9%
times-frac35.6%
*-commutative35.6%
times-frac30.9%
associate-/l*36.1%
associate-*r/36.1%
*-rgt-identity36.1%
times-frac35.6%
distribute-lft-neg-in35.6%
*-lft-identity35.6%
metadata-eval35.6%
times-frac35.6%
neg-mul-135.6%
neg-mul-135.6%
distribute-frac-neg35.6%
remove-double-neg35.6%
times-frac36.1%
*-rgt-identity36.1%
associate-*r/36.1%
distribute-lft-neg-in36.1%
distribute-rgt-neg-in36.1%
*-commutative36.1%
*-lft-identity36.1%
times-frac38.4%
Simplified38.4%
if -1.22e11 < y < -9.4999999999999995e-244Initial program 96.4%
associate-*l/96.9%
*-commutative96.9%
+-commutative96.9%
associate--l+96.9%
exp-sum93.0%
*-commutative93.0%
exp-to-pow93.9%
sub-neg93.9%
metadata-eval93.9%
exp-diff93.9%
*-commutative93.9%
exp-to-pow93.9%
Simplified93.9%
Taylor expanded in t around 0 81.1%
*-commutative81.1%
times-frac77.4%
Simplified77.4%
Taylor expanded in y around 0 79.2%
Taylor expanded in b around 0 21.0%
Taylor expanded in b around 0 46.3%
mul-1-neg46.3%
times-frac44.4%
distribute-lft-neg-out44.4%
associate-+r+44.4%
*-commutative44.4%
+-commutative44.4%
cancel-sign-sub-inv44.4%
times-frac46.3%
*-commutative46.3%
div-sub46.4%
*-commutative46.4%
unpow246.4%
times-frac48.4%
Simplified48.4%
if -9.4999999999999995e-244 < y < 5.2000000000000002e-256Initial program 98.8%
associate-*l/88.3%
*-commutative88.3%
+-commutative88.3%
associate--l+88.3%
exp-sum83.0%
*-commutative83.0%
exp-to-pow84.1%
sub-neg84.1%
metadata-eval84.1%
exp-diff84.1%
*-commutative84.1%
exp-to-pow84.1%
Simplified84.1%
Taylor expanded in t around 0 69.7%
*-commutative69.7%
times-frac74.6%
Simplified74.6%
Taylor expanded in y around 0 69.7%
Taylor expanded in b around 0 34.2%
Taylor expanded in y around 0 49.3%
if 5.2000000000000002e-256 < y < 4.50000000000000025e-126Initial program 98.6%
associate-*l/90.6%
*-commutative90.6%
+-commutative90.6%
associate--l+90.6%
exp-sum74.6%
*-commutative74.6%
exp-to-pow75.8%
sub-neg75.8%
metadata-eval75.8%
exp-diff75.8%
*-commutative75.8%
exp-to-pow75.8%
Simplified75.8%
Taylor expanded in t around 0 68.0%
*-commutative68.0%
times-frac74.5%
Simplified74.5%
Taylor expanded in y around 0 68.0%
Taylor expanded in b around 0 28.9%
Taylor expanded in b around 0 32.8%
mul-1-neg32.8%
times-frac24.9%
distribute-lft-neg-out24.9%
*-commutative24.9%
+-commutative24.9%
cancel-sign-sub-inv24.9%
times-frac32.8%
*-commutative32.8%
div-sub37.1%
associate-/r*51.2%
*-rgt-identity51.2%
*-commutative51.2%
distribute-lft-out--51.2%
Simplified51.2%
if 4.50000000000000025e-126 < y Initial program 99.5%
associate-*l/88.0%
*-commutative88.0%
+-commutative88.0%
associate--l+88.0%
exp-sum74.2%
*-commutative74.2%
exp-to-pow74.6%
sub-neg74.6%
metadata-eval74.6%
exp-diff63.1%
*-commutative63.1%
exp-to-pow63.1%
Simplified63.1%
Taylor expanded in t around 0 64.0%
*-commutative64.0%
times-frac66.3%
Simplified66.3%
Taylor expanded in y around 0 51.0%
Taylor expanded in b around 0 35.1%
distribute-lft-out37.5%
*-commutative37.5%
Simplified37.5%
Final simplification42.1%
(FPCore (x y z t a b) :precision binary64 (if (<= b -9e-137) (+ (/ (/ (* x (- 1.0 b)) y) a) (/ (* b b) (* a (/ y x)))) (/ x (* y (+ a (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -9e-137) {
tmp = (((x * (1.0 - b)) / y) / a) + ((b * b) / (a * (y / x)));
} else {
tmp = x / (y * (a + (a * b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-9d-137)) then
tmp = (((x * (1.0d0 - b)) / y) / a) + ((b * b) / (a * (y / x)))
else
tmp = x / (y * (a + (a * b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -9e-137) {
tmp = (((x * (1.0 - b)) / y) / a) + ((b * b) / (a * (y / x)));
} else {
tmp = x / (y * (a + (a * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -9e-137: tmp = (((x * (1.0 - b)) / y) / a) + ((b * b) / (a * (y / x))) else: tmp = x / (y * (a + (a * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -9e-137) tmp = Float64(Float64(Float64(Float64(x * Float64(1.0 - b)) / y) / a) + Float64(Float64(b * b) / Float64(a * Float64(y / x)))); else tmp = Float64(x / Float64(y * Float64(a + Float64(a * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -9e-137) tmp = (((x * (1.0 - b)) / y) / a) + ((b * b) / (a * (y / x))); else tmp = x / (y * (a + (a * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -9e-137], N[(N[(N[(N[(x * N[(1.0 - b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] / a), $MachinePrecision] + N[(N[(b * b), $MachinePrecision] / N[(a * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(a + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -9 \cdot 10^{-137}:\\
\;\;\;\;\frac{\frac{x \cdot \left(1 - b\right)}{y}}{a} + \frac{b \cdot b}{a \cdot \frac{y}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a + a \cdot b\right)}\\
\end{array}
\end{array}
if b < -8.9999999999999994e-137Initial program 99.5%
associate-*l/93.6%
*-commutative93.6%
+-commutative93.6%
associate--l+93.6%
exp-sum79.3%
*-commutative79.3%
exp-to-pow79.6%
sub-neg79.6%
metadata-eval79.6%
exp-diff66.5%
*-commutative66.5%
exp-to-pow66.5%
Simplified66.5%
Taylor expanded in t around 0 71.8%
*-commutative71.8%
times-frac76.1%
Simplified76.1%
Taylor expanded in y around 0 71.2%
Taylor expanded in b around 0 16.6%
Taylor expanded in b around 0 45.8%
mul-1-neg45.8%
times-frac45.8%
distribute-lft-neg-out45.8%
+-commutative45.8%
*-commutative45.8%
+-commutative45.8%
associate-+l+45.8%
unpow245.8%
associate-/l*43.6%
associate-*r/43.5%
cancel-sign-sub-inv43.5%
times-frac43.5%
*-commutative43.5%
div-sub43.5%
Simplified45.5%
if -8.9999999999999994e-137 < b Initial program 98.6%
associate-*l/91.2%
*-commutative91.2%
+-commutative91.2%
associate--l+91.2%
exp-sum76.1%
*-commutative76.1%
exp-to-pow76.6%
sub-neg76.6%
metadata-eval76.6%
exp-diff71.4%
*-commutative71.4%
exp-to-pow71.4%
Simplified71.4%
Taylor expanded in t around 0 66.3%
*-commutative66.3%
times-frac68.1%
Simplified68.1%
Taylor expanded in y around 0 54.3%
Taylor expanded in b around 0 34.0%
Taylor expanded in y around 0 38.0%
Final simplification40.4%
(FPCore (x y z t a b) :precision binary64 (if (<= b -65000.0) (+ (/ (- x (* x b)) (* y a)) (* (/ x y) (/ (* b b) a))) (/ x (* y (+ a (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -65000.0) {
tmp = ((x - (x * b)) / (y * a)) + ((x / y) * ((b * b) / a));
} else {
tmp = x / (y * (a + (a * b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-65000.0d0)) then
tmp = ((x - (x * b)) / (y * a)) + ((x / y) * ((b * b) / a))
else
tmp = x / (y * (a + (a * b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -65000.0) {
tmp = ((x - (x * b)) / (y * a)) + ((x / y) * ((b * b) / a));
} else {
tmp = x / (y * (a + (a * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -65000.0: tmp = ((x - (x * b)) / (y * a)) + ((x / y) * ((b * b) / a)) else: tmp = x / (y * (a + (a * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -65000.0) tmp = Float64(Float64(Float64(x - Float64(x * b)) / Float64(y * a)) + Float64(Float64(x / y) * Float64(Float64(b * b) / a))); else tmp = Float64(x / Float64(y * Float64(a + Float64(a * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -65000.0) tmp = ((x - (x * b)) / (y * a)) + ((x / y) * ((b * b) / a)); else tmp = x / (y * (a + (a * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -65000.0], N[(N[(N[(x - N[(x * b), $MachinePrecision]), $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision] + N[(N[(x / y), $MachinePrecision] * N[(N[(b * b), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(a + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -65000:\\
\;\;\;\;\frac{x - x \cdot b}{y \cdot a} + \frac{x}{y} \cdot \frac{b \cdot b}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a + a \cdot b\right)}\\
\end{array}
\end{array}
if b < -65000Initial program 100.0%
associate-*l/96.7%
*-commutative96.7%
+-commutative96.7%
associate--l+96.7%
exp-sum82.0%
*-commutative82.0%
exp-to-pow82.0%
sub-neg82.0%
metadata-eval82.0%
exp-diff63.9%
*-commutative63.9%
exp-to-pow63.9%
Simplified63.9%
Taylor expanded in t around 0 75.5%
*-commutative75.5%
times-frac75.5%
Simplified75.5%
Taylor expanded in y around 0 85.5%
Taylor expanded in b around 0 13.7%
Taylor expanded in b around 0 52.2%
mul-1-neg52.2%
times-frac52.2%
distribute-lft-neg-out52.2%
associate-+r+52.2%
*-commutative52.2%
+-commutative52.2%
cancel-sign-sub-inv52.2%
times-frac52.2%
*-commutative52.2%
div-sub52.2%
*-commutative52.2%
unpow252.2%
times-frac52.2%
Simplified52.2%
if -65000 < b Initial program 98.5%
associate-*l/90.5%
*-commutative90.5%
+-commutative90.5%
associate--l+90.5%
exp-sum75.6%
*-commutative75.6%
exp-to-pow76.3%
sub-neg76.3%
metadata-eval76.3%
exp-diff71.6%
*-commutative71.6%
exp-to-pow71.6%
Simplified71.6%
Taylor expanded in t around 0 65.8%
*-commutative65.8%
times-frac69.2%
Simplified69.2%
Taylor expanded in y around 0 51.8%
Taylor expanded in b around 0 32.9%
Taylor expanded in y around 0 36.9%
Final simplification40.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -1e+62)
(/ (/ (* x (- 1.0 b)) y) a)
(if (<= b 1.02e-268)
(/ (/ x a) y)
(if (<= b 4.1e-86)
(/ x (* y a))
(if (<= b 6.8e+95) (/ (/ x a) (* y b)) (/ x (* y (* a b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1e+62) {
tmp = ((x * (1.0 - b)) / y) / a;
} else if (b <= 1.02e-268) {
tmp = (x / a) / y;
} else if (b <= 4.1e-86) {
tmp = x / (y * a);
} else if (b <= 6.8e+95) {
tmp = (x / a) / (y * b);
} else {
tmp = x / (y * (a * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-1d+62)) then
tmp = ((x * (1.0d0 - b)) / y) / a
else if (b <= 1.02d-268) then
tmp = (x / a) / y
else if (b <= 4.1d-86) then
tmp = x / (y * a)
else if (b <= 6.8d+95) then
tmp = (x / a) / (y * b)
else
tmp = x / (y * (a * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1e+62) {
tmp = ((x * (1.0 - b)) / y) / a;
} else if (b <= 1.02e-268) {
tmp = (x / a) / y;
} else if (b <= 4.1e-86) {
tmp = x / (y * a);
} else if (b <= 6.8e+95) {
tmp = (x / a) / (y * b);
} else {
tmp = x / (y * (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1e+62: tmp = ((x * (1.0 - b)) / y) / a elif b <= 1.02e-268: tmp = (x / a) / y elif b <= 4.1e-86: tmp = x / (y * a) elif b <= 6.8e+95: tmp = (x / a) / (y * b) else: tmp = x / (y * (a * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1e+62) tmp = Float64(Float64(Float64(x * Float64(1.0 - b)) / y) / a); elseif (b <= 1.02e-268) tmp = Float64(Float64(x / a) / y); elseif (b <= 4.1e-86) tmp = Float64(x / Float64(y * a)); elseif (b <= 6.8e+95) tmp = Float64(Float64(x / a) / Float64(y * b)); else tmp = Float64(x / Float64(y * Float64(a * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1e+62) tmp = ((x * (1.0 - b)) / y) / a; elseif (b <= 1.02e-268) tmp = (x / a) / y; elseif (b <= 4.1e-86) tmp = x / (y * a); elseif (b <= 6.8e+95) tmp = (x / a) / (y * b); else tmp = x / (y * (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1e+62], N[(N[(N[(x * N[(1.0 - b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[b, 1.02e-268], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 4.1e-86], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6.8e+95], N[(N[(x / a), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1 \cdot 10^{+62}:\\
\;\;\;\;\frac{\frac{x \cdot \left(1 - b\right)}{y}}{a}\\
\mathbf{elif}\;b \leq 1.02 \cdot 10^{-268}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\mathbf{elif}\;b \leq 4.1 \cdot 10^{-86}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\mathbf{elif}\;b \leq 6.8 \cdot 10^{+95}:\\
\;\;\;\;\frac{\frac{x}{a}}{y \cdot b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a \cdot b\right)}\\
\end{array}
\end{array}
if b < -1.00000000000000004e62Initial program 100.0%
associate-*l/96.1%
*-commutative96.1%
+-commutative96.1%
associate--l+96.1%
exp-sum78.4%
*-commutative78.4%
exp-to-pow78.4%
sub-neg78.4%
metadata-eval78.4%
exp-diff56.9%
*-commutative56.9%
exp-to-pow56.9%
Simplified56.9%
Taylor expanded in t around 0 70.7%
*-commutative70.7%
times-frac70.7%
Simplified70.7%
Taylor expanded in y around 0 82.6%
Taylor expanded in b around 0 16.2%
Taylor expanded in b around 0 41.5%
mul-1-neg41.5%
times-frac39.5%
distribute-lft-neg-out39.5%
*-commutative39.5%
+-commutative39.5%
cancel-sign-sub-inv39.5%
times-frac41.5%
*-commutative41.5%
div-sub41.5%
associate-/r*46.9%
*-rgt-identity46.9%
*-commutative46.9%
distribute-lft-out--46.9%
Simplified46.9%
if -1.00000000000000004e62 < b < 1.0200000000000001e-268Initial program 98.7%
associate-/l*96.8%
fma-def96.8%
sub-neg96.8%
metadata-eval96.8%
Simplified96.8%
Taylor expanded in t around 0 79.0%
Taylor expanded in b around 0 70.0%
+-commutative70.0%
mul-1-neg70.0%
sub-neg70.0%
exp-diff70.0%
*-commutative70.0%
exp-to-pow70.0%
rem-exp-log70.9%
*-commutative70.9%
Simplified70.9%
Taylor expanded in y around 0 31.2%
if 1.0200000000000001e-268 < b < 4.09999999999999979e-86Initial program 96.2%
associate-*l/92.1%
*-commutative92.1%
+-commutative92.1%
associate--l+92.1%
exp-sum78.2%
*-commutative78.2%
exp-to-pow79.0%
sub-neg79.0%
metadata-eval79.0%
exp-diff79.0%
*-commutative79.0%
exp-to-pow79.0%
Simplified79.0%
Taylor expanded in t around 0 65.9%
*-commutative65.9%
times-frac65.9%
Simplified65.9%
Taylor expanded in y around 0 41.4%
Taylor expanded in b around 0 41.4%
*-commutative41.4%
Simplified41.4%
if 4.09999999999999979e-86 < b < 6.80000000000000043e95Initial program 99.4%
associate-*l/99.4%
*-commutative99.4%
+-commutative99.4%
associate--l+99.4%
exp-sum85.9%
*-commutative85.9%
exp-to-pow86.5%
sub-neg86.5%
metadata-eval86.5%
exp-diff81.1%
*-commutative81.1%
exp-to-pow81.1%
Simplified81.1%
Taylor expanded in t around 0 65.9%
*-commutative65.9%
times-frac73.8%
Simplified73.8%
Taylor expanded in y around 0 61.1%
Taylor expanded in b around 0 29.9%
Taylor expanded in b around inf 32.5%
associate-/r*35.1%
*-commutative35.1%
Simplified35.1%
if 6.80000000000000043e95 < b Initial program 100.0%
associate-*l/83.7%
*-commutative83.7%
+-commutative83.7%
associate--l+83.7%
exp-sum63.3%
*-commutative63.3%
exp-to-pow63.3%
sub-neg63.3%
metadata-eval63.3%
exp-diff49.0%
*-commutative49.0%
exp-to-pow49.0%
Simplified49.0%
Taylor expanded in t around 0 67.5%
*-commutative67.5%
times-frac67.5%
Simplified67.5%
Taylor expanded in y around 0 81.9%
Taylor expanded in b around 0 42.5%
Taylor expanded in b around inf 42.5%
*-commutative42.5%
*-commutative42.5%
associate-*l*48.2%
*-commutative48.2%
Simplified48.2%
Final simplification39.9%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.02e+62) (/ (- x (* x b)) (* y a)) (if (<= b -3.5e-132) (/ (/ x a) y) (/ x (* y (+ a (* a b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.02e+62) {
tmp = (x - (x * b)) / (y * a);
} else if (b <= -3.5e-132) {
tmp = (x / a) / y;
} else {
tmp = x / (y * (a + (a * b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-1.02d+62)) then
tmp = (x - (x * b)) / (y * a)
else if (b <= (-3.5d-132)) then
tmp = (x / a) / y
else
tmp = x / (y * (a + (a * b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.02e+62) {
tmp = (x - (x * b)) / (y * a);
} else if (b <= -3.5e-132) {
tmp = (x / a) / y;
} else {
tmp = x / (y * (a + (a * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.02e+62: tmp = (x - (x * b)) / (y * a) elif b <= -3.5e-132: tmp = (x / a) / y else: tmp = x / (y * (a + (a * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.02e+62) tmp = Float64(Float64(x - Float64(x * b)) / Float64(y * a)); elseif (b <= -3.5e-132) tmp = Float64(Float64(x / a) / y); else tmp = Float64(x / Float64(y * Float64(a + Float64(a * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.02e+62) tmp = (x - (x * b)) / (y * a); elseif (b <= -3.5e-132) tmp = (x / a) / y; else tmp = x / (y * (a + (a * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.02e+62], N[(N[(x - N[(x * b), $MachinePrecision]), $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -3.5e-132], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(y * N[(a + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.02 \cdot 10^{+62}:\\
\;\;\;\;\frac{x - x \cdot b}{y \cdot a}\\
\mathbf{elif}\;b \leq -3.5 \cdot 10^{-132}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a + a \cdot b\right)}\\
\end{array}
\end{array}
if b < -1.02000000000000002e62Initial program 100.0%
associate-*l/96.1%
*-commutative96.1%
+-commutative96.1%
associate--l+96.1%
exp-sum78.4%
*-commutative78.4%
exp-to-pow78.4%
sub-neg78.4%
metadata-eval78.4%
exp-diff56.9%
*-commutative56.9%
exp-to-pow56.9%
Simplified56.9%
Taylor expanded in t around 0 70.7%
*-commutative70.7%
times-frac70.7%
Simplified70.7%
Taylor expanded in y around 0 82.6%
Taylor expanded in b around 0 16.2%
Taylor expanded in b around 0 41.5%
mul-1-neg41.5%
times-frac39.5%
distribute-lft-neg-out39.5%
*-commutative39.5%
+-commutative39.5%
cancel-sign-sub-inv39.5%
times-frac41.5%
*-commutative41.5%
div-sub41.5%
*-commutative41.5%
Simplified41.5%
if -1.02000000000000002e62 < b < -3.5e-132Initial program 98.7%
associate-/l*94.2%
fma-def94.2%
sub-neg94.2%
metadata-eval94.2%
Simplified94.2%
Taylor expanded in t around 0 92.4%
Taylor expanded in b around 0 71.0%
+-commutative71.0%
mul-1-neg71.0%
sub-neg71.0%
exp-diff71.0%
*-commutative71.0%
exp-to-pow71.0%
rem-exp-log72.0%
*-commutative72.0%
Simplified72.0%
Taylor expanded in y around 0 35.3%
if -3.5e-132 < b Initial program 98.6%
associate-*l/91.2%
*-commutative91.2%
+-commutative91.2%
associate--l+91.2%
exp-sum76.2%
*-commutative76.2%
exp-to-pow76.8%
sub-neg76.8%
metadata-eval76.8%
exp-diff71.6%
*-commutative71.6%
exp-to-pow71.6%
Simplified71.6%
Taylor expanded in t around 0 65.9%
*-commutative65.9%
times-frac67.7%
Simplified67.7%
Taylor expanded in y around 0 54.0%
Taylor expanded in b around 0 33.8%
Taylor expanded in y around 0 37.8%
Final simplification38.2%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.35e-125) (/ 1.0 (* a (/ y x))) (/ x (* y (+ a (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.35e-125) {
tmp = 1.0 / (a * (y / x));
} else {
tmp = x / (y * (a + (a * b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-1.35d-125)) then
tmp = 1.0d0 / (a * (y / x))
else
tmp = x / (y * (a + (a * b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.35e-125) {
tmp = 1.0 / (a * (y / x));
} else {
tmp = x / (y * (a + (a * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.35e-125: tmp = 1.0 / (a * (y / x)) else: tmp = x / (y * (a + (a * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.35e-125) tmp = Float64(1.0 / Float64(a * Float64(y / x))); else tmp = Float64(x / Float64(y * Float64(a + Float64(a * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.35e-125) tmp = 1.0 / (a * (y / x)); else tmp = x / (y * (a + (a * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.35e-125], N[(1.0 / N[(a * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(a + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.35 \cdot 10^{-125}:\\
\;\;\;\;\frac{1}{a \cdot \frac{y}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a + a \cdot b\right)}\\
\end{array}
\end{array}
if b < -1.3499999999999999e-125Initial program 99.5%
associate-/l*97.8%
fma-def97.8%
sub-neg97.8%
metadata-eval97.8%
Simplified97.8%
Taylor expanded in t around 0 93.5%
Taylor expanded in b around 0 58.6%
+-commutative58.6%
mul-1-neg58.6%
sub-neg58.6%
exp-diff58.6%
*-commutative58.6%
exp-to-pow58.6%
rem-exp-log58.9%
*-commutative58.9%
associate-*l/58.9%
*-commutative58.9%
associate-/r*49.6%
*-commutative49.6%
times-frac55.2%
Simplified55.2%
Taylor expanded in y around 0 26.3%
*-commutative26.3%
clear-num27.5%
frac-times27.5%
metadata-eval27.5%
Applied egg-rr27.5%
if -1.3499999999999999e-125 < b Initial program 98.6%
associate-*l/91.2%
*-commutative91.2%
+-commutative91.2%
associate--l+91.2%
exp-sum76.2%
*-commutative76.2%
exp-to-pow76.8%
sub-neg76.8%
metadata-eval76.8%
exp-diff71.6%
*-commutative71.6%
exp-to-pow71.6%
Simplified71.6%
Taylor expanded in t around 0 65.9%
*-commutative65.9%
times-frac67.7%
Simplified67.7%
Taylor expanded in y around 0 54.0%
Taylor expanded in b around 0 33.8%
Taylor expanded in y around 0 37.8%
Final simplification34.5%
(FPCore (x y z t a b) :precision binary64 (if (<= z 3.5e-98) (/ 1.0 (* a (/ y x))) (/ x (* y a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 3.5e-98) {
tmp = 1.0 / (a * (y / x));
} 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 (z <= 3.5d-98) then
tmp = 1.0d0 / (a * (y / x))
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 (z <= 3.5e-98) {
tmp = 1.0 / (a * (y / x));
} else {
tmp = x / (y * a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= 3.5e-98: tmp = 1.0 / (a * (y / x)) else: tmp = x / (y * a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= 3.5e-98) tmp = Float64(1.0 / Float64(a * Float64(y / x))); else tmp = Float64(x / Float64(y * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= 3.5e-98) tmp = 1.0 / (a * (y / x)); else tmp = x / (y * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, 3.5e-98], N[(1.0 / N[(a * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 3.5 \cdot 10^{-98}:\\
\;\;\;\;\frac{1}{a \cdot \frac{y}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\end{array}
\end{array}
if z < 3.5000000000000002e-98Initial program 99.0%
associate-/l*96.8%
fma-def96.8%
sub-neg96.8%
metadata-eval96.8%
Simplified96.8%
Taylor expanded in t around 0 86.1%
Taylor expanded in b around 0 69.2%
+-commutative69.2%
mul-1-neg69.2%
sub-neg69.2%
exp-diff69.2%
*-commutative69.2%
exp-to-pow69.2%
rem-exp-log70.1%
*-commutative70.1%
associate-*l/70.1%
*-commutative70.1%
associate-/r*57.0%
*-commutative57.0%
times-frac70.0%
Simplified70.0%
Taylor expanded in y around 0 35.6%
*-commutative35.6%
clear-num36.9%
frac-times36.9%
metadata-eval36.9%
Applied egg-rr36.9%
if 3.5000000000000002e-98 < z Initial program 98.8%
associate-*l/90.7%
*-commutative90.7%
+-commutative90.7%
associate--l+90.7%
exp-sum75.2%
*-commutative75.2%
exp-to-pow75.6%
sub-neg75.6%
metadata-eval75.6%
exp-diff67.8%
*-commutative67.8%
exp-to-pow67.8%
Simplified67.8%
Taylor expanded in t around 0 68.0%
*-commutative68.0%
times-frac68.4%
Simplified68.4%
Taylor expanded in y around 0 60.3%
Taylor expanded in b around 0 28.3%
*-commutative28.3%
Simplified28.3%
Final simplification30.8%
(FPCore (x y z t a b) :precision binary64 (if (<= z 5e-98) (/ 1.0 (* a (/ y x))) (/ 1.0 (/ (* y a) x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 5e-98) {
tmp = 1.0 / (a * (y / x));
} else {
tmp = 1.0 / ((y * a) / 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 (z <= 5d-98) then
tmp = 1.0d0 / (a * (y / x))
else
tmp = 1.0d0 / ((y * a) / 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 (z <= 5e-98) {
tmp = 1.0 / (a * (y / x));
} else {
tmp = 1.0 / ((y * a) / x);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= 5e-98: tmp = 1.0 / (a * (y / x)) else: tmp = 1.0 / ((y * a) / x) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= 5e-98) tmp = Float64(1.0 / Float64(a * Float64(y / x))); else tmp = Float64(1.0 / Float64(Float64(y * a) / x)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= 5e-98) tmp = 1.0 / (a * (y / x)); else tmp = 1.0 / ((y * a) / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, 5e-98], N[(1.0 / N[(a * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(y * a), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 5 \cdot 10^{-98}:\\
\;\;\;\;\frac{1}{a \cdot \frac{y}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{y \cdot a}{x}}\\
\end{array}
\end{array}
if z < 5.00000000000000018e-98Initial program 99.0%
associate-/l*96.8%
fma-def96.8%
sub-neg96.8%
metadata-eval96.8%
Simplified96.8%
Taylor expanded in t around 0 86.1%
Taylor expanded in b around 0 69.2%
+-commutative69.2%
mul-1-neg69.2%
sub-neg69.2%
exp-diff69.2%
*-commutative69.2%
exp-to-pow69.2%
rem-exp-log70.1%
*-commutative70.1%
associate-*l/70.1%
*-commutative70.1%
associate-/r*57.0%
*-commutative57.0%
times-frac70.0%
Simplified70.0%
Taylor expanded in y around 0 35.6%
*-commutative35.6%
clear-num36.9%
frac-times36.9%
metadata-eval36.9%
Applied egg-rr36.9%
if 5.00000000000000018e-98 < z Initial program 98.8%
associate-/l*99.2%
fma-def99.2%
sub-neg99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in t around 0 81.5%
Taylor expanded in b around 0 57.3%
+-commutative57.3%
mul-1-neg57.3%
sub-neg57.3%
exp-diff57.3%
*-commutative57.3%
exp-to-pow57.3%
rem-exp-log57.5%
*-commutative57.5%
associate-*l/57.5%
*-commutative57.5%
associate-/r*51.6%
*-commutative51.6%
times-frac49.9%
Simplified49.9%
Taylor expanded in y around 0 24.0%
associate-*l/24.0%
*-un-lft-identity24.0%
associate-/r*28.3%
clear-num28.3%
Applied egg-rr28.3%
Final simplification30.8%
(FPCore (x y z t a b) :precision binary64 (if (<= b 1.95e-79) (/ 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.95e-79) {
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.95d-79) 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.95e-79) {
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.95e-79: 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.95e-79) 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.95e-79) 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.95e-79], 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.95 \cdot 10^{-79}:\\
\;\;\;\;\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.95000000000000003e-79Initial program 98.5%
associate-/l*98.4%
fma-def98.4%
sub-neg98.4%
metadata-eval98.4%
Simplified98.4%
Taylor expanded in t around 0 81.3%
Taylor expanded in b around 0 64.4%
+-commutative64.4%
mul-1-neg64.4%
sub-neg64.4%
exp-diff64.4%
*-commutative64.4%
exp-to-pow64.4%
rem-exp-log65.0%
*-commutative65.0%
associate-*l/65.0%
*-commutative65.0%
associate-/r*56.9%
*-commutative56.9%
times-frac60.8%
Simplified60.8%
Taylor expanded in y around 0 29.5%
*-commutative29.5%
clear-num30.1%
frac-times30.1%
metadata-eval30.1%
Applied egg-rr30.1%
if 1.95000000000000003e-79 < b Initial program 99.8%
associate-*l/90.2%
*-commutative90.2%
+-commutative90.2%
associate--l+90.2%
exp-sum72.4%
*-commutative72.4%
exp-to-pow72.6%
sub-neg72.6%
metadata-eval72.6%
exp-diff61.9%
*-commutative61.9%
exp-to-pow61.9%
Simplified61.9%
Taylor expanded in t around 0 68.3%
*-commutative68.3%
times-frac69.5%
Simplified69.5%
Taylor expanded in y around 0 74.6%
Taylor expanded in b around 0 37.8%
Taylor expanded in b around inf 37.9%
*-commutative37.9%
Simplified37.9%
Final simplification32.6%
(FPCore (x y z t a b) :precision binary64 (if (<= b 2.8e-27) (/ 1.0 (* a (/ y x))) (/ x (* y (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 2.8e-27) {
tmp = 1.0 / (a * (y / x));
} else {
tmp = x / (y * (a * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= 2.8d-27) then
tmp = 1.0d0 / (a * (y / x))
else
tmp = x / (y * (a * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 2.8e-27) {
tmp = 1.0 / (a * (y / x));
} else {
tmp = x / (y * (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 2.8e-27: tmp = 1.0 / (a * (y / x)) else: tmp = x / (y * (a * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 2.8e-27) tmp = Float64(1.0 / Float64(a * Float64(y / x))); else tmp = Float64(x / Float64(y * Float64(a * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= 2.8e-27) tmp = 1.0 / (a * (y / x)); else tmp = x / (y * (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 2.8e-27], N[(1.0 / N[(a * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 2.8 \cdot 10^{-27}:\\
\;\;\;\;\frac{1}{a \cdot \frac{y}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a \cdot b\right)}\\
\end{array}
\end{array}
if b < 2.8e-27Initial program 98.4%
associate-/l*97.9%
fma-def97.9%
sub-neg97.9%
metadata-eval97.9%
Simplified97.9%
Taylor expanded in t around 0 80.2%
Taylor expanded in b around 0 64.4%
+-commutative64.4%
mul-1-neg64.4%
sub-neg64.4%
exp-diff64.4%
*-commutative64.4%
exp-to-pow64.4%
rem-exp-log65.0%
*-commutative65.0%
associate-*l/65.0%
*-commutative65.0%
associate-/r*56.4%
*-commutative56.4%
times-frac61.1%
Simplified61.1%
Taylor expanded in y around 0 29.6%
*-commutative29.6%
clear-num30.1%
frac-times30.1%
metadata-eval30.1%
Applied egg-rr30.1%
if 2.8e-27 < b Initial program 100.0%
associate-*l/89.0%
*-commutative89.0%
+-commutative89.0%
associate--l+89.0%
exp-sum69.9%
*-commutative69.9%
exp-to-pow69.9%
sub-neg69.9%
metadata-eval69.9%
exp-diff57.5%
*-commutative57.5%
exp-to-pow57.5%
Simplified57.5%
Taylor expanded in t around 0 71.4%
*-commutative71.4%
times-frac70.1%
Simplified70.1%
Taylor expanded in y around 0 81.1%
Taylor expanded in b around 0 38.8%
Taylor expanded in b around inf 38.8%
*-commutative38.8%
*-commutative38.8%
associate-*l*42.7%
*-commutative42.7%
Simplified42.7%
Final simplification33.7%
(FPCore (x y z t a b) :precision binary64 (if (<= z 1.6e+54) (/ (/ x a) y) (/ x (* y a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 1.6e+54) {
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 (z <= 1.6d+54) 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 (z <= 1.6e+54) {
tmp = (x / a) / y;
} else {
tmp = x / (y * a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= 1.6e+54: tmp = (x / a) / y else: tmp = x / (y * a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= 1.6e+54) tmp = Float64(Float64(x / a) / y); else tmp = Float64(x / Float64(y * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= 1.6e+54) tmp = (x / a) / y; else tmp = x / (y * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, 1.6e+54], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 1.6 \cdot 10^{+54}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\end{array}
\end{array}
if z < 1.6e54Initial program 98.9%
associate-/l*98.0%
fma-def98.0%
sub-neg98.0%
metadata-eval98.0%
Simplified98.0%
Taylor expanded in t around 0 83.0%
Taylor expanded in b around 0 64.1%
+-commutative64.1%
mul-1-neg64.1%
sub-neg64.1%
exp-diff64.1%
*-commutative64.1%
exp-to-pow64.1%
rem-exp-log64.8%
*-commutative64.8%
Simplified64.8%
Taylor expanded in y around 0 33.3%
if 1.6e54 < z Initial program 98.9%
associate-*l/88.9%
*-commutative88.9%
+-commutative88.9%
associate--l+88.9%
exp-sum75.8%
*-commutative75.8%
exp-to-pow76.1%
sub-neg76.1%
metadata-eval76.1%
exp-diff67.9%
*-commutative67.9%
exp-to-pow67.9%
Simplified67.9%
Taylor expanded in t around 0 69.1%
*-commutative69.1%
times-frac69.6%
Simplified69.6%
Taylor expanded in y around 0 59.7%
Taylor expanded in b around 0 28.0%
*-commutative28.0%
Simplified28.0%
Final simplification30.8%
(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/92.0%
*-commutative92.0%
+-commutative92.0%
associate--l+92.0%
exp-sum77.1%
*-commutative77.1%
exp-to-pow77.6%
sub-neg77.6%
metadata-eval77.6%
exp-diff69.8%
*-commutative69.8%
exp-to-pow69.8%
Simplified69.8%
Taylor expanded in t around 0 68.1%
*-commutative68.1%
times-frac70.7%
Simplified70.7%
Taylor expanded in y around 0 59.8%
Taylor expanded in b around 0 28.2%
*-commutative28.2%
Simplified28.2%
Final simplification28.2%
(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 2023297
(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))