
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x * exp((((y * log(z)) + ((t - 1.0d0) * log(a))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x * Math.exp((((y * Math.log(z)) + ((t - 1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + ((t - 1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 21 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x * exp((((y * log(z)) + ((t - 1.0d0) * log(a))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x * Math.exp((((y * Math.log(z)) + ((t - 1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + ((t - 1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\end{array}
x\_m = (fabs.f64 x) x\_s = (copysign.f64 #s(literal 1 binary64) x) (FPCore (x_s x_m y z t a b) :precision binary64 (* x_s (/ (exp (+ (fma y (log z) (- (* (+ t -1.0) (log a)) b)) (log x_m))) y)))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t, double a, double b) {
return x_s * (exp((fma(y, log(z), (((t + -1.0) * log(a)) - b)) + log(x_m))) / y);
}
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t, a, b) return Float64(x_s * Float64(exp(Float64(fma(y, log(z), Float64(Float64(Float64(t + -1.0) * log(a)) - b)) + log(x_m))) / y)) end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_, a_, b_] := N[(x$95$s * N[(N[Exp[N[(N[(y * N[Log[z], $MachinePrecision] + N[(N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision] + N[Log[x$95$m], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \frac{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right) + \log x\_m}}{y}
\end{array}
Initial program 98.3%
add-exp-log74.1%
*-commutative74.1%
log-prod50.2%
add-log-exp50.2%
associate--l+50.2%
fma-define50.2%
sub-neg50.2%
metadata-eval50.2%
Applied egg-rr50.2%
Final simplification50.2%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t a b)
:precision binary64
(*
x_s
(if (or (<= y -6.5e+149) (not (<= y 8.2e+72)))
(/ (* x_m (/ (pow z y) a)) y)
(/ (exp (- (+ (log x_m) (* (+ t -1.0) (log a))) b)) y))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -6.5e+149) || !(y <= 8.2e+72)) {
tmp = (x_m * (pow(z, y) / a)) / y;
} else {
tmp = exp(((log(x_m) + ((t + -1.0) * log(a))) - b)) / y;
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t, a, b)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
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.5d+149)) .or. (.not. (y <= 8.2d+72))) then
tmp = (x_m * ((z ** y) / a)) / y
else
tmp = exp(((log(x_m) + ((t + (-1.0d0)) * log(a))) - b)) / y
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -6.5e+149) || !(y <= 8.2e+72)) {
tmp = (x_m * (Math.pow(z, y) / a)) / y;
} else {
tmp = Math.exp(((Math.log(x_m) + ((t + -1.0) * Math.log(a))) - b)) / y;
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t, a, b): tmp = 0 if (y <= -6.5e+149) or not (y <= 8.2e+72): tmp = (x_m * (math.pow(z, y) / a)) / y else: tmp = math.exp(((math.log(x_m) + ((t + -1.0) * math.log(a))) - b)) / y return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t, a, b) tmp = 0.0 if ((y <= -6.5e+149) || !(y <= 8.2e+72)) tmp = Float64(Float64(x_m * Float64((z ^ y) / a)) / y); else tmp = Float64(exp(Float64(Float64(log(x_m) + Float64(Float64(t + -1.0) * log(a))) - b)) / y); end return Float64(x_s * tmp) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t, a, b) tmp = 0.0; if ((y <= -6.5e+149) || ~((y <= 8.2e+72))) tmp = (x_m * ((z ^ y) / a)) / y; else tmp = exp(((log(x_m) + ((t + -1.0) * log(a))) - b)) / y; end tmp_2 = x_s * tmp; end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_, a_, b_] := N[(x$95$s * If[Or[LessEqual[y, -6.5e+149], N[Not[LessEqual[y, 8.2e+72]], $MachinePrecision]], N[(N[(x$95$m * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[Exp[N[(N[(N[Log[x$95$m], $MachinePrecision] + N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -6.5 \cdot 10^{+149} \lor \neg \left(y \leq 8.2 \cdot 10^{+72}\right):\\
\;\;\;\;\frac{x\_m \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{\left(\log x\_m + \left(t + -1\right) \cdot \log a\right) - b}}{y}\\
\end{array}
\end{array}
if y < -6.50000000000000015e149 or 8.19999999999999926e72 < y Initial program 100.0%
Taylor expanded in b around 0 96.9%
exp-sum76.6%
*-commutative76.6%
exp-to-pow76.6%
exp-to-pow76.6%
sub-neg76.6%
metadata-eval76.6%
Simplified76.6%
Taylor expanded in t around 0 93.8%
associate-/l*93.8%
Simplified93.8%
if -6.50000000000000015e149 < y < 8.19999999999999926e72Initial program 97.7%
add-exp-log72.2%
*-commutative72.2%
log-prod53.4%
add-log-exp53.4%
associate--l+53.4%
fma-define53.4%
sub-neg53.4%
metadata-eval53.4%
Applied egg-rr53.4%
Taylor expanded in y around 0 50.1%
Final simplification61.1%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t a b)
:precision binary64
(*
x_s
(if (or (<= y -1.7e+144) (not (<= y 1.22)))
(/ (* x_m (exp (- (- (* y (log z)) (log a)) b))) y)
(/ (exp (- (+ (log x_m) (* (+ t -1.0) (log a))) b)) y))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.7e+144) || !(y <= 1.22)) {
tmp = (x_m * exp((((y * log(z)) - log(a)) - b))) / y;
} else {
tmp = exp(((log(x_m) + ((t + -1.0) * log(a))) - b)) / y;
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t, a, b)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
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.7d+144)) .or. (.not. (y <= 1.22d0))) then
tmp = (x_m * exp((((y * log(z)) - log(a)) - b))) / y
else
tmp = exp(((log(x_m) + ((t + (-1.0d0)) * log(a))) - b)) / y
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.7e+144) || !(y <= 1.22)) {
tmp = (x_m * Math.exp((((y * Math.log(z)) - Math.log(a)) - b))) / y;
} else {
tmp = Math.exp(((Math.log(x_m) + ((t + -1.0) * Math.log(a))) - b)) / y;
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t, a, b): tmp = 0 if (y <= -1.7e+144) or not (y <= 1.22): tmp = (x_m * math.exp((((y * math.log(z)) - math.log(a)) - b))) / y else: tmp = math.exp(((math.log(x_m) + ((t + -1.0) * math.log(a))) - b)) / y return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t, a, b) tmp = 0.0 if ((y <= -1.7e+144) || !(y <= 1.22)) tmp = Float64(Float64(x_m * exp(Float64(Float64(Float64(y * log(z)) - log(a)) - b))) / y); else tmp = Float64(exp(Float64(Float64(log(x_m) + Float64(Float64(t + -1.0) * log(a))) - b)) / y); end return Float64(x_s * tmp) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t, a, b) tmp = 0.0; if ((y <= -1.7e+144) || ~((y <= 1.22))) tmp = (x_m * exp((((y * log(z)) - log(a)) - b))) / y; else tmp = exp(((log(x_m) + ((t + -1.0) * log(a))) - b)) / y; end tmp_2 = x_s * tmp; end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_, a_, b_] := N[(x$95$s * If[Or[LessEqual[y, -1.7e+144], N[Not[LessEqual[y, 1.22]], $MachinePrecision]], N[(N[(x$95$m * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] - N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[Exp[N[(N[(N[Log[x$95$m], $MachinePrecision] + N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -1.7 \cdot 10^{+144} \lor \neg \left(y \leq 1.22\right):\\
\;\;\;\;\frac{x\_m \cdot e^{\left(y \cdot \log z - \log a\right) - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{\left(\log x\_m + \left(t + -1\right) \cdot \log a\right) - b}}{y}\\
\end{array}
\end{array}
if y < -1.7e144 or 1.21999999999999997 < y Initial program 100.0%
Taylor expanded in t around 0 97.3%
+-commutative97.3%
mul-1-neg97.3%
unsub-neg97.3%
Simplified97.3%
if -1.7e144 < y < 1.21999999999999997Initial program 97.6%
add-exp-log71.4%
*-commutative71.4%
log-prod53.8%
add-log-exp53.8%
associate--l+53.8%
fma-define53.8%
sub-neg53.8%
metadata-eval53.8%
Applied egg-rr53.8%
Taylor expanded in y around 0 51.4%
Final simplification64.5%
x\_m = (fabs.f64 x) x\_s = (copysign.f64 #s(literal 1 binary64) x) (FPCore (x_s x_m y z t a b) :precision binary64 (* x_s (/ (* x_m (exp (- (+ (* y (log z)) (* (+ t -1.0) (log a))) b))) y)))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t, double a, double b) {
return x_s * ((x_m * exp((((y * log(z)) + ((t + -1.0) * log(a))) - b))) / y);
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t, a, b)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
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_s * ((x_m * exp((((y * log(z)) + ((t + (-1.0d0)) * log(a))) - b))) / y)
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t, double a, double b) {
return x_s * ((x_m * Math.exp((((y * Math.log(z)) + ((t + -1.0) * Math.log(a))) - b))) / y);
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t, a, b): return x_s * ((x_m * math.exp((((y * math.log(z)) + ((t + -1.0) * math.log(a))) - b))) / y)
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t, a, b) return Float64(x_s * Float64(Float64(x_m * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t + -1.0) * log(a))) - b))) / y)) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp = code(x_s, x_m, y, z, t, a, b) tmp = x_s * ((x_m * exp((((y * log(z)) + ((t + -1.0) * log(a))) - b))) / y); end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_, a_, b_] := N[(x$95$s * N[(N[(x$95$m * 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]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \frac{x\_m \cdot e^{\left(y \cdot \log z + \left(t + -1\right) \cdot \log a\right) - b}}{y}
\end{array}
Initial program 98.3%
Final simplification98.3%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t a b)
:precision binary64
(*
x_s
(if (or (<= y -1.6e+146) (not (<= y 2.3e+69)))
(/ (* x_m (/ (pow z y) a)) y)
(/ (* x_m (exp (- (* (+ t -1.0) (log a)) b))) y))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.6e+146) || !(y <= 2.3e+69)) {
tmp = (x_m * (pow(z, y) / a)) / y;
} else {
tmp = (x_m * exp((((t + -1.0) * log(a)) - b))) / y;
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t, a, b)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
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.6d+146)) .or. (.not. (y <= 2.3d+69))) then
tmp = (x_m * ((z ** y) / a)) / y
else
tmp = (x_m * exp((((t + (-1.0d0)) * log(a)) - b))) / y
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.6e+146) || !(y <= 2.3e+69)) {
tmp = (x_m * (Math.pow(z, y) / a)) / y;
} else {
tmp = (x_m * Math.exp((((t + -1.0) * Math.log(a)) - b))) / y;
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t, a, b): tmp = 0 if (y <= -1.6e+146) or not (y <= 2.3e+69): tmp = (x_m * (math.pow(z, y) / a)) / y else: tmp = (x_m * math.exp((((t + -1.0) * math.log(a)) - b))) / y return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t, a, b) tmp = 0.0 if ((y <= -1.6e+146) || !(y <= 2.3e+69)) tmp = Float64(Float64(x_m * Float64((z ^ y) / a)) / y); else tmp = Float64(Float64(x_m * exp(Float64(Float64(Float64(t + -1.0) * log(a)) - b))) / y); end return Float64(x_s * tmp) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t, a, b) tmp = 0.0; if ((y <= -1.6e+146) || ~((y <= 2.3e+69))) tmp = (x_m * ((z ^ y) / a)) / y; else tmp = (x_m * exp((((t + -1.0) * log(a)) - b))) / y; end tmp_2 = x_s * tmp; end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_, a_, b_] := N[(x$95$s * If[Or[LessEqual[y, -1.6e+146], N[Not[LessEqual[y, 2.3e+69]], $MachinePrecision]], N[(N[(x$95$m * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x$95$m * N[Exp[N[(N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -1.6 \cdot 10^{+146} \lor \neg \left(y \leq 2.3 \cdot 10^{+69}\right):\\
\;\;\;\;\frac{x\_m \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x\_m \cdot e^{\left(t + -1\right) \cdot \log a - b}}{y}\\
\end{array}
\end{array}
if y < -1.6e146 or 2.30000000000000017e69 < y Initial program 100.0%
Taylor expanded in b around 0 96.9%
exp-sum76.6%
*-commutative76.6%
exp-to-pow76.6%
exp-to-pow76.6%
sub-neg76.6%
metadata-eval76.6%
Simplified76.6%
Taylor expanded in t around 0 93.8%
associate-/l*93.8%
Simplified93.8%
if -1.6e146 < y < 2.30000000000000017e69Initial program 97.7%
Taylor expanded in y around 0 92.9%
Final simplification93.1%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t a b)
:precision binary64
(*
x_s
(if (or (<= t -7e+127) (not (<= t 0.0015)))
(/ (* x_m (pow a (+ t -1.0))) y)
(* x_m (/ (pow z y) (* a (* y (exp b))))))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -7e+127) || !(t <= 0.0015)) {
tmp = (x_m * pow(a, (t + -1.0))) / y;
} else {
tmp = x_m * (pow(z, y) / (a * (y * exp(b))));
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t, a, b)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
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 <= (-7d+127)) .or. (.not. (t <= 0.0015d0))) then
tmp = (x_m * (a ** (t + (-1.0d0)))) / y
else
tmp = x_m * ((z ** y) / (a * (y * exp(b))))
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -7e+127) || !(t <= 0.0015)) {
tmp = (x_m * Math.pow(a, (t + -1.0))) / y;
} else {
tmp = x_m * (Math.pow(z, y) / (a * (y * Math.exp(b))));
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t, a, b): tmp = 0 if (t <= -7e+127) or not (t <= 0.0015): tmp = (x_m * math.pow(a, (t + -1.0))) / y else: tmp = x_m * (math.pow(z, y) / (a * (y * math.exp(b)))) return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t, a, b) tmp = 0.0 if ((t <= -7e+127) || !(t <= 0.0015)) tmp = Float64(Float64(x_m * (a ^ Float64(t + -1.0))) / y); else tmp = Float64(x_m * Float64((z ^ y) / Float64(a * Float64(y * exp(b))))); end return Float64(x_s * tmp) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t, a, b) tmp = 0.0; if ((t <= -7e+127) || ~((t <= 0.0015))) tmp = (x_m * (a ^ (t + -1.0))) / y; else tmp = x_m * ((z ^ y) / (a * (y * exp(b)))); end tmp_2 = x_s * tmp; end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_, a_, b_] := N[(x$95$s * If[Or[LessEqual[t, -7e+127], N[Not[LessEqual[t, 0.0015]], $MachinePrecision]], N[(N[(x$95$m * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x$95$m * N[(N[Power[z, y], $MachinePrecision] / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;t \leq -7 \cdot 10^{+127} \lor \neg \left(t \leq 0.0015\right):\\
\;\;\;\;\frac{x\_m \cdot {a}^{\left(t + -1\right)}}{y}\\
\mathbf{else}:\\
\;\;\;\;x\_m \cdot \frac{{z}^{y}}{a \cdot \left(y \cdot e^{b}\right)}\\
\end{array}
\end{array}
if t < -6.99999999999999956e127 or 0.0015 < t Initial program 99.0%
Taylor expanded in b around 0 86.6%
exp-sum69.7%
*-commutative69.7%
exp-to-pow69.7%
exp-to-pow69.7%
sub-neg69.7%
metadata-eval69.7%
Simplified69.7%
Taylor expanded in y around 0 81.4%
exp-to-pow81.4%
sub-neg81.4%
metadata-eval81.4%
Simplified81.4%
if -6.99999999999999956e127 < t < 0.0015Initial program 97.9%
associate-/l*97.3%
associate--l+97.3%
exp-sum86.8%
associate-/l*85.6%
*-commutative85.6%
exp-to-pow85.6%
exp-diff81.2%
*-commutative81.2%
exp-to-pow82.6%
sub-neg82.6%
metadata-eval82.6%
Simplified82.6%
Taylor expanded in t around 0 87.0%
Final simplification84.9%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t a b)
:precision binary64
(*
x_s
(if (or (<= t -3.1e+128) (not (<= t 3.7e-6)))
(/ (* x_m (pow a (+ t -1.0))) y)
(/ (* x_m (pow z y)) (* a (* y (exp b)))))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -3.1e+128) || !(t <= 3.7e-6)) {
tmp = (x_m * pow(a, (t + -1.0))) / y;
} else {
tmp = (x_m * pow(z, y)) / (a * (y * exp(b)));
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t, a, b)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
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 <= (-3.1d+128)) .or. (.not. (t <= 3.7d-6))) then
tmp = (x_m * (a ** (t + (-1.0d0)))) / y
else
tmp = (x_m * (z ** y)) / (a * (y * exp(b)))
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -3.1e+128) || !(t <= 3.7e-6)) {
tmp = (x_m * Math.pow(a, (t + -1.0))) / y;
} else {
tmp = (x_m * Math.pow(z, y)) / (a * (y * Math.exp(b)));
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t, a, b): tmp = 0 if (t <= -3.1e+128) or not (t <= 3.7e-6): tmp = (x_m * math.pow(a, (t + -1.0))) / y else: tmp = (x_m * math.pow(z, y)) / (a * (y * math.exp(b))) return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t, a, b) tmp = 0.0 if ((t <= -3.1e+128) || !(t <= 3.7e-6)) tmp = Float64(Float64(x_m * (a ^ Float64(t + -1.0))) / y); else tmp = Float64(Float64(x_m * (z ^ y)) / Float64(a * Float64(y * exp(b)))); end return Float64(x_s * tmp) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t, a, b) tmp = 0.0; if ((t <= -3.1e+128) || ~((t <= 3.7e-6))) tmp = (x_m * (a ^ (t + -1.0))) / y; else tmp = (x_m * (z ^ y)) / (a * (y * exp(b))); end tmp_2 = x_s * tmp; end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_, a_, b_] := N[(x$95$s * If[Or[LessEqual[t, -3.1e+128], N[Not[LessEqual[t, 3.7e-6]], $MachinePrecision]], N[(N[(x$95$m * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x$95$m * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;t \leq -3.1 \cdot 10^{+128} \lor \neg \left(t \leq 3.7 \cdot 10^{-6}\right):\\
\;\;\;\;\frac{x\_m \cdot {a}^{\left(t + -1\right)}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x\_m \cdot {z}^{y}}{a \cdot \left(y \cdot e^{b}\right)}\\
\end{array}
\end{array}
if t < -3.10000000000000004e128 or 3.7000000000000002e-6 < t Initial program 99.0%
Taylor expanded in b around 0 86.6%
exp-sum69.7%
*-commutative69.7%
exp-to-pow69.7%
exp-to-pow69.7%
sub-neg69.7%
metadata-eval69.7%
Simplified69.7%
Taylor expanded in y around 0 81.4%
exp-to-pow81.4%
sub-neg81.4%
metadata-eval81.4%
Simplified81.4%
if -3.10000000000000004e128 < t < 3.7000000000000002e-6Initial program 97.9%
associate-/l*97.3%
associate--l+97.3%
exp-sum86.8%
associate-/l*85.6%
*-commutative85.6%
exp-to-pow85.6%
exp-diff81.2%
*-commutative81.2%
exp-to-pow82.6%
sub-neg82.6%
metadata-eval82.6%
Simplified82.6%
Taylor expanded in t around 0 87.3%
Final simplification85.1%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t a b)
:precision binary64
(let* ((t_1 (/ (* x_m (pow a (+ t -1.0))) y)))
(*
x_s
(if (<= b -6e+46)
(/ (exp (- b)) y)
(if (<= b -2.4e-193)
t_1
(if (<= b -4.8e-264)
(/ (* x_m (/ (pow z y) a)) y)
(if (<= b 1.38e-191)
t_1
(if (<= b 1.38e-14)
(* x_m (/ (pow z y) (* y a)))
(if (<= b 3.6e+26) t_1 (/ x_m (* a (* y (exp b)))))))))))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t, double a, double b) {
double t_1 = (x_m * pow(a, (t + -1.0))) / y;
double tmp;
if (b <= -6e+46) {
tmp = exp(-b) / y;
} else if (b <= -2.4e-193) {
tmp = t_1;
} else if (b <= -4.8e-264) {
tmp = (x_m * (pow(z, y) / a)) / y;
} else if (b <= 1.38e-191) {
tmp = t_1;
} else if (b <= 1.38e-14) {
tmp = x_m * (pow(z, y) / (y * a));
} else if (b <= 3.6e+26) {
tmp = t_1;
} else {
tmp = x_m / (a * (y * exp(b)));
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t, a, b)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
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_m * (a ** (t + (-1.0d0)))) / y
if (b <= (-6d+46)) then
tmp = exp(-b) / y
else if (b <= (-2.4d-193)) then
tmp = t_1
else if (b <= (-4.8d-264)) then
tmp = (x_m * ((z ** y) / a)) / y
else if (b <= 1.38d-191) then
tmp = t_1
else if (b <= 1.38d-14) then
tmp = x_m * ((z ** y) / (y * a))
else if (b <= 3.6d+26) then
tmp = t_1
else
tmp = x_m / (a * (y * exp(b)))
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t, double a, double b) {
double t_1 = (x_m * Math.pow(a, (t + -1.0))) / y;
double tmp;
if (b <= -6e+46) {
tmp = Math.exp(-b) / y;
} else if (b <= -2.4e-193) {
tmp = t_1;
} else if (b <= -4.8e-264) {
tmp = (x_m * (Math.pow(z, y) / a)) / y;
} else if (b <= 1.38e-191) {
tmp = t_1;
} else if (b <= 1.38e-14) {
tmp = x_m * (Math.pow(z, y) / (y * a));
} else if (b <= 3.6e+26) {
tmp = t_1;
} else {
tmp = x_m / (a * (y * Math.exp(b)));
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t, a, b): t_1 = (x_m * math.pow(a, (t + -1.0))) / y tmp = 0 if b <= -6e+46: tmp = math.exp(-b) / y elif b <= -2.4e-193: tmp = t_1 elif b <= -4.8e-264: tmp = (x_m * (math.pow(z, y) / a)) / y elif b <= 1.38e-191: tmp = t_1 elif b <= 1.38e-14: tmp = x_m * (math.pow(z, y) / (y * a)) elif b <= 3.6e+26: tmp = t_1 else: tmp = x_m / (a * (y * math.exp(b))) return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t, a, b) t_1 = Float64(Float64(x_m * (a ^ Float64(t + -1.0))) / y) tmp = 0.0 if (b <= -6e+46) tmp = Float64(exp(Float64(-b)) / y); elseif (b <= -2.4e-193) tmp = t_1; elseif (b <= -4.8e-264) tmp = Float64(Float64(x_m * Float64((z ^ y) / a)) / y); elseif (b <= 1.38e-191) tmp = t_1; elseif (b <= 1.38e-14) tmp = Float64(x_m * Float64((z ^ y) / Float64(y * a))); elseif (b <= 3.6e+26) tmp = t_1; else tmp = Float64(x_m / Float64(a * Float64(y * exp(b)))); end return Float64(x_s * tmp) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t, a, b) t_1 = (x_m * (a ^ (t + -1.0))) / y; tmp = 0.0; if (b <= -6e+46) tmp = exp(-b) / y; elseif (b <= -2.4e-193) tmp = t_1; elseif (b <= -4.8e-264) tmp = (x_m * ((z ^ y) / a)) / y; elseif (b <= 1.38e-191) tmp = t_1; elseif (b <= 1.38e-14) tmp = x_m * ((z ^ y) / (y * a)); elseif (b <= 3.6e+26) tmp = t_1; else tmp = x_m / (a * (y * exp(b))); end tmp_2 = x_s * tmp; end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x$95$m * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, N[(x$95$s * If[LessEqual[b, -6e+46], N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, -2.4e-193], t$95$1, If[LessEqual[b, -4.8e-264], N[(N[(x$95$m * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 1.38e-191], t$95$1, If[LessEqual[b, 1.38e-14], N[(x$95$m * N[(N[Power[z, y], $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.6e+26], t$95$1, N[(x$95$m / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]), $MachinePrecision]]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
\begin{array}{l}
t_1 := \frac{x\_m \cdot {a}^{\left(t + -1\right)}}{y}\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;b \leq -6 \cdot 10^{+46}:\\
\;\;\;\;\frac{e^{-b}}{y}\\
\mathbf{elif}\;b \leq -2.4 \cdot 10^{-193}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -4.8 \cdot 10^{-264}:\\
\;\;\;\;\frac{x\_m \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{elif}\;b \leq 1.38 \cdot 10^{-191}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.38 \cdot 10^{-14}:\\
\;\;\;\;x\_m \cdot \frac{{z}^{y}}{y \cdot a}\\
\mathbf{elif}\;b \leq 3.6 \cdot 10^{+26}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x\_m}{a \cdot \left(y \cdot e^{b}\right)}\\
\end{array}
\end{array}
\end{array}
if b < -6.00000000000000047e46Initial program 100.0%
add-exp-log56.1%
*-commutative56.1%
log-prod53.7%
add-log-exp53.7%
associate--l+53.7%
fma-define53.7%
sub-neg53.7%
metadata-eval53.7%
Applied egg-rr53.7%
Taylor expanded in b around inf 51.3%
neg-mul-151.3%
Simplified51.3%
if -6.00000000000000047e46 < b < -2.4e-193 or -4.7999999999999997e-264 < b < 1.38000000000000003e-191 or 1.38000000000000002e-14 < b < 3.60000000000000024e26Initial program 96.0%
Taylor expanded in b around 0 95.1%
exp-sum84.4%
*-commutative84.4%
exp-to-pow84.4%
exp-to-pow86.3%
sub-neg86.3%
metadata-eval86.3%
Simplified86.3%
Taylor expanded in y around 0 83.9%
exp-to-pow85.7%
sub-neg85.7%
metadata-eval85.7%
Simplified85.7%
if -2.4e-193 < b < -4.7999999999999997e-264Initial program 99.4%
Taylor expanded in b around 0 99.4%
exp-sum77.9%
*-commutative77.9%
exp-to-pow77.9%
exp-to-pow78.5%
sub-neg78.5%
metadata-eval78.5%
Simplified78.5%
Taylor expanded in t around 0 99.9%
associate-/l*99.9%
Simplified99.9%
if 1.38000000000000003e-191 < b < 1.38000000000000002e-14Initial program 99.5%
associate-/l*99.5%
associate--l+99.5%
exp-sum92.0%
associate-/l*92.0%
*-commutative92.0%
exp-to-pow92.0%
exp-diff92.0%
*-commutative92.0%
exp-to-pow92.5%
sub-neg92.5%
metadata-eval92.5%
Simplified92.5%
Taylor expanded in t around 0 78.0%
Taylor expanded in b around 0 78.0%
associate-/l*78.0%
Simplified78.0%
if 3.60000000000000024e26 < b Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum81.4%
associate-/l*81.4%
*-commutative81.4%
exp-to-pow81.4%
exp-diff61.0%
*-commutative61.0%
exp-to-pow61.0%
sub-neg61.0%
metadata-eval61.0%
Simplified61.0%
Taylor expanded in t around 0 78.0%
Taylor expanded in y around 0 86.7%
Final simplification80.0%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t a b)
:precision binary64
(let* ((t_1 (* x_m (pow a (+ t -1.0)))) (t_2 (/ t_1 y)))
(*
x_s
(if (<= b -4.8e+48)
(/ (exp (- b)) y)
(if (<= b -2.85e-195)
(/ (* t_1 (- 1.0 b)) y)
(if (<= b -1.05e-262)
(/ (* x_m (/ (pow z y) a)) y)
(if (<= b 9e-193)
t_2
(if (<= b 1.28e-11)
(* x_m (/ (pow z y) (* y a)))
(if (<= b 2e+25) t_2 (/ x_m (* a (* y (exp b)))))))))))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t, double a, double b) {
double t_1 = x_m * pow(a, (t + -1.0));
double t_2 = t_1 / y;
double tmp;
if (b <= -4.8e+48) {
tmp = exp(-b) / y;
} else if (b <= -2.85e-195) {
tmp = (t_1 * (1.0 - b)) / y;
} else if (b <= -1.05e-262) {
tmp = (x_m * (pow(z, y) / a)) / y;
} else if (b <= 9e-193) {
tmp = t_2;
} else if (b <= 1.28e-11) {
tmp = x_m * (pow(z, y) / (y * a));
} else if (b <= 2e+25) {
tmp = t_2;
} else {
tmp = x_m / (a * (y * exp(b)));
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t, a, b)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
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_m * (a ** (t + (-1.0d0)))
t_2 = t_1 / y
if (b <= (-4.8d+48)) then
tmp = exp(-b) / y
else if (b <= (-2.85d-195)) then
tmp = (t_1 * (1.0d0 - b)) / y
else if (b <= (-1.05d-262)) then
tmp = (x_m * ((z ** y) / a)) / y
else if (b <= 9d-193) then
tmp = t_2
else if (b <= 1.28d-11) then
tmp = x_m * ((z ** y) / (y * a))
else if (b <= 2d+25) then
tmp = t_2
else
tmp = x_m / (a * (y * exp(b)))
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t, double a, double b) {
double t_1 = x_m * Math.pow(a, (t + -1.0));
double t_2 = t_1 / y;
double tmp;
if (b <= -4.8e+48) {
tmp = Math.exp(-b) / y;
} else if (b <= -2.85e-195) {
tmp = (t_1 * (1.0 - b)) / y;
} else if (b <= -1.05e-262) {
tmp = (x_m * (Math.pow(z, y) / a)) / y;
} else if (b <= 9e-193) {
tmp = t_2;
} else if (b <= 1.28e-11) {
tmp = x_m * (Math.pow(z, y) / (y * a));
} else if (b <= 2e+25) {
tmp = t_2;
} else {
tmp = x_m / (a * (y * Math.exp(b)));
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t, a, b): t_1 = x_m * math.pow(a, (t + -1.0)) t_2 = t_1 / y tmp = 0 if b <= -4.8e+48: tmp = math.exp(-b) / y elif b <= -2.85e-195: tmp = (t_1 * (1.0 - b)) / y elif b <= -1.05e-262: tmp = (x_m * (math.pow(z, y) / a)) / y elif b <= 9e-193: tmp = t_2 elif b <= 1.28e-11: tmp = x_m * (math.pow(z, y) / (y * a)) elif b <= 2e+25: tmp = t_2 else: tmp = x_m / (a * (y * math.exp(b))) return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t, a, b) t_1 = Float64(x_m * (a ^ Float64(t + -1.0))) t_2 = Float64(t_1 / y) tmp = 0.0 if (b <= -4.8e+48) tmp = Float64(exp(Float64(-b)) / y); elseif (b <= -2.85e-195) tmp = Float64(Float64(t_1 * Float64(1.0 - b)) / y); elseif (b <= -1.05e-262) tmp = Float64(Float64(x_m * Float64((z ^ y) / a)) / y); elseif (b <= 9e-193) tmp = t_2; elseif (b <= 1.28e-11) tmp = Float64(x_m * Float64((z ^ y) / Float64(y * a))); elseif (b <= 2e+25) tmp = t_2; else tmp = Float64(x_m / Float64(a * Float64(y * exp(b)))); end return Float64(x_s * tmp) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t, a, b) t_1 = x_m * (a ^ (t + -1.0)); t_2 = t_1 / y; tmp = 0.0; if (b <= -4.8e+48) tmp = exp(-b) / y; elseif (b <= -2.85e-195) tmp = (t_1 * (1.0 - b)) / y; elseif (b <= -1.05e-262) tmp = (x_m * ((z ^ y) / a)) / y; elseif (b <= 9e-193) tmp = t_2; elseif (b <= 1.28e-11) tmp = x_m * ((z ^ y) / (y * a)); elseif (b <= 2e+25) tmp = t_2; else tmp = x_m / (a * (y * exp(b))); end tmp_2 = x_s * tmp; end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x$95$m * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / y), $MachinePrecision]}, N[(x$95$s * If[LessEqual[b, -4.8e+48], N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, -2.85e-195], N[(N[(t$95$1 * N[(1.0 - b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, -1.05e-262], N[(N[(x$95$m * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 9e-193], t$95$2, If[LessEqual[b, 1.28e-11], N[(x$95$m * N[(N[Power[z, y], $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2e+25], t$95$2, N[(x$95$m / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]), $MachinePrecision]]]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
\begin{array}{l}
t_1 := x\_m \cdot {a}^{\left(t + -1\right)}\\
t_2 := \frac{t\_1}{y}\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;b \leq -4.8 \cdot 10^{+48}:\\
\;\;\;\;\frac{e^{-b}}{y}\\
\mathbf{elif}\;b \leq -2.85 \cdot 10^{-195}:\\
\;\;\;\;\frac{t\_1 \cdot \left(1 - b\right)}{y}\\
\mathbf{elif}\;b \leq -1.05 \cdot 10^{-262}:\\
\;\;\;\;\frac{x\_m \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{elif}\;b \leq 9 \cdot 10^{-193}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq 1.28 \cdot 10^{-11}:\\
\;\;\;\;x\_m \cdot \frac{{z}^{y}}{y \cdot a}\\
\mathbf{elif}\;b \leq 2 \cdot 10^{+25}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{x\_m}{a \cdot \left(y \cdot e^{b}\right)}\\
\end{array}
\end{array}
\end{array}
if b < -4.8000000000000002e48Initial program 100.0%
add-exp-log56.1%
*-commutative56.1%
log-prod53.7%
add-log-exp53.7%
associate--l+53.7%
fma-define53.7%
sub-neg53.7%
metadata-eval53.7%
Applied egg-rr53.7%
Taylor expanded in b around inf 51.3%
neg-mul-151.3%
Simplified51.3%
if -4.8000000000000002e48 < b < -2.85e-195Initial program 94.5%
add-exp-log74.8%
*-commutative74.8%
log-prod51.0%
add-log-exp51.0%
associate--l+51.0%
fma-define51.0%
sub-neg51.0%
metadata-eval51.0%
Applied egg-rr51.0%
Taylor expanded in y around 0 50.1%
Taylor expanded in b around 0 50.1%
associate-*r*50.1%
neg-mul-150.1%
distribute-rgt1-in50.1%
exp-sum50.3%
rem-exp-log84.7%
exp-to-pow86.6%
sub-neg86.6%
metadata-eval86.6%
Simplified86.6%
if -2.85e-195 < b < -1.05e-262Initial program 99.4%
Taylor expanded in b around 0 99.4%
exp-sum77.9%
*-commutative77.9%
exp-to-pow77.9%
exp-to-pow78.5%
sub-neg78.5%
metadata-eval78.5%
Simplified78.5%
Taylor expanded in t around 0 99.9%
associate-/l*99.9%
Simplified99.9%
if -1.05e-262 < b < 8.9999999999999997e-193 or 1.28e-11 < b < 2.00000000000000018e25Initial program 97.8%
Taylor expanded in b around 0 95.7%
exp-sum81.0%
*-commutative81.0%
exp-to-pow81.0%
exp-to-pow82.9%
sub-neg82.9%
metadata-eval82.9%
Simplified82.9%
Taylor expanded in y around 0 83.0%
exp-to-pow84.8%
sub-neg84.8%
metadata-eval84.8%
Simplified84.8%
if 8.9999999999999997e-193 < b < 1.28e-11Initial program 99.5%
associate-/l*99.5%
associate--l+99.5%
exp-sum92.0%
associate-/l*92.0%
*-commutative92.0%
exp-to-pow92.0%
exp-diff92.0%
*-commutative92.0%
exp-to-pow92.5%
sub-neg92.5%
metadata-eval92.5%
Simplified92.5%
Taylor expanded in t around 0 78.0%
Taylor expanded in b around 0 78.0%
associate-/l*78.0%
Simplified78.0%
if 2.00000000000000018e25 < b Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum81.4%
associate-/l*81.4%
*-commutative81.4%
exp-to-pow81.4%
exp-diff61.0%
*-commutative61.0%
exp-to-pow61.0%
sub-neg61.0%
metadata-eval61.0%
Simplified61.0%
Taylor expanded in t around 0 78.0%
Taylor expanded in y around 0 86.7%
Final simplification80.0%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t a b)
:precision binary64
(*
x_s
(if (<= b -7e+46)
(/ (exp (- b)) y)
(if (<= b 2.7e+25)
(* x_m (/ (pow z y) (* y a)))
(/ x_m (* a (* y (exp b))))))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -7e+46) {
tmp = exp(-b) / y;
} else if (b <= 2.7e+25) {
tmp = x_m * (pow(z, y) / (y * a));
} else {
tmp = x_m / (a * (y * exp(b)));
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t, a, b)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-7d+46)) then
tmp = exp(-b) / y
else if (b <= 2.7d+25) then
tmp = x_m * ((z ** y) / (y * a))
else
tmp = x_m / (a * (y * exp(b)))
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -7e+46) {
tmp = Math.exp(-b) / y;
} else if (b <= 2.7e+25) {
tmp = x_m * (Math.pow(z, y) / (y * a));
} else {
tmp = x_m / (a * (y * Math.exp(b)));
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t, a, b): tmp = 0 if b <= -7e+46: tmp = math.exp(-b) / y elif b <= 2.7e+25: tmp = x_m * (math.pow(z, y) / (y * a)) else: tmp = x_m / (a * (y * math.exp(b))) return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t, a, b) tmp = 0.0 if (b <= -7e+46) tmp = Float64(exp(Float64(-b)) / y); elseif (b <= 2.7e+25) tmp = Float64(x_m * Float64((z ^ y) / Float64(y * a))); else tmp = Float64(x_m / Float64(a * Float64(y * exp(b)))); end return Float64(x_s * tmp) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t, a, b) tmp = 0.0; if (b <= -7e+46) tmp = exp(-b) / y; elseif (b <= 2.7e+25) tmp = x_m * ((z ^ y) / (y * a)); else tmp = x_m / (a * (y * exp(b))); end tmp_2 = x_s * tmp; end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_, a_, b_] := N[(x$95$s * If[LessEqual[b, -7e+46], N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 2.7e+25], N[(x$95$m * N[(N[Power[z, y], $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x$95$m / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;b \leq -7 \cdot 10^{+46}:\\
\;\;\;\;\frac{e^{-b}}{y}\\
\mathbf{elif}\;b \leq 2.7 \cdot 10^{+25}:\\
\;\;\;\;x\_m \cdot \frac{{z}^{y}}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x\_m}{a \cdot \left(y \cdot e^{b}\right)}\\
\end{array}
\end{array}
if b < -6.9999999999999997e46Initial program 100.0%
add-exp-log56.1%
*-commutative56.1%
log-prod53.7%
add-log-exp53.7%
associate--l+53.7%
fma-define53.7%
sub-neg53.7%
metadata-eval53.7%
Applied egg-rr53.7%
Taylor expanded in b around inf 51.3%
neg-mul-151.3%
Simplified51.3%
if -6.9999999999999997e46 < b < 2.7e25Initial program 97.2%
associate-/l*96.7%
associate--l+96.7%
exp-sum84.5%
associate-/l*83.3%
*-commutative83.3%
exp-to-pow83.3%
exp-diff79.4%
*-commutative79.4%
exp-to-pow80.8%
sub-neg80.8%
metadata-eval80.8%
Simplified80.8%
Taylor expanded in t around 0 65.4%
Taylor expanded in b around 0 68.3%
associate-/l*68.0%
Simplified68.0%
if 2.7e25 < b Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum81.4%
associate-/l*81.4%
*-commutative81.4%
exp-to-pow81.4%
exp-diff61.0%
*-commutative61.0%
exp-to-pow61.0%
sub-neg61.0%
metadata-eval61.0%
Simplified61.0%
Taylor expanded in t around 0 78.0%
Taylor expanded in y around 0 86.7%
Final simplification69.6%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t a b)
:precision binary64
(*
x_s
(if (<= b -2.15e+72)
(/ (exp (- b)) y)
(if (<= b 1.9e+25)
(/ (* x_m (/ (pow z y) a)) y)
(/ x_m (* a (* y (exp b))))))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.15e+72) {
tmp = exp(-b) / y;
} else if (b <= 1.9e+25) {
tmp = (x_m * (pow(z, y) / a)) / y;
} else {
tmp = x_m / (a * (y * exp(b)));
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t, a, b)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
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.15d+72)) then
tmp = exp(-b) / y
else if (b <= 1.9d+25) then
tmp = (x_m * ((z ** y) / a)) / y
else
tmp = x_m / (a * (y * exp(b)))
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.15e+72) {
tmp = Math.exp(-b) / y;
} else if (b <= 1.9e+25) {
tmp = (x_m * (Math.pow(z, y) / a)) / y;
} else {
tmp = x_m / (a * (y * Math.exp(b)));
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t, a, b): tmp = 0 if b <= -2.15e+72: tmp = math.exp(-b) / y elif b <= 1.9e+25: tmp = (x_m * (math.pow(z, y) / a)) / y else: tmp = x_m / (a * (y * math.exp(b))) return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t, a, b) tmp = 0.0 if (b <= -2.15e+72) tmp = Float64(exp(Float64(-b)) / y); elseif (b <= 1.9e+25) tmp = Float64(Float64(x_m * Float64((z ^ y) / a)) / y); else tmp = Float64(x_m / Float64(a * Float64(y * exp(b)))); end return Float64(x_s * tmp) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t, a, b) tmp = 0.0; if (b <= -2.15e+72) tmp = exp(-b) / y; elseif (b <= 1.9e+25) tmp = (x_m * ((z ^ y) / a)) / y; else tmp = x_m / (a * (y * exp(b))); end tmp_2 = x_s * tmp; end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_, a_, b_] := N[(x$95$s * If[LessEqual[b, -2.15e+72], N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 1.9e+25], N[(N[(x$95$m * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x$95$m / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;b \leq -2.15 \cdot 10^{+72}:\\
\;\;\;\;\frac{e^{-b}}{y}\\
\mathbf{elif}\;b \leq 1.9 \cdot 10^{+25}:\\
\;\;\;\;\frac{x\_m \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x\_m}{a \cdot \left(y \cdot e^{b}\right)}\\
\end{array}
\end{array}
if b < -2.1500000000000001e72Initial program 100.0%
add-exp-log57.9%
*-commutative57.9%
log-prod55.3%
add-log-exp55.3%
associate--l+55.3%
fma-define55.3%
sub-neg55.3%
metadata-eval55.3%
Applied egg-rr55.3%
Taylor expanded in b around inf 52.7%
neg-mul-152.7%
Simplified52.7%
if -2.1500000000000001e72 < b < 1.9e25Initial program 97.3%
Taylor expanded in b around 0 96.6%
exp-sum85.4%
*-commutative85.4%
exp-to-pow85.4%
exp-to-pow86.8%
sub-neg86.8%
metadata-eval86.8%
Simplified86.8%
Taylor expanded in t around 0 69.9%
associate-/l*69.9%
Simplified69.9%
if 1.9e25 < b Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum81.4%
associate-/l*81.4%
*-commutative81.4%
exp-to-pow81.4%
exp-diff61.0%
*-commutative61.0%
exp-to-pow61.0%
sub-neg61.0%
metadata-eval61.0%
Simplified61.0%
Taylor expanded in t around 0 78.0%
Taylor expanded in y around 0 86.7%
Final simplification71.2%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t a b)
:precision binary64
(*
x_s
(if (or (<= b -5.2e+46) (not (<= b 660.0)))
(/ (exp (- b)) y)
(/ x_m (* y a)))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -5.2e+46) || !(b <= 660.0)) {
tmp = exp(-b) / y;
} else {
tmp = x_m / (y * a);
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t, a, b)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
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 <= (-5.2d+46)) .or. (.not. (b <= 660.0d0))) then
tmp = exp(-b) / y
else
tmp = x_m / (y * a)
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -5.2e+46) || !(b <= 660.0)) {
tmp = Math.exp(-b) / y;
} else {
tmp = x_m / (y * a);
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t, a, b): tmp = 0 if (b <= -5.2e+46) or not (b <= 660.0): tmp = math.exp(-b) / y else: tmp = x_m / (y * a) return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t, a, b) tmp = 0.0 if ((b <= -5.2e+46) || !(b <= 660.0)) tmp = Float64(exp(Float64(-b)) / y); else tmp = Float64(x_m / Float64(y * a)); end return Float64(x_s * tmp) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t, a, b) tmp = 0.0; if ((b <= -5.2e+46) || ~((b <= 660.0))) tmp = exp(-b) / y; else tmp = x_m / (y * a); end tmp_2 = x_s * tmp; end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_, a_, b_] := N[(x$95$s * If[Or[LessEqual[b, -5.2e+46], N[Not[LessEqual[b, 660.0]], $MachinePrecision]], N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision], N[(x$95$m / N[(y * a), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;b \leq -5.2 \cdot 10^{+46} \lor \neg \left(b \leq 660\right):\\
\;\;\;\;\frac{e^{-b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x\_m}{y \cdot a}\\
\end{array}
\end{array}
if b < -5.20000000000000027e46 or 660 < b Initial program 100.0%
add-exp-log78.1%
*-commutative78.1%
log-prod51.4%
add-log-exp51.4%
associate--l+51.4%
fma-define51.4%
sub-neg51.4%
metadata-eval51.4%
Applied egg-rr51.4%
Taylor expanded in b around inf 70.7%
neg-mul-170.7%
Simplified70.7%
if -5.20000000000000027e46 < b < 660Initial program 97.1%
associate-/l*96.5%
associate--l+96.5%
exp-sum84.0%
associate-/l*82.7%
*-commutative82.7%
exp-to-pow82.7%
exp-diff80.7%
*-commutative80.7%
exp-to-pow82.1%
sub-neg82.1%
metadata-eval82.1%
Simplified82.1%
Taylor expanded in t around 0 66.2%
Taylor expanded in b around 0 69.2%
associate-/l*68.9%
Simplified68.9%
Taylor expanded in y around 0 45.9%
Final simplification56.1%
x\_m = (fabs.f64 x) x\_s = (copysign.f64 #s(literal 1 binary64) x) (FPCore (x_s x_m y z t a b) :precision binary64 (* x_s (/ x_m (* a (* y (exp b))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t, double a, double b) {
return x_s * (x_m / (a * (y * exp(b))));
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t, a, b)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
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_s * (x_m / (a * (y * exp(b))))
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t, double a, double b) {
return x_s * (x_m / (a * (y * Math.exp(b))));
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t, a, b): return x_s * (x_m / (a * (y * math.exp(b))))
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t, a, b) return Float64(x_s * Float64(x_m / Float64(a * Float64(y * exp(b))))) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp = code(x_s, x_m, y, z, t, a, b) tmp = x_s * (x_m / (a * (y * exp(b)))); end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_, a_, b_] := N[(x$95$s * N[(x$95$m / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \frac{x\_m}{a \cdot \left(y \cdot e^{b}\right)}
\end{array}
Initial program 98.3%
associate-/l*98.0%
associate--l+98.0%
exp-sum83.2%
associate-/l*82.4%
*-commutative82.4%
exp-to-pow82.4%
exp-diff73.0%
*-commutative73.0%
exp-to-pow73.8%
sub-neg73.8%
metadata-eval73.8%
Simplified73.8%
Taylor expanded in t around 0 70.7%
Taylor expanded in y around 0 62.3%
Final simplification62.3%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t a b)
:precision binary64
(*
x_s
(if (<= b -2.6e+66)
(+
(/ 1.0 y)
(*
b
(+
(* b (+ (* -0.16666666666666666 (/ b y)) (* 0.5 (/ 1.0 y))))
(/ -1.0 y))))
(/ (/ x_m a) y))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.6e+66) {
tmp = (1.0 / y) + (b * ((b * ((-0.16666666666666666 * (b / y)) + (0.5 * (1.0 / y)))) + (-1.0 / y)));
} else {
tmp = (x_m / a) / y;
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t, a, b)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-2.6d+66)) then
tmp = (1.0d0 / y) + (b * ((b * (((-0.16666666666666666d0) * (b / y)) + (0.5d0 * (1.0d0 / y)))) + ((-1.0d0) / y)))
else
tmp = (x_m / a) / y
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.6e+66) {
tmp = (1.0 / y) + (b * ((b * ((-0.16666666666666666 * (b / y)) + (0.5 * (1.0 / y)))) + (-1.0 / y)));
} else {
tmp = (x_m / a) / y;
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t, a, b): tmp = 0 if b <= -2.6e+66: tmp = (1.0 / y) + (b * ((b * ((-0.16666666666666666 * (b / y)) + (0.5 * (1.0 / y)))) + (-1.0 / y))) else: tmp = (x_m / a) / y return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t, a, b) tmp = 0.0 if (b <= -2.6e+66) tmp = Float64(Float64(1.0 / y) + Float64(b * Float64(Float64(b * Float64(Float64(-0.16666666666666666 * Float64(b / y)) + Float64(0.5 * Float64(1.0 / y)))) + Float64(-1.0 / y)))); else tmp = Float64(Float64(x_m / a) / y); end return Float64(x_s * tmp) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t, a, b) tmp = 0.0; if (b <= -2.6e+66) tmp = (1.0 / y) + (b * ((b * ((-0.16666666666666666 * (b / y)) + (0.5 * (1.0 / y)))) + (-1.0 / y))); else tmp = (x_m / a) / y; end tmp_2 = x_s * tmp; end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_, a_, b_] := N[(x$95$s * If[LessEqual[b, -2.6e+66], N[(N[(1.0 / y), $MachinePrecision] + N[(b * N[(N[(b * N[(N[(-0.16666666666666666 * N[(b / y), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m / a), $MachinePrecision] / y), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;b \leq -2.6 \cdot 10^{+66}:\\
\;\;\;\;\frac{1}{y} + b \cdot \left(b \cdot \left(-0.16666666666666666 \cdot \frac{b}{y} + 0.5 \cdot \frac{1}{y}\right) + \frac{-1}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x\_m}{a}}{y}\\
\end{array}
\end{array}
if b < -2.60000000000000012e66Initial program 100.0%
add-exp-log56.4%
*-commutative56.4%
log-prod53.8%
add-log-exp53.8%
associate--l+53.8%
fma-define53.8%
sub-neg53.8%
metadata-eval53.8%
Applied egg-rr53.8%
Taylor expanded in b around inf 51.4%
neg-mul-151.4%
Simplified51.4%
Taylor expanded in b around 0 51.4%
if -2.60000000000000012e66 < b Initial program 98.0%
associate-/l*97.6%
associate--l+97.6%
exp-sum83.4%
associate-/l*82.4%
*-commutative82.4%
exp-to-pow82.4%
exp-diff74.1%
*-commutative74.1%
exp-to-pow75.1%
sub-neg75.1%
metadata-eval75.1%
Simplified75.1%
Taylor expanded in t around 0 69.1%
Taylor expanded in b around 0 57.4%
associate-/l*57.2%
Simplified57.2%
Taylor expanded in y around 0 36.6%
associate-/r*37.0%
Simplified37.0%
Final simplification39.2%
x\_m = (fabs.f64 x) x\_s = (copysign.f64 #s(literal 1 binary64) x) (FPCore (x_s x_m y z t a b) :precision binary64 (* x_s (if (<= b -2.7e+71) (+ (/ 1.0 y) (* b (* b (/ 0.5 y)))) (/ (/ x_m a) y))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.7e+71) {
tmp = (1.0 / y) + (b * (b * (0.5 / y)));
} else {
tmp = (x_m / a) / y;
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t, a, b)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
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.7d+71)) then
tmp = (1.0d0 / y) + (b * (b * (0.5d0 / y)))
else
tmp = (x_m / a) / y
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.7e+71) {
tmp = (1.0 / y) + (b * (b * (0.5 / y)));
} else {
tmp = (x_m / a) / y;
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t, a, b): tmp = 0 if b <= -2.7e+71: tmp = (1.0 / y) + (b * (b * (0.5 / y))) else: tmp = (x_m / a) / y return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t, a, b) tmp = 0.0 if (b <= -2.7e+71) tmp = Float64(Float64(1.0 / y) + Float64(b * Float64(b * Float64(0.5 / y)))); else tmp = Float64(Float64(x_m / a) / y); end return Float64(x_s * tmp) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t, a, b) tmp = 0.0; if (b <= -2.7e+71) tmp = (1.0 / y) + (b * (b * (0.5 / y))); else tmp = (x_m / a) / y; end tmp_2 = x_s * tmp; end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_, a_, b_] := N[(x$95$s * If[LessEqual[b, -2.7e+71], N[(N[(1.0 / y), $MachinePrecision] + N[(b * N[(b * N[(0.5 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m / a), $MachinePrecision] / y), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;b \leq -2.7 \cdot 10^{+71}:\\
\;\;\;\;\frac{1}{y} + b \cdot \left(b \cdot \frac{0.5}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x\_m}{a}}{y}\\
\end{array}
\end{array}
if b < -2.69999999999999997e71Initial program 100.0%
add-exp-log56.4%
*-commutative56.4%
log-prod53.8%
add-log-exp53.8%
associate--l+53.8%
fma-define53.8%
sub-neg53.8%
metadata-eval53.8%
Applied egg-rr53.8%
Taylor expanded in b around inf 51.4%
neg-mul-151.4%
Simplified51.4%
Taylor expanded in b around 0 44.2%
Taylor expanded in b around inf 44.2%
associate-*r/44.2%
*-commutative44.2%
associate-/l*44.2%
Simplified44.2%
if -2.69999999999999997e71 < b Initial program 98.0%
associate-/l*97.6%
associate--l+97.6%
exp-sum83.4%
associate-/l*82.4%
*-commutative82.4%
exp-to-pow82.4%
exp-diff74.1%
*-commutative74.1%
exp-to-pow75.1%
sub-neg75.1%
metadata-eval75.1%
Simplified75.1%
Taylor expanded in t around 0 69.1%
Taylor expanded in b around 0 57.4%
associate-/l*57.2%
Simplified57.2%
Taylor expanded in y around 0 36.6%
associate-/r*37.0%
Simplified37.0%
Final simplification38.1%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t a b)
:precision binary64
(*
x_s
(if (<= b -1.15e+69)
(/ (+ 1.0 (* b (+ -1.0 (* b 0.5)))) y)
(/ (/ x_m a) y))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.15e+69) {
tmp = (1.0 + (b * (-1.0 + (b * 0.5)))) / y;
} else {
tmp = (x_m / a) / y;
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t, a, b)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
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.15d+69)) then
tmp = (1.0d0 + (b * ((-1.0d0) + (b * 0.5d0)))) / y
else
tmp = (x_m / a) / y
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.15e+69) {
tmp = (1.0 + (b * (-1.0 + (b * 0.5)))) / y;
} else {
tmp = (x_m / a) / y;
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t, a, b): tmp = 0 if b <= -1.15e+69: tmp = (1.0 + (b * (-1.0 + (b * 0.5)))) / y else: tmp = (x_m / a) / y return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t, a, b) tmp = 0.0 if (b <= -1.15e+69) tmp = Float64(Float64(1.0 + Float64(b * Float64(-1.0 + Float64(b * 0.5)))) / y); else tmp = Float64(Float64(x_m / a) / y); end return Float64(x_s * tmp) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t, a, b) tmp = 0.0; if (b <= -1.15e+69) tmp = (1.0 + (b * (-1.0 + (b * 0.5)))) / y; else tmp = (x_m / a) / y; end tmp_2 = x_s * tmp; end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_, a_, b_] := N[(x$95$s * If[LessEqual[b, -1.15e+69], N[(N[(1.0 + N[(b * N[(-1.0 + N[(b * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x$95$m / a), $MachinePrecision] / y), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;b \leq -1.15 \cdot 10^{+69}:\\
\;\;\;\;\frac{1 + b \cdot \left(-1 + b \cdot 0.5\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x\_m}{a}}{y}\\
\end{array}
\end{array}
if b < -1.15000000000000008e69Initial program 100.0%
add-exp-log56.4%
*-commutative56.4%
log-prod53.8%
add-log-exp53.8%
associate--l+53.8%
fma-define53.8%
sub-neg53.8%
metadata-eval53.8%
Applied egg-rr53.8%
Taylor expanded in b around inf 51.4%
neg-mul-151.4%
Simplified51.4%
Taylor expanded in b around 0 44.2%
Taylor expanded in y around 0 49.0%
if -1.15000000000000008e69 < b Initial program 98.0%
associate-/l*97.6%
associate--l+97.6%
exp-sum83.4%
associate-/l*82.4%
*-commutative82.4%
exp-to-pow82.4%
exp-diff74.1%
*-commutative74.1%
exp-to-pow75.1%
sub-neg75.1%
metadata-eval75.1%
Simplified75.1%
Taylor expanded in t around 0 69.1%
Taylor expanded in b around 0 57.4%
associate-/l*57.2%
Simplified57.2%
Taylor expanded in y around 0 36.6%
associate-/r*37.0%
Simplified37.0%
Final simplification38.8%
x\_m = (fabs.f64 x) x\_s = (copysign.f64 #s(literal 1 binary64) x) (FPCore (x_s x_m y z t a b) :precision binary64 (* x_s (if (<= b 1.02e-207) (* (/ x_m a) (/ (- 1.0 b) y)) (* x_m (/ (/ 1.0 a) y)))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 1.02e-207) {
tmp = (x_m / a) * ((1.0 - b) / y);
} else {
tmp = x_m * ((1.0 / a) / y);
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t, a, b)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
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-207) then
tmp = (x_m / a) * ((1.0d0 - b) / y)
else
tmp = x_m * ((1.0d0 / a) / y)
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 1.02e-207) {
tmp = (x_m / a) * ((1.0 - b) / y);
} else {
tmp = x_m * ((1.0 / a) / y);
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t, a, b): tmp = 0 if b <= 1.02e-207: tmp = (x_m / a) * ((1.0 - b) / y) else: tmp = x_m * ((1.0 / a) / y) return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t, a, b) tmp = 0.0 if (b <= 1.02e-207) tmp = Float64(Float64(x_m / a) * Float64(Float64(1.0 - b) / y)); else tmp = Float64(x_m * Float64(Float64(1.0 / a) / y)); end return Float64(x_s * tmp) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t, a, b) tmp = 0.0; if (b <= 1.02e-207) tmp = (x_m / a) * ((1.0 - b) / y); else tmp = x_m * ((1.0 / a) / y); end tmp_2 = x_s * tmp; end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_, a_, b_] := N[(x$95$s * If[LessEqual[b, 1.02e-207], N[(N[(x$95$m / a), $MachinePrecision] * N[(N[(1.0 - b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x$95$m * N[(N[(1.0 / a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;b \leq 1.02 \cdot 10^{-207}:\\
\;\;\;\;\frac{x\_m}{a} \cdot \frac{1 - b}{y}\\
\mathbf{else}:\\
\;\;\;\;x\_m \cdot \frac{\frac{1}{a}}{y}\\
\end{array}
\end{array}
if b < 1.02e-207Initial program 97.2%
add-exp-log65.0%
*-commutative65.0%
log-prod46.6%
add-log-exp46.6%
associate--l+46.6%
fma-define46.6%
sub-neg46.6%
metadata-eval46.6%
Applied egg-rr46.6%
Taylor expanded in y around 0 43.0%
Taylor expanded in b around 0 32.3%
associate-*r*32.3%
neg-mul-132.3%
distribute-rgt1-in35.7%
exp-sum35.8%
rem-exp-log69.1%
exp-to-pow70.4%
sub-neg70.4%
metadata-eval70.4%
Simplified70.4%
Taylor expanded in t around 0 43.4%
times-frac47.6%
Simplified47.6%
if 1.02e-207 < b Initial program 99.7%
associate-/l*99.7%
associate--l+99.7%
exp-sum85.1%
associate-/l*85.1%
*-commutative85.1%
exp-to-pow85.1%
exp-diff71.3%
*-commutative71.3%
exp-to-pow71.5%
sub-neg71.5%
metadata-eval71.5%
Simplified71.5%
Taylor expanded in t around 0 75.5%
Taylor expanded in b around 0 48.9%
associate-/l*48.9%
Simplified48.9%
Taylor expanded in y around 0 28.1%
associate-/r*28.1%
Simplified28.1%
Final simplification39.3%
x\_m = (fabs.f64 x) x\_s = (copysign.f64 #s(literal 1 binary64) x) (FPCore (x_s x_m y z t a b) :precision binary64 (* x_s (if (<= b -1.6e+90) (/ (- 1.0 b) y) (/ x_m (* y a)))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.6e+90) {
tmp = (1.0 - b) / y;
} else {
tmp = x_m / (y * a);
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t, a, b)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
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.6d+90)) then
tmp = (1.0d0 - b) / y
else
tmp = x_m / (y * a)
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.6e+90) {
tmp = (1.0 - b) / y;
} else {
tmp = x_m / (y * a);
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t, a, b): tmp = 0 if b <= -1.6e+90: tmp = (1.0 - b) / y else: tmp = x_m / (y * a) return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t, a, b) tmp = 0.0 if (b <= -1.6e+90) tmp = Float64(Float64(1.0 - b) / y); else tmp = Float64(x_m / Float64(y * a)); end return Float64(x_s * tmp) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t, a, b) tmp = 0.0; if (b <= -1.6e+90) tmp = (1.0 - b) / y; else tmp = x_m / (y * a); end tmp_2 = x_s * tmp; end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_, a_, b_] := N[(x$95$s * If[LessEqual[b, -1.6e+90], N[(N[(1.0 - b), $MachinePrecision] / y), $MachinePrecision], N[(x$95$m / N[(y * a), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;b \leq -1.6 \cdot 10^{+90}:\\
\;\;\;\;\frac{1 - b}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x\_m}{y \cdot a}\\
\end{array}
\end{array}
if b < -1.59999999999999999e90Initial program 100.0%
add-exp-log61.1%
*-commutative61.1%
log-prod58.3%
add-log-exp58.3%
associate--l+58.3%
fma-define58.3%
sub-neg58.3%
metadata-eval58.3%
Applied egg-rr58.3%
Taylor expanded in b around inf 55.6%
neg-mul-155.6%
Simplified55.6%
Taylor expanded in b around 0 47.8%
Taylor expanded in b around 0 26.9%
+-commutative26.9%
mul-1-neg26.9%
unsub-neg26.9%
div-sub26.9%
Simplified26.9%
if -1.59999999999999999e90 < b Initial program 98.0%
associate-/l*97.6%
associate--l+97.6%
exp-sum83.1%
associate-/l*82.2%
*-commutative82.2%
exp-to-pow82.2%
exp-diff74.0%
*-commutative74.0%
exp-to-pow75.0%
sub-neg75.0%
metadata-eval75.0%
Simplified75.0%
Taylor expanded in t around 0 69.1%
Taylor expanded in b around 0 57.1%
associate-/l*56.9%
Simplified56.9%
Taylor expanded in y around 0 36.2%
Final simplification34.9%
x\_m = (fabs.f64 x) x\_s = (copysign.f64 #s(literal 1 binary64) x) (FPCore (x_s x_m y z t a b) :precision binary64 (* x_s (if (<= b -4.5e+86) (/ (- 1.0 b) y) (/ (/ x_m a) y))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -4.5e+86) {
tmp = (1.0 - b) / y;
} else {
tmp = (x_m / a) / y;
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t, a, b)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
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 <= (-4.5d+86)) then
tmp = (1.0d0 - b) / y
else
tmp = (x_m / a) / y
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -4.5e+86) {
tmp = (1.0 - b) / y;
} else {
tmp = (x_m / a) / y;
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t, a, b): tmp = 0 if b <= -4.5e+86: tmp = (1.0 - b) / y else: tmp = (x_m / a) / y return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t, a, b) tmp = 0.0 if (b <= -4.5e+86) tmp = Float64(Float64(1.0 - b) / y); else tmp = Float64(Float64(x_m / a) / y); end return Float64(x_s * tmp) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t, a, b) tmp = 0.0; if (b <= -4.5e+86) tmp = (1.0 - b) / y; else tmp = (x_m / a) / y; end tmp_2 = x_s * tmp; end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_, a_, b_] := N[(x$95$s * If[LessEqual[b, -4.5e+86], N[(N[(1.0 - b), $MachinePrecision] / y), $MachinePrecision], N[(N[(x$95$m / a), $MachinePrecision] / y), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;b \leq -4.5 \cdot 10^{+86}:\\
\;\;\;\;\frac{1 - b}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x\_m}{a}}{y}\\
\end{array}
\end{array}
if b < -4.49999999999999993e86Initial program 100.0%
add-exp-log61.1%
*-commutative61.1%
log-prod58.3%
add-log-exp58.3%
associate--l+58.3%
fma-define58.3%
sub-neg58.3%
metadata-eval58.3%
Applied egg-rr58.3%
Taylor expanded in b around inf 55.6%
neg-mul-155.6%
Simplified55.6%
Taylor expanded in b around 0 47.8%
Taylor expanded in b around 0 26.9%
+-commutative26.9%
mul-1-neg26.9%
unsub-neg26.9%
div-sub26.9%
Simplified26.9%
if -4.49999999999999993e86 < b Initial program 98.0%
associate-/l*97.6%
associate--l+97.6%
exp-sum83.1%
associate-/l*82.2%
*-commutative82.2%
exp-to-pow82.2%
exp-diff74.0%
*-commutative74.0%
exp-to-pow75.0%
sub-neg75.0%
metadata-eval75.0%
Simplified75.0%
Taylor expanded in t around 0 69.1%
Taylor expanded in b around 0 57.1%
associate-/l*56.9%
Simplified56.9%
Taylor expanded in y around 0 36.2%
associate-/r*36.5%
Simplified36.5%
Final simplification35.2%
x\_m = (fabs.f64 x) x\_s = (copysign.f64 #s(literal 1 binary64) x) (FPCore (x_s x_m y z t a b) :precision binary64 (* x_s (/ x_m (* y a))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t, double a, double b) {
return x_s * (x_m / (y * a));
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t, a, b)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
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_s * (x_m / (y * a))
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t, double a, double b) {
return x_s * (x_m / (y * a));
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t, a, b): return x_s * (x_m / (y * a))
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t, a, b) return Float64(x_s * Float64(x_m / Float64(y * a))) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp = code(x_s, x_m, y, z, t, a, b) tmp = x_s * (x_m / (y * a)); end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_, a_, b_] := N[(x$95$s * N[(x$95$m / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \frac{x\_m}{y \cdot a}
\end{array}
Initial program 98.3%
associate-/l*98.0%
associate--l+98.0%
exp-sum83.2%
associate-/l*82.4%
*-commutative82.4%
exp-to-pow82.4%
exp-diff73.0%
*-commutative73.0%
exp-to-pow73.8%
sub-neg73.8%
metadata-eval73.8%
Simplified73.8%
Taylor expanded in t around 0 70.7%
Taylor expanded in b around 0 52.6%
associate-/l*52.7%
Simplified52.7%
Taylor expanded in y around 0 33.4%
Final simplification33.4%
x\_m = (fabs.f64 x) x\_s = (copysign.f64 #s(literal 1 binary64) x) (FPCore (x_s x_m y z t a b) :precision binary64 (* x_s (/ 1.0 y)))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t, double a, double b) {
return x_s * (1.0 / y);
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t, a, b)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
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_s * (1.0d0 / y)
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t, double a, double b) {
return x_s * (1.0 / y);
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t, a, b): return x_s * (1.0 / y)
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t, a, b) return Float64(x_s * Float64(1.0 / y)) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp = code(x_s, x_m, y, z, t, a, b) tmp = x_s * (1.0 / y); end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_, a_, b_] := N[(x$95$s * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \frac{1}{y}
\end{array}
Initial program 98.3%
add-exp-log74.1%
*-commutative74.1%
log-prod50.2%
add-log-exp50.2%
associate--l+50.2%
fma-define50.2%
sub-neg50.2%
metadata-eval50.2%
Applied egg-rr50.2%
Taylor expanded in b around inf 32.0%
neg-mul-132.0%
Simplified32.0%
Taylor expanded in b around 0 3.2%
Final simplification3.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 2024131
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:incompleteBetaWorker from math-functions-0.1.5.2, A"
:precision binary64
:alt
(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))