
(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 26 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x * exp((((y * log(z)) + ((t - 1.0d0) * log(a))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x * Math.exp((((y * Math.log(z)) + ((t - 1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + ((t - 1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\end{array}
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (log a) (+ t -1.0))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + (log(a) * (t + -1.0))) - b))) / y;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x * exp((((y * log(z)) + (log(a) * (t + (-1.0d0)))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x * Math.exp((((y * Math.log(z)) + (Math.log(a) * (t + -1.0))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + (math.log(a) * (t + -1.0))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(log(a) * Float64(t + -1.0))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + (log(a) * (t + -1.0))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[Log[a], $MachinePrecision] * N[(t + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \log a \cdot \left(t + -1\right)\right) - b}}{y}
\end{array}
Initial program 99.1%
Final simplification99.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (log a) (+ t -1.0))) (t_2 (fma x (/ (pow a t) y) 0.0)))
(if (<= t_1 -1e+29)
t_2
(if (<= t_1 -340.0)
(/ (* x (/ (/ (- a (* a b)) a) a)) y)
(if (<= t_1 -42.0)
(/ x (* y (exp b)))
(if (<= t_1 1000.0) (* x (/ (pow z y) y)) t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = log(a) * (t + -1.0);
double t_2 = fma(x, (pow(a, t) / y), 0.0);
double tmp;
if (t_1 <= -1e+29) {
tmp = t_2;
} else if (t_1 <= -340.0) {
tmp = (x * (((a - (a * b)) / a) / a)) / y;
} else if (t_1 <= -42.0) {
tmp = x / (y * exp(b));
} else if (t_1 <= 1000.0) {
tmp = x * (pow(z, y) / y);
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(log(a) * Float64(t + -1.0)) t_2 = fma(x, Float64((a ^ t) / y), 0.0) tmp = 0.0 if (t_1 <= -1e+29) tmp = t_2; elseif (t_1 <= -340.0) tmp = Float64(Float64(x * Float64(Float64(Float64(a - Float64(a * b)) / a) / a)) / y); elseif (t_1 <= -42.0) tmp = Float64(x / Float64(y * exp(b))); elseif (t_1 <= 1000.0) tmp = Float64(x * Float64((z ^ y) / y)); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[Log[a], $MachinePrecision] * N[(t + -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[Power[a, t], $MachinePrecision] / y), $MachinePrecision] + 0.0), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+29], t$95$2, If[LessEqual[t$95$1, -340.0], N[(N[(x * N[(N[(N[(a - N[(a * b), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t$95$1, -42.0], N[(x / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1000.0], N[(x * N[(N[Power[z, y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log a \cdot \left(t + -1\right)\\
t_2 := \mathsf{fma}\left(x, \frac{{a}^{t}}{y}, 0\right)\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+29}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq -340:\\
\;\;\;\;\frac{x \cdot \frac{\frac{a - a \cdot b}{a}}{a}}{y}\\
\mathbf{elif}\;t\_1 \leq -42:\\
\;\;\;\;\frac{x}{y \cdot e^{b}}\\
\mathbf{elif}\;t\_1 \leq 1000:\\
\;\;\;\;x \cdot \frac{{z}^{y}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -9.99999999999999914e28 or 1e3 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) Initial program 100.0%
Taylor expanded in b around 0
+-rgt-identityN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
Simplified66.2%
Taylor expanded in y around 0
/-lowering-/.f64N/A
exp-to-powN/A
pow-lowering-pow.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6484.1
Simplified84.1%
Taylor expanded in t around inf
Simplified84.1%
if -9.99999999999999914e28 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -340Initial program 94.4%
Taylor expanded in y around 0
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6490.3
Simplified90.3%
Taylor expanded in b around 0
associate-*r*N/A
neg-mul-1N/A
distribute-rgt1-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
neg-sub0N/A
--lowering--.f64N/A
exp-to-powN/A
pow-lowering-pow.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6459.6
Simplified59.6%
Taylor expanded in t around 0
/-lowering-/.f64N/A
--lowering--.f6461.6
Simplified61.6%
div-subN/A
frac-subN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lft-identityN/A
--lowering--.f64N/A
*-lowering-*.f6468.9
Applied egg-rr68.9%
if -340 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -42Initial program 99.5%
Taylor expanded in y around 0
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6473.9
Simplified73.9%
Taylor expanded in b around inf
neg-mul-1N/A
neg-sub0N/A
--lowering--.f6468.9
Simplified68.9%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
exp-diffN/A
1-expN/A
associate-/r/N/A
/-rgt-identityN/A
*-lowering-*.f64N/A
exp-lowering-exp.f6468.9
Applied egg-rr68.9%
if -42 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 1e3Initial program 99.3%
Taylor expanded in y around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f6484.7
Simplified84.7%
Taylor expanded in b around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f6465.9
Simplified65.9%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
pow-lowering-pow.f6465.9
Applied egg-rr65.9%
Final simplification75.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (log a) (+ t -1.0)))
(t_2 (/ (* x (exp (- (fma (log a) t 0.0) b))) y)))
(if (<= t_1 -2e+27)
t_2
(if (<= t_1 -340.0)
(/ (* x (pow a (+ t -1.0))) (* y (exp b)))
(if (<= t_1 2e+137) (/ (* x (exp (- (fma y (log z) 0.0) b))) y) t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = log(a) * (t + -1.0);
double t_2 = (x * exp((fma(log(a), t, 0.0) - b))) / y;
double tmp;
if (t_1 <= -2e+27) {
tmp = t_2;
} else if (t_1 <= -340.0) {
tmp = (x * pow(a, (t + -1.0))) / (y * exp(b));
} else if (t_1 <= 2e+137) {
tmp = (x * exp((fma(y, log(z), 0.0) - b))) / y;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(log(a) * Float64(t + -1.0)) t_2 = Float64(Float64(x * exp(Float64(fma(log(a), t, 0.0) - b))) / y) tmp = 0.0 if (t_1 <= -2e+27) tmp = t_2; elseif (t_1 <= -340.0) tmp = Float64(Float64(x * (a ^ Float64(t + -1.0))) / Float64(y * exp(b))); elseif (t_1 <= 2e+137) tmp = Float64(Float64(x * exp(Float64(fma(y, log(z), 0.0) - b))) / y); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[Log[a], $MachinePrecision] * N[(t + -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[Exp[N[(N[(N[Log[a], $MachinePrecision] * t + 0.0), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+27], t$95$2, If[LessEqual[t$95$1, -340.0], N[(N[(x * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+137], N[(N[(x * N[Exp[N[(N[(y * N[Log[z], $MachinePrecision] + 0.0), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log a \cdot \left(t + -1\right)\\
t_2 := \frac{x \cdot e^{\mathsf{fma}\left(\log a, t, 0\right) - b}}{y}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+27}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq -340:\\
\;\;\;\;\frac{x \cdot {a}^{\left(t + -1\right)}}{y \cdot e^{b}}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+137}:\\
\;\;\;\;\frac{x \cdot e^{\mathsf{fma}\left(y, \log z, 0\right) - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -2e27 or 2.0000000000000001e137 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) Initial program 100.0%
Taylor expanded in t around inf
+-rgt-identityN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-log97.0
Simplified97.0%
if -2e27 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -340Initial program 94.1%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
exp-prodN/A
pow-lowering-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f6481.6
Simplified81.6%
if -340 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 2.0000000000000001e137Initial program 99.5%
Taylor expanded in y around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f6486.2
Simplified86.2%
Final simplification89.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (log a) (+ t -1.0)))
(t_2 (/ (* x (exp (- (fma (log a) t 0.0) b))) y)))
(if (<= t_1 -1e+29)
t_2
(if (<= t_1 2e+137) (/ (* x (exp (- (fma y (log z) 0.0) b))) y) t_2))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = log(a) * (t + -1.0);
double t_2 = (x * exp((fma(log(a), t, 0.0) - b))) / y;
double tmp;
if (t_1 <= -1e+29) {
tmp = t_2;
} else if (t_1 <= 2e+137) {
tmp = (x * exp((fma(y, log(z), 0.0) - b))) / y;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(log(a) * Float64(t + -1.0)) t_2 = Float64(Float64(x * exp(Float64(fma(log(a), t, 0.0) - b))) / y) tmp = 0.0 if (t_1 <= -1e+29) tmp = t_2; elseif (t_1 <= 2e+137) tmp = Float64(Float64(x * exp(Float64(fma(y, log(z), 0.0) - b))) / y); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[Log[a], $MachinePrecision] * N[(t + -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[Exp[N[(N[(N[Log[a], $MachinePrecision] * t + 0.0), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+29], t$95$2, If[LessEqual[t$95$1, 2e+137], N[(N[(x * N[Exp[N[(N[(y * N[Log[z], $MachinePrecision] + 0.0), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log a \cdot \left(t + -1\right)\\
t_2 := \frac{x \cdot e^{\mathsf{fma}\left(\log a, t, 0\right) - b}}{y}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+29}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+137}:\\
\;\;\;\;\frac{x \cdot e^{\mathsf{fma}\left(y, \log z, 0\right) - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -9.99999999999999914e28 or 2.0000000000000001e137 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) Initial program 100.0%
Taylor expanded in t around inf
+-rgt-identityN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-log96.9
Simplified96.9%
if -9.99999999999999914e28 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 2.0000000000000001e137Initial program 98.5%
Taylor expanded in y around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f6481.7
Simplified81.7%
Final simplification87.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (log a) (+ t -1.0))))
(if (<= t_1 -5e+94)
(fma x (/ (pow a t) y) 0.0)
(if (<= t_1 1e+191)
(/ (* x (exp (- (fma y (log z) 0.0) b))) y)
(/ (* x (pow a (+ t -1.0))) y)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = log(a) * (t + -1.0);
double tmp;
if (t_1 <= -5e+94) {
tmp = fma(x, (pow(a, t) / y), 0.0);
} else if (t_1 <= 1e+191) {
tmp = (x * exp((fma(y, log(z), 0.0) - b))) / y;
} else {
tmp = (x * pow(a, (t + -1.0))) / y;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(log(a) * Float64(t + -1.0)) tmp = 0.0 if (t_1 <= -5e+94) tmp = fma(x, Float64((a ^ t) / y), 0.0); elseif (t_1 <= 1e+191) tmp = Float64(Float64(x * exp(Float64(fma(y, log(z), 0.0) - b))) / y); else tmp = Float64(Float64(x * (a ^ Float64(t + -1.0))) / y); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[Log[a], $MachinePrecision] * N[(t + -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+94], N[(x * N[(N[Power[a, t], $MachinePrecision] / y), $MachinePrecision] + 0.0), $MachinePrecision], If[LessEqual[t$95$1, 1e+191], N[(N[(x * N[Exp[N[(N[(y * N[Log[z], $MachinePrecision] + 0.0), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log a \cdot \left(t + -1\right)\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+94}:\\
\;\;\;\;\mathsf{fma}\left(x, \frac{{a}^{t}}{y}, 0\right)\\
\mathbf{elif}\;t\_1 \leq 10^{+191}:\\
\;\;\;\;\frac{x \cdot e^{\mathsf{fma}\left(y, \log z, 0\right) - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
\end{array}
\end{array}
if (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -5.0000000000000001e94Initial program 100.0%
Taylor expanded in b around 0
+-rgt-identityN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
Simplified71.5%
Taylor expanded in y around 0
/-lowering-/.f64N/A
exp-to-powN/A
pow-lowering-pow.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6490.6
Simplified90.6%
Taylor expanded in t around inf
Simplified90.6%
if -5.0000000000000001e94 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 1.00000000000000007e191Initial program 98.7%
Taylor expanded in y around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f6480.6
Simplified80.6%
if 1.00000000000000007e191 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) Initial program 100.0%
Taylor expanded in y around 0
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64100.0
Simplified100.0%
Taylor expanded in b around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
exp-to-powN/A
pow-lowering-pow.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6497.0
Simplified97.0%
Final simplification84.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (exp (- (fma y (log z) 0.0) b))) y)))
(if (<= y -3.7e+84)
t_1
(if (<= y 7.5e-10)
(/ (* x (exp (- (fma (log a) (+ t -1.0) 0.0) b))) y)
t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * exp((fma(y, log(z), 0.0) - b))) / y;
double tmp;
if (y <= -3.7e+84) {
tmp = t_1;
} else if (y <= 7.5e-10) {
tmp = (x * exp((fma(log(a), (t + -1.0), 0.0) - b))) / y;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * exp(Float64(fma(y, log(z), 0.0) - b))) / y) tmp = 0.0 if (y <= -3.7e+84) tmp = t_1; elseif (y <= 7.5e-10) tmp = Float64(Float64(x * exp(Float64(fma(log(a), Float64(t + -1.0), 0.0) - b))) / y); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x * N[Exp[N[(N[(y * N[Log[z], $MachinePrecision] + 0.0), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -3.7e+84], t$95$1, If[LessEqual[y, 7.5e-10], N[(N[(x * N[Exp[N[(N[(N[Log[a], $MachinePrecision] * N[(t + -1.0), $MachinePrecision] + 0.0), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot e^{\mathsf{fma}\left(y, \log z, 0\right) - b}}{y}\\
\mathbf{if}\;y \leq -3.7 \cdot 10^{+84}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{-10}:\\
\;\;\;\;\frac{x \cdot e^{\mathsf{fma}\left(\log a, t + -1, 0\right) - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -3.7e84 or 7.49999999999999995e-10 < y Initial program 100.0%
Taylor expanded in y around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f6484.9
Simplified84.9%
if -3.7e84 < y < 7.49999999999999995e-10Initial program 98.4%
Taylor expanded in y around 0
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6496.5
Simplified96.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -600.0)
(/ (* x (exp (- (fma y (log z) 0.0) b))) y)
(if (<= b 1000.0)
(fma x (* (pow a (+ t -1.0)) (/ (pow z y) y)) 0.0)
(/ (* x (exp (- (fma (log a) t 0.0) b))) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -600.0) {
tmp = (x * exp((fma(y, log(z), 0.0) - b))) / y;
} else if (b <= 1000.0) {
tmp = fma(x, (pow(a, (t + -1.0)) * (pow(z, y) / y)), 0.0);
} else {
tmp = (x * exp((fma(log(a), t, 0.0) - b))) / y;
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -600.0) tmp = Float64(Float64(x * exp(Float64(fma(y, log(z), 0.0) - b))) / y); elseif (b <= 1000.0) tmp = fma(x, Float64((a ^ Float64(t + -1.0)) * Float64((z ^ y) / y)), 0.0); else tmp = Float64(Float64(x * exp(Float64(fma(log(a), t, 0.0) - b))) / y); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -600.0], N[(N[(x * N[Exp[N[(N[(y * N[Log[z], $MachinePrecision] + 0.0), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 1000.0], N[(x * N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] * N[(N[Power[z, y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + 0.0), $MachinePrecision], N[(N[(x * N[Exp[N[(N[(N[Log[a], $MachinePrecision] * t + 0.0), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -600:\\
\;\;\;\;\frac{x \cdot e^{\mathsf{fma}\left(y, \log z, 0\right) - b}}{y}\\
\mathbf{elif}\;b \leq 1000:\\
\;\;\;\;\mathsf{fma}\left(x, {a}^{\left(t + -1\right)} \cdot \frac{{z}^{y}}{y}, 0\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\mathsf{fma}\left(\log a, t, 0\right) - b}}{y}\\
\end{array}
\end{array}
if b < -600Initial program 100.0%
Taylor expanded in y around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f6498.2
Simplified98.2%
if -600 < b < 1e3Initial program 98.2%
Taylor expanded in b around 0
+-rgt-identityN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
Simplified83.8%
if 1e3 < b Initial program 100.0%
Taylor expanded in t around inf
+-rgt-identityN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-log91.6
Simplified91.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (* y (exp b)))))
(if (<= b -1000.0)
t_1
(if (<= b 6.0) (/ (/ (* (pow a t) (* x (- 1.0 b))) a) y) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (y * exp(b));
double tmp;
if (b <= -1000.0) {
tmp = t_1;
} else if (b <= 6.0) {
tmp = ((pow(a, t) * (x * (1.0 - b))) / a) / y;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / (y * exp(b))
if (b <= (-1000.0d0)) then
tmp = t_1
else if (b <= 6.0d0) then
tmp = (((a ** t) * (x * (1.0d0 - b))) / a) / y
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (y * Math.exp(b));
double tmp;
if (b <= -1000.0) {
tmp = t_1;
} else if (b <= 6.0) {
tmp = ((Math.pow(a, t) * (x * (1.0 - b))) / a) / y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (y * math.exp(b)) tmp = 0 if b <= -1000.0: tmp = t_1 elif b <= 6.0: tmp = ((math.pow(a, t) * (x * (1.0 - b))) / a) / y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(y * exp(b))) tmp = 0.0 if (b <= -1000.0) tmp = t_1; elseif (b <= 6.0) tmp = Float64(Float64(Float64((a ^ t) * Float64(x * Float64(1.0 - b))) / a) / y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (y * exp(b)); tmp = 0.0; if (b <= -1000.0) tmp = t_1; elseif (b <= 6.0) tmp = (((a ^ t) * (x * (1.0 - b))) / a) / y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1000.0], t$95$1, If[LessEqual[b, 6.0], N[(N[(N[(N[Power[a, t], $MachinePrecision] * N[(x * N[(1.0 - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y \cdot e^{b}}\\
\mathbf{if}\;b \leq -1000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 6:\\
\;\;\;\;\frac{\frac{{a}^{t} \cdot \left(x \cdot \left(1 - b\right)\right)}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1e3 or 6 < b Initial program 100.0%
Taylor expanded in y around 0
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6491.3
Simplified91.3%
Taylor expanded in b around inf
neg-mul-1N/A
neg-sub0N/A
--lowering--.f6483.5
Simplified83.5%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
exp-diffN/A
1-expN/A
associate-/r/N/A
/-rgt-identityN/A
*-lowering-*.f64N/A
exp-lowering-exp.f6483.5
Applied egg-rr83.5%
if -1e3 < b < 6Initial program 98.2%
Taylor expanded in y around 0
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6473.2
Simplified73.2%
exp-diffN/A
+-rgt-identityN/A
pow-to-expN/A
unpow-prod-upN/A
inv-powN/A
associate-/l*N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
/-lowering-/.f64N/A
metadata-evalN/A
exp-lowering-exp.f6474.1
Applied egg-rr74.1%
Taylor expanded in b around 0
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
Simplified74.0%
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
unpow-prod-upN/A
inv-powN/A
*-commutativeN/A
un-div-invN/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
--lowering--.f6474.2
Applied egg-rr74.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (* y (exp b)))))
(if (<= b -105000.0)
t_1
(if (<= b 6.8) (/ (* x (* (pow a t) (/ (- 1.0 b) a))) y) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (y * exp(b));
double tmp;
if (b <= -105000.0) {
tmp = t_1;
} else if (b <= 6.8) {
tmp = (x * (pow(a, t) * ((1.0 - b) / a))) / y;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / (y * exp(b))
if (b <= (-105000.0d0)) then
tmp = t_1
else if (b <= 6.8d0) then
tmp = (x * ((a ** t) * ((1.0d0 - b) / a))) / y
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (y * Math.exp(b));
double tmp;
if (b <= -105000.0) {
tmp = t_1;
} else if (b <= 6.8) {
tmp = (x * (Math.pow(a, t) * ((1.0 - b) / a))) / y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (y * math.exp(b)) tmp = 0 if b <= -105000.0: tmp = t_1 elif b <= 6.8: tmp = (x * (math.pow(a, t) * ((1.0 - b) / a))) / y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(y * exp(b))) tmp = 0.0 if (b <= -105000.0) tmp = t_1; elseif (b <= 6.8) tmp = Float64(Float64(x * Float64((a ^ t) * Float64(Float64(1.0 - b) / a))) / y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (y * exp(b)); tmp = 0.0; if (b <= -105000.0) tmp = t_1; elseif (b <= 6.8) tmp = (x * ((a ^ t) * ((1.0 - b) / a))) / y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -105000.0], t$95$1, If[LessEqual[b, 6.8], N[(N[(x * N[(N[Power[a, t], $MachinePrecision] * N[(N[(1.0 - b), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y \cdot e^{b}}\\
\mathbf{if}\;b \leq -105000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 6.8:\\
\;\;\;\;\frac{x \cdot \left({a}^{t} \cdot \frac{1 - b}{a}\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -105000 or 6.79999999999999982 < b Initial program 100.0%
Taylor expanded in y around 0
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6491.3
Simplified91.3%
Taylor expanded in b around inf
neg-mul-1N/A
neg-sub0N/A
--lowering--.f6483.5
Simplified83.5%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
exp-diffN/A
1-expN/A
associate-/r/N/A
/-rgt-identityN/A
*-lowering-*.f64N/A
exp-lowering-exp.f6483.5
Applied egg-rr83.5%
if -105000 < b < 6.79999999999999982Initial program 98.2%
Taylor expanded in y around 0
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6473.2
Simplified73.2%
exp-diffN/A
+-rgt-identityN/A
pow-to-expN/A
unpow-prod-upN/A
inv-powN/A
associate-/l*N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
/-lowering-/.f64N/A
metadata-evalN/A
exp-lowering-exp.f6474.1
Applied egg-rr74.1%
Taylor expanded in b around 0
mul-1-negN/A
+-commutativeN/A
sub-negN/A
div-subN/A
/-lowering-/.f64N/A
--lowering--.f6474.1
Simplified74.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (* y (exp b)))))
(if (<= b -800.0)
t_1
(if (<= b 1.55) (/ (* x (* (pow a (+ t -1.0)) (- 1.0 b))) y) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (y * exp(b));
double tmp;
if (b <= -800.0) {
tmp = t_1;
} else if (b <= 1.55) {
tmp = (x * (pow(a, (t + -1.0)) * (1.0 - b))) / y;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / (y * exp(b))
if (b <= (-800.0d0)) then
tmp = t_1
else if (b <= 1.55d0) then
tmp = (x * ((a ** (t + (-1.0d0))) * (1.0d0 - b))) / y
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (y * Math.exp(b));
double tmp;
if (b <= -800.0) {
tmp = t_1;
} else if (b <= 1.55) {
tmp = (x * (Math.pow(a, (t + -1.0)) * (1.0 - b))) / y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (y * math.exp(b)) tmp = 0 if b <= -800.0: tmp = t_1 elif b <= 1.55: tmp = (x * (math.pow(a, (t + -1.0)) * (1.0 - b))) / y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(y * exp(b))) tmp = 0.0 if (b <= -800.0) tmp = t_1; elseif (b <= 1.55) tmp = Float64(Float64(x * Float64((a ^ Float64(t + -1.0)) * Float64(1.0 - b))) / y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (y * exp(b)); tmp = 0.0; if (b <= -800.0) tmp = t_1; elseif (b <= 1.55) tmp = (x * ((a ^ (t + -1.0)) * (1.0 - b))) / y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -800.0], t$95$1, If[LessEqual[b, 1.55], N[(N[(x * N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] * N[(1.0 - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y \cdot e^{b}}\\
\mathbf{if}\;b \leq -800:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.55:\\
\;\;\;\;\frac{x \cdot \left({a}^{\left(t + -1\right)} \cdot \left(1 - b\right)\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -800 or 1.55000000000000004 < b Initial program 100.0%
Taylor expanded in y around 0
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6491.3
Simplified91.3%
Taylor expanded in b around inf
neg-mul-1N/A
neg-sub0N/A
--lowering--.f6483.5
Simplified83.5%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
exp-diffN/A
1-expN/A
associate-/r/N/A
/-rgt-identityN/A
*-lowering-*.f64N/A
exp-lowering-exp.f6483.5
Applied egg-rr83.5%
if -800 < b < 1.55000000000000004Initial program 98.2%
Taylor expanded in y around 0
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6473.2
Simplified73.2%
exp-diffN/A
+-rgt-identityN/A
pow-to-expN/A
unpow-prod-upN/A
inv-powN/A
associate-/l*N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
/-lowering-/.f64N/A
metadata-evalN/A
exp-lowering-exp.f6474.1
Applied egg-rr74.1%
Taylor expanded in b around 0
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
Simplified74.0%
Final simplification78.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- 1.0 b) a))
(t_2 (/ x (* y (exp b))))
(t_3 (* (/ 1.0 a) (+ 1.0 b))))
(if (<= b -0.051)
t_2
(if (<= b 3.2e-296)
(/ t_1 (/ y x))
(if (<= b 6.5e-31) (/ (/ (* x (* t_1 t_3)) t_3) y) t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (1.0 - b) / a;
double t_2 = x / (y * exp(b));
double t_3 = (1.0 / a) * (1.0 + b);
double tmp;
if (b <= -0.051) {
tmp = t_2;
} else if (b <= 3.2e-296) {
tmp = t_1 / (y / x);
} else if (b <= 6.5e-31) {
tmp = ((x * (t_1 * t_3)) / t_3) / 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) :: t_3
real(8) :: tmp
t_1 = (1.0d0 - b) / a
t_2 = x / (y * exp(b))
t_3 = (1.0d0 / a) * (1.0d0 + b)
if (b <= (-0.051d0)) then
tmp = t_2
else if (b <= 3.2d-296) then
tmp = t_1 / (y / x)
else if (b <= 6.5d-31) then
tmp = ((x * (t_1 * t_3)) / t_3) / 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 = (1.0 - b) / a;
double t_2 = x / (y * Math.exp(b));
double t_3 = (1.0 / a) * (1.0 + b);
double tmp;
if (b <= -0.051) {
tmp = t_2;
} else if (b <= 3.2e-296) {
tmp = t_1 / (y / x);
} else if (b <= 6.5e-31) {
tmp = ((x * (t_1 * t_3)) / t_3) / y;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (1.0 - b) / a t_2 = x / (y * math.exp(b)) t_3 = (1.0 / a) * (1.0 + b) tmp = 0 if b <= -0.051: tmp = t_2 elif b <= 3.2e-296: tmp = t_1 / (y / x) elif b <= 6.5e-31: tmp = ((x * (t_1 * t_3)) / t_3) / y else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(1.0 - b) / a) t_2 = Float64(x / Float64(y * exp(b))) t_3 = Float64(Float64(1.0 / a) * Float64(1.0 + b)) tmp = 0.0 if (b <= -0.051) tmp = t_2; elseif (b <= 3.2e-296) tmp = Float64(t_1 / Float64(y / x)); elseif (b <= 6.5e-31) tmp = Float64(Float64(Float64(x * Float64(t_1 * t_3)) / t_3) / y); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (1.0 - b) / a; t_2 = x / (y * exp(b)); t_3 = (1.0 / a) * (1.0 + b); tmp = 0.0; if (b <= -0.051) tmp = t_2; elseif (b <= 3.2e-296) tmp = t_1 / (y / x); elseif (b <= 6.5e-31) tmp = ((x * (t_1 * t_3)) / t_3) / y; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 - b), $MachinePrecision] / a), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(1.0 / a), $MachinePrecision] * N[(1.0 + b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -0.051], t$95$2, If[LessEqual[b, 3.2e-296], N[(t$95$1 / N[(y / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6.5e-31], N[(N[(N[(x * N[(t$95$1 * t$95$3), $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision] / y), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{1 - b}{a}\\
t_2 := \frac{x}{y \cdot e^{b}}\\
t_3 := \frac{1}{a} \cdot \left(1 + b\right)\\
\mathbf{if}\;b \leq -0.051:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq 3.2 \cdot 10^{-296}:\\
\;\;\;\;\frac{t\_1}{\frac{y}{x}}\\
\mathbf{elif}\;b \leq 6.5 \cdot 10^{-31}:\\
\;\;\;\;\frac{\frac{x \cdot \left(t\_1 \cdot t\_3\right)}{t\_3}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -0.0509999999999999967 or 6.49999999999999967e-31 < b Initial program 100.0%
Taylor expanded in y around 0
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6490.3
Simplified90.3%
Taylor expanded in b around inf
neg-mul-1N/A
neg-sub0N/A
--lowering--.f6480.5
Simplified80.5%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
exp-diffN/A
1-expN/A
associate-/r/N/A
/-rgt-identityN/A
*-lowering-*.f64N/A
exp-lowering-exp.f6480.5
Applied egg-rr80.5%
if -0.0509999999999999967 < b < 3.20000000000000013e-296Initial program 97.7%
Taylor expanded in y around 0
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6474.7
Simplified74.7%
Taylor expanded in b around 0
associate-*r*N/A
neg-mul-1N/A
distribute-rgt1-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
neg-sub0N/A
--lowering--.f64N/A
exp-to-powN/A
pow-lowering-pow.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6475.2
Simplified75.2%
Taylor expanded in t around 0
/-lowering-/.f64N/A
--lowering--.f6440.7
Simplified40.7%
*-commutativeN/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f6445.7
Applied egg-rr45.7%
if 3.20000000000000013e-296 < b < 6.49999999999999967e-31Initial program 98.8%
Taylor expanded in y around 0
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6471.6
Simplified71.6%
Taylor expanded in b around 0
associate-*r*N/A
neg-mul-1N/A
distribute-rgt1-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
neg-sub0N/A
--lowering--.f64N/A
exp-to-powN/A
pow-lowering-pow.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6472.8
Simplified72.8%
Taylor expanded in t around 0
/-lowering-/.f64N/A
--lowering--.f6443.7
Simplified43.7%
*-commutativeN/A
div-subN/A
flip--N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
difference-of-squaresN/A
div-subN/A
*-lowering-*.f64N/A
div-invN/A
div-invN/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
Applied egg-rr48.5%
Final simplification64.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (* y (exp b)))))
(if (<= b -900.0)
t_1
(if (<= b 2.75e+14) (/ (* x (pow a (+ t -1.0))) y) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (y * exp(b));
double tmp;
if (b <= -900.0) {
tmp = t_1;
} else if (b <= 2.75e+14) {
tmp = (x * pow(a, (t + -1.0))) / y;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / (y * exp(b))
if (b <= (-900.0d0)) then
tmp = t_1
else if (b <= 2.75d+14) then
tmp = (x * (a ** (t + (-1.0d0)))) / y
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (y * Math.exp(b));
double tmp;
if (b <= -900.0) {
tmp = t_1;
} else if (b <= 2.75e+14) {
tmp = (x * Math.pow(a, (t + -1.0))) / y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (y * math.exp(b)) tmp = 0 if b <= -900.0: tmp = t_1 elif b <= 2.75e+14: tmp = (x * math.pow(a, (t + -1.0))) / y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(y * exp(b))) tmp = 0.0 if (b <= -900.0) tmp = t_1; elseif (b <= 2.75e+14) tmp = Float64(Float64(x * (a ^ Float64(t + -1.0))) / y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (y * exp(b)); tmp = 0.0; if (b <= -900.0) tmp = t_1; elseif (b <= 2.75e+14) tmp = (x * (a ^ (t + -1.0))) / y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -900.0], t$95$1, If[LessEqual[b, 2.75e+14], N[(N[(x * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y \cdot e^{b}}\\
\mathbf{if}\;b \leq -900:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 2.75 \cdot 10^{+14}:\\
\;\;\;\;\frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -900 or 2.75e14 < b Initial program 100.0%
Taylor expanded in y around 0
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6491.9
Simplified91.9%
Taylor expanded in b around inf
neg-mul-1N/A
neg-sub0N/A
--lowering--.f6484.7
Simplified84.7%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
exp-diffN/A
1-expN/A
associate-/r/N/A
/-rgt-identityN/A
*-lowering-*.f64N/A
exp-lowering-exp.f6484.7
Applied egg-rr84.7%
if -900 < b < 2.75e14Initial program 98.2%
Taylor expanded in y around 0
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6473.1
Simplified73.1%
Taylor expanded in b around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
exp-to-powN/A
pow-lowering-pow.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6472.9
Simplified72.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (* y (exp b)))))
(if (<= b -3500000.0)
t_1
(if (<= b 55000000000000.0) (* (pow a (+ t -1.0)) (/ x y)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (y * exp(b));
double tmp;
if (b <= -3500000.0) {
tmp = t_1;
} else if (b <= 55000000000000.0) {
tmp = pow(a, (t + -1.0)) * (x / y);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / (y * exp(b))
if (b <= (-3500000.0d0)) then
tmp = t_1
else if (b <= 55000000000000.0d0) then
tmp = (a ** (t + (-1.0d0))) * (x / y)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (y * Math.exp(b));
double tmp;
if (b <= -3500000.0) {
tmp = t_1;
} else if (b <= 55000000000000.0) {
tmp = Math.pow(a, (t + -1.0)) * (x / y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (y * math.exp(b)) tmp = 0 if b <= -3500000.0: tmp = t_1 elif b <= 55000000000000.0: tmp = math.pow(a, (t + -1.0)) * (x / y) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(y * exp(b))) tmp = 0.0 if (b <= -3500000.0) tmp = t_1; elseif (b <= 55000000000000.0) tmp = Float64((a ^ Float64(t + -1.0)) * Float64(x / y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (y * exp(b)); tmp = 0.0; if (b <= -3500000.0) tmp = t_1; elseif (b <= 55000000000000.0) tmp = (a ^ (t + -1.0)) * (x / y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3500000.0], t$95$1, If[LessEqual[b, 55000000000000.0], N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y \cdot e^{b}}\\
\mathbf{if}\;b \leq -3500000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 55000000000000:\\
\;\;\;\;{a}^{\left(t + -1\right)} \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -3.5e6 or 5.5e13 < b Initial program 100.0%
Taylor expanded in y around 0
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6491.9
Simplified91.9%
Taylor expanded in b around inf
neg-mul-1N/A
neg-sub0N/A
--lowering--.f6484.7
Simplified84.7%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
exp-diffN/A
1-expN/A
associate-/r/N/A
/-rgt-identityN/A
*-lowering-*.f64N/A
exp-lowering-exp.f6484.7
Applied egg-rr84.7%
if -3.5e6 < b < 5.5e13Initial program 98.2%
Taylor expanded in b around 0
+-rgt-identityN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
Simplified83.3%
Taylor expanded in y around 0
/-lowering-/.f64N/A
exp-to-powN/A
pow-lowering-pow.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6471.8
Simplified71.8%
+-rgt-identityN/A
associate-*r/N/A
associate-*l/N/A
*-commutativeN/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f6464.8
Applied egg-rr64.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma b (fma b b 0.0) 0.0))
(t_2 (- 1.0 t_1))
(t_3 (* (fma b b b) (fma b b b))))
(if (<= b -3.05e+46)
(/ (* x (fma b (fma b (fma b -0.16666666666666666 0.5) -1.0) 1.0)) y)
(if (<= b 2.55e-272)
(/ (* x (/ (- a (* a b)) (* a a))) y)
(if (<= b 1.15e+77)
(/
(*
x
(/
(*
(/ t_2 (+ 1.0 (* (fma b b b) t_3)))
(+ 1.0 (* (fma b b b) (+ -1.0 (fma b b b)))))
a))
y)
(if (<= b 5.6e+102)
(/ (* x (/ (* (/ t_2 (- 1.0 t_3)) (- 1.0 (fma b b b))) a)) y)
(if (<= b 9.2e+151)
(/
(*
x
(/
(*
(/ (- 1.0 (fma b b 0.0)) (+ 1.0 t_1))
(+ 1.0 (* b (+ b -1.0))))
a))
y)
(fma b (* (/ x y) (fma 0.5 b -1.0)) (/ x y)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(b, fma(b, b, 0.0), 0.0);
double t_2 = 1.0 - t_1;
double t_3 = fma(b, b, b) * fma(b, b, b);
double tmp;
if (b <= -3.05e+46) {
tmp = (x * fma(b, fma(b, fma(b, -0.16666666666666666, 0.5), -1.0), 1.0)) / y;
} else if (b <= 2.55e-272) {
tmp = (x * ((a - (a * b)) / (a * a))) / y;
} else if (b <= 1.15e+77) {
tmp = (x * (((t_2 / (1.0 + (fma(b, b, b) * t_3))) * (1.0 + (fma(b, b, b) * (-1.0 + fma(b, b, b))))) / a)) / y;
} else if (b <= 5.6e+102) {
tmp = (x * (((t_2 / (1.0 - t_3)) * (1.0 - fma(b, b, b))) / a)) / y;
} else if (b <= 9.2e+151) {
tmp = (x * ((((1.0 - fma(b, b, 0.0)) / (1.0 + t_1)) * (1.0 + (b * (b + -1.0)))) / a)) / y;
} else {
tmp = fma(b, ((x / y) * fma(0.5, b, -1.0)), (x / y));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(b, fma(b, b, 0.0), 0.0) t_2 = Float64(1.0 - t_1) t_3 = Float64(fma(b, b, b) * fma(b, b, b)) tmp = 0.0 if (b <= -3.05e+46) tmp = Float64(Float64(x * fma(b, fma(b, fma(b, -0.16666666666666666, 0.5), -1.0), 1.0)) / y); elseif (b <= 2.55e-272) tmp = Float64(Float64(x * Float64(Float64(a - Float64(a * b)) / Float64(a * a))) / y); elseif (b <= 1.15e+77) tmp = Float64(Float64(x * Float64(Float64(Float64(t_2 / Float64(1.0 + Float64(fma(b, b, b) * t_3))) * Float64(1.0 + Float64(fma(b, b, b) * Float64(-1.0 + fma(b, b, b))))) / a)) / y); elseif (b <= 5.6e+102) tmp = Float64(Float64(x * Float64(Float64(Float64(t_2 / Float64(1.0 - t_3)) * Float64(1.0 - fma(b, b, b))) / a)) / y); elseif (b <= 9.2e+151) tmp = Float64(Float64(x * Float64(Float64(Float64(Float64(1.0 - fma(b, b, 0.0)) / Float64(1.0 + t_1)) * Float64(1.0 + Float64(b * Float64(b + -1.0)))) / a)) / y); else tmp = fma(b, Float64(Float64(x / y) * fma(0.5, b, -1.0)), Float64(x / y)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(b * b + 0.0), $MachinePrecision] + 0.0), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 - t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(b * b + b), $MachinePrecision] * N[(b * b + b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.05e+46], N[(N[(x * N[(b * N[(b * N[(b * -0.16666666666666666 + 0.5), $MachinePrecision] + -1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 2.55e-272], N[(N[(x * N[(N[(a - N[(a * b), $MachinePrecision]), $MachinePrecision] / N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 1.15e+77], N[(N[(x * N[(N[(N[(t$95$2 / N[(1.0 + N[(N[(b * b + b), $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(b * b + b), $MachinePrecision] * N[(-1.0 + N[(b * b + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 5.6e+102], N[(N[(x * N[(N[(N[(t$95$2 / N[(1.0 - t$95$3), $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(b * b + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 9.2e+151], N[(N[(x * N[(N[(N[(N[(1.0 - N[(b * b + 0.0), $MachinePrecision]), $MachinePrecision] / N[(1.0 + t$95$1), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(b * N[(b + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(b * N[(N[(x / y), $MachinePrecision] * N[(0.5 * b + -1.0), $MachinePrecision]), $MachinePrecision] + N[(x / y), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(b, \mathsf{fma}\left(b, b, 0\right), 0\right)\\
t_2 := 1 - t\_1\\
t_3 := \mathsf{fma}\left(b, b, b\right) \cdot \mathsf{fma}\left(b, b, b\right)\\
\mathbf{if}\;b \leq -3.05 \cdot 10^{+46}:\\
\;\;\;\;\frac{x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, \mathsf{fma}\left(b, -0.16666666666666666, 0.5\right), -1\right), 1\right)}{y}\\
\mathbf{elif}\;b \leq 2.55 \cdot 10^{-272}:\\
\;\;\;\;\frac{x \cdot \frac{a - a \cdot b}{a \cdot a}}{y}\\
\mathbf{elif}\;b \leq 1.15 \cdot 10^{+77}:\\
\;\;\;\;\frac{x \cdot \frac{\frac{t\_2}{1 + \mathsf{fma}\left(b, b, b\right) \cdot t\_3} \cdot \left(1 + \mathsf{fma}\left(b, b, b\right) \cdot \left(-1 + \mathsf{fma}\left(b, b, b\right)\right)\right)}{a}}{y}\\
\mathbf{elif}\;b \leq 5.6 \cdot 10^{+102}:\\
\;\;\;\;\frac{x \cdot \frac{\frac{t\_2}{1 - t\_3} \cdot \left(1 - \mathsf{fma}\left(b, b, b\right)\right)}{a}}{y}\\
\mathbf{elif}\;b \leq 9.2 \cdot 10^{+151}:\\
\;\;\;\;\frac{x \cdot \frac{\frac{1 - \mathsf{fma}\left(b, b, 0\right)}{1 + t\_1} \cdot \left(1 + b \cdot \left(b + -1\right)\right)}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(b, \frac{x}{y} \cdot \mathsf{fma}\left(0.5, b, -1\right), \frac{x}{y}\right)\\
\end{array}
\end{array}
if b < -3.04999999999999999e46Initial program 100.0%
Taylor expanded in y around 0
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6491.3
Simplified91.3%
Taylor expanded in b around inf
neg-mul-1N/A
neg-sub0N/A
--lowering--.f6489.1
Simplified89.1%
Taylor expanded in b around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6484.8
Simplified84.8%
if -3.04999999999999999e46 < b < 2.5499999999999999e-272Initial program 98.1%
Taylor expanded in y around 0
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6477.0
Simplified77.0%
Taylor expanded in b around 0
associate-*r*N/A
neg-mul-1N/A
distribute-rgt1-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
neg-sub0N/A
--lowering--.f64N/A
exp-to-powN/A
pow-lowering-pow.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6473.2
Simplified73.2%
Taylor expanded in t around 0
/-lowering-/.f64N/A
--lowering--.f6437.2
Simplified37.2%
div-subN/A
frac-subN/A
/-lowering-/.f64N/A
*-lft-identityN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6442.4
Applied egg-rr42.4%
if 2.5499999999999999e-272 < b < 1.14999999999999997e77Initial program 99.1%
Taylor expanded in y around 0
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6475.2
Simplified75.2%
Taylor expanded in b around 0
associate-*r*N/A
neg-mul-1N/A
distribute-rgt1-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
neg-sub0N/A
--lowering--.f64N/A
exp-to-powN/A
pow-lowering-pow.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6457.5
Simplified57.5%
Taylor expanded in t around 0
/-lowering-/.f64N/A
--lowering--.f6435.0
Simplified35.0%
flip3--N/A
metadata-evalN/A
flip3-+N/A
associate-/r/N/A
*-lowering-*.f64N/A
Applied egg-rr42.2%
if 1.14999999999999997e77 < b < 5.60000000000000037e102Initial program 100.0%
Taylor expanded in y around 0
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6480.3
Simplified80.3%
Taylor expanded in b around 0
associate-*r*N/A
neg-mul-1N/A
distribute-rgt1-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
neg-sub0N/A
--lowering--.f64N/A
exp-to-powN/A
pow-lowering-pow.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6420.9
Simplified20.9%
Taylor expanded in t around 0
/-lowering-/.f64N/A
--lowering--.f641.8
Simplified1.8%
flip3--N/A
metadata-evalN/A
flip-+N/A
associate-/r/N/A
*-lowering-*.f64N/A
Applied egg-rr50.8%
if 5.60000000000000037e102 < b < 9.2000000000000003e151Initial program 100.0%
Taylor expanded in y around 0
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6487.7
Simplified87.7%
Taylor expanded in b around 0
associate-*r*N/A
neg-mul-1N/A
distribute-rgt1-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
neg-sub0N/A
--lowering--.f64N/A
exp-to-powN/A
pow-lowering-pow.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6421.9
Simplified21.9%
Taylor expanded in t around 0
/-lowering-/.f64N/A
--lowering--.f649.6
Simplified9.6%
flip--N/A
flip3-+N/A
associate-/r/N/A
*-lowering-*.f64N/A
Applied egg-rr100.0%
if 9.2000000000000003e151 < b Initial program 100.0%
Taylor expanded in y around 0
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6497.0
Simplified97.0%
Taylor expanded in b around inf
neg-mul-1N/A
neg-sub0N/A
--lowering--.f6482.1
Simplified82.1%
Taylor expanded in b around 0
+-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-outN/A
metadata-evalN/A
sub-negN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sub-negN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6428.8
Simplified28.8%
Final simplification50.2%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (/ x (* y (exp b))))) (if (<= b -900.0) t_1 (if (<= b 3.2e+17) (* x (/ (pow z y) y)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (y * exp(b));
double tmp;
if (b <= -900.0) {
tmp = t_1;
} else if (b <= 3.2e+17) {
tmp = x * (pow(z, y) / y);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / (y * exp(b))
if (b <= (-900.0d0)) then
tmp = t_1
else if (b <= 3.2d+17) then
tmp = x * ((z ** y) / y)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (y * Math.exp(b));
double tmp;
if (b <= -900.0) {
tmp = t_1;
} else if (b <= 3.2e+17) {
tmp = x * (Math.pow(z, y) / y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (y * math.exp(b)) tmp = 0 if b <= -900.0: tmp = t_1 elif b <= 3.2e+17: tmp = x * (math.pow(z, y) / y) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(y * exp(b))) tmp = 0.0 if (b <= -900.0) tmp = t_1; elseif (b <= 3.2e+17) tmp = Float64(x * Float64((z ^ y) / y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (y * exp(b)); tmp = 0.0; if (b <= -900.0) tmp = t_1; elseif (b <= 3.2e+17) tmp = x * ((z ^ y) / y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -900.0], t$95$1, If[LessEqual[b, 3.2e+17], N[(x * N[(N[Power[z, y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y \cdot e^{b}}\\
\mathbf{if}\;b \leq -900:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 3.2 \cdot 10^{+17}:\\
\;\;\;\;x \cdot \frac{{z}^{y}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -900 or 3.2e17 < b Initial program 100.0%
Taylor expanded in y around 0
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6491.9
Simplified91.9%
Taylor expanded in b around inf
neg-mul-1N/A
neg-sub0N/A
--lowering--.f6484.7
Simplified84.7%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
exp-diffN/A
1-expN/A
associate-/r/N/A
/-rgt-identityN/A
*-lowering-*.f64N/A
exp-lowering-exp.f6484.7
Applied egg-rr84.7%
if -900 < b < 3.2e17Initial program 98.2%
Taylor expanded in y around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f6454.2
Simplified54.2%
Taylor expanded in b around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f6453.5
Simplified53.5%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
pow-lowering-pow.f6453.5
Applied egg-rr53.5%
Final simplification68.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma b (fma b b 0.0) 0.0)))
(if (<= b -1.5e+62)
(/ (* x (fma b (fma b (fma b -0.16666666666666666 0.5) -1.0) 1.0)) y)
(if (<= b 6.5e-276)
(/ (* x (/ (- a (* a b)) (* a a))) y)
(if (<= b 5.6e+102)
(/
(*
x
(/
(*
(/ (- 1.0 t_1) (- 1.0 (* (fma b b b) (fma b b b))))
(- 1.0 (fma b b b)))
a))
y)
(if (<= b 9.2e+151)
(/
(*
x
(/
(*
(/ (- 1.0 (fma b b 0.0)) (+ 1.0 t_1))
(+ 1.0 (* b (+ b -1.0))))
a))
y)
(fma b (* (/ x y) (fma 0.5 b -1.0)) (/ x y))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(b, fma(b, b, 0.0), 0.0);
double tmp;
if (b <= -1.5e+62) {
tmp = (x * fma(b, fma(b, fma(b, -0.16666666666666666, 0.5), -1.0), 1.0)) / y;
} else if (b <= 6.5e-276) {
tmp = (x * ((a - (a * b)) / (a * a))) / y;
} else if (b <= 5.6e+102) {
tmp = (x * ((((1.0 - t_1) / (1.0 - (fma(b, b, b) * fma(b, b, b)))) * (1.0 - fma(b, b, b))) / a)) / y;
} else if (b <= 9.2e+151) {
tmp = (x * ((((1.0 - fma(b, b, 0.0)) / (1.0 + t_1)) * (1.0 + (b * (b + -1.0)))) / a)) / y;
} else {
tmp = fma(b, ((x / y) * fma(0.5, b, -1.0)), (x / y));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(b, fma(b, b, 0.0), 0.0) tmp = 0.0 if (b <= -1.5e+62) tmp = Float64(Float64(x * fma(b, fma(b, fma(b, -0.16666666666666666, 0.5), -1.0), 1.0)) / y); elseif (b <= 6.5e-276) tmp = Float64(Float64(x * Float64(Float64(a - Float64(a * b)) / Float64(a * a))) / y); elseif (b <= 5.6e+102) tmp = Float64(Float64(x * Float64(Float64(Float64(Float64(1.0 - t_1) / Float64(1.0 - Float64(fma(b, b, b) * fma(b, b, b)))) * Float64(1.0 - fma(b, b, b))) / a)) / y); elseif (b <= 9.2e+151) tmp = Float64(Float64(x * Float64(Float64(Float64(Float64(1.0 - fma(b, b, 0.0)) / Float64(1.0 + t_1)) * Float64(1.0 + Float64(b * Float64(b + -1.0)))) / a)) / y); else tmp = fma(b, Float64(Float64(x / y) * fma(0.5, b, -1.0)), Float64(x / y)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(b * b + 0.0), $MachinePrecision] + 0.0), $MachinePrecision]}, If[LessEqual[b, -1.5e+62], N[(N[(x * N[(b * N[(b * N[(b * -0.16666666666666666 + 0.5), $MachinePrecision] + -1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 6.5e-276], N[(N[(x * N[(N[(a - N[(a * b), $MachinePrecision]), $MachinePrecision] / N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 5.6e+102], N[(N[(x * N[(N[(N[(N[(1.0 - t$95$1), $MachinePrecision] / N[(1.0 - N[(N[(b * b + b), $MachinePrecision] * N[(b * b + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(b * b + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 9.2e+151], N[(N[(x * N[(N[(N[(N[(1.0 - N[(b * b + 0.0), $MachinePrecision]), $MachinePrecision] / N[(1.0 + t$95$1), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(b * N[(b + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(b * N[(N[(x / y), $MachinePrecision] * N[(0.5 * b + -1.0), $MachinePrecision]), $MachinePrecision] + N[(x / y), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(b, \mathsf{fma}\left(b, b, 0\right), 0\right)\\
\mathbf{if}\;b \leq -1.5 \cdot 10^{+62}:\\
\;\;\;\;\frac{x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, \mathsf{fma}\left(b, -0.16666666666666666, 0.5\right), -1\right), 1\right)}{y}\\
\mathbf{elif}\;b \leq 6.5 \cdot 10^{-276}:\\
\;\;\;\;\frac{x \cdot \frac{a - a \cdot b}{a \cdot a}}{y}\\
\mathbf{elif}\;b \leq 5.6 \cdot 10^{+102}:\\
\;\;\;\;\frac{x \cdot \frac{\frac{1 - t\_1}{1 - \mathsf{fma}\left(b, b, b\right) \cdot \mathsf{fma}\left(b, b, b\right)} \cdot \left(1 - \mathsf{fma}\left(b, b, b\right)\right)}{a}}{y}\\
\mathbf{elif}\;b \leq 9.2 \cdot 10^{+151}:\\
\;\;\;\;\frac{x \cdot \frac{\frac{1 - \mathsf{fma}\left(b, b, 0\right)}{1 + t\_1} \cdot \left(1 + b \cdot \left(b + -1\right)\right)}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(b, \frac{x}{y} \cdot \mathsf{fma}\left(0.5, b, -1\right), \frac{x}{y}\right)\\
\end{array}
\end{array}
if b < -1.5e62Initial program 100.0%
Taylor expanded in y around 0
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6491.3
Simplified91.3%
Taylor expanded in b around inf
neg-mul-1N/A
neg-sub0N/A
--lowering--.f6489.1
Simplified89.1%
Taylor expanded in b around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6484.8
Simplified84.8%
if -1.5e62 < b < 6.49999999999999981e-276Initial program 98.1%
Taylor expanded in y around 0
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6477.0
Simplified77.0%
Taylor expanded in b around 0
associate-*r*N/A
neg-mul-1N/A
distribute-rgt1-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
neg-sub0N/A
--lowering--.f64N/A
exp-to-powN/A
pow-lowering-pow.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6473.2
Simplified73.2%
Taylor expanded in t around 0
/-lowering-/.f64N/A
--lowering--.f6437.2
Simplified37.2%
div-subN/A
frac-subN/A
/-lowering-/.f64N/A
*-lft-identityN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6442.4
Applied egg-rr42.4%
if 6.49999999999999981e-276 < b < 5.60000000000000037e102Initial program 99.2%
Taylor expanded in y around 0
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6475.8
Simplified75.8%
Taylor expanded in b around 0
associate-*r*N/A
neg-mul-1N/A
distribute-rgt1-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
neg-sub0N/A
--lowering--.f64N/A
exp-to-powN/A
pow-lowering-pow.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6452.9
Simplified52.9%
Taylor expanded in t around 0
/-lowering-/.f64N/A
--lowering--.f6430.8
Simplified30.8%
flip3--N/A
metadata-evalN/A
flip-+N/A
associate-/r/N/A
*-lowering-*.f64N/A
Applied egg-rr37.0%
if 5.60000000000000037e102 < b < 9.2000000000000003e151Initial program 100.0%
Taylor expanded in y around 0
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6487.7
Simplified87.7%
Taylor expanded in b around 0
associate-*r*N/A
neg-mul-1N/A
distribute-rgt1-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
neg-sub0N/A
--lowering--.f64N/A
exp-to-powN/A
pow-lowering-pow.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6421.9
Simplified21.9%
Taylor expanded in t around 0
/-lowering-/.f64N/A
--lowering--.f649.6
Simplified9.6%
flip--N/A
flip3-+N/A
associate-/r/N/A
*-lowering-*.f64N/A
Applied egg-rr100.0%
if 9.2000000000000003e151 < b Initial program 100.0%
Taylor expanded in y around 0
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6497.0
Simplified97.0%
Taylor expanded in b around inf
neg-mul-1N/A
neg-sub0N/A
--lowering--.f6482.1
Simplified82.1%
Taylor expanded in b around 0
+-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-outN/A
metadata-evalN/A
sub-negN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sub-negN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6428.8
Simplified28.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (/ 1.0 a) (+ 1.0 b))))
(if (<= b -8.8e+54)
(/ (* x (fma b (fma b (fma b -0.16666666666666666 0.5) -1.0) 1.0)) y)
(if (<= b 1.35e+102)
(/ (/ (* x (* (/ (- 1.0 b) a) t_1)) t_1) y)
(if (<= b 9.2e+151)
(/
(*
x
(/
(*
(/ (- 1.0 (fma b b 0.0)) (+ 1.0 (fma b (fma b b 0.0) 0.0)))
(+ 1.0 (* b (+ b -1.0))))
a))
y)
(fma b (* (/ x y) (fma 0.5 b -1.0)) (/ x y)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (1.0 / a) * (1.0 + b);
double tmp;
if (b <= -8.8e+54) {
tmp = (x * fma(b, fma(b, fma(b, -0.16666666666666666, 0.5), -1.0), 1.0)) / y;
} else if (b <= 1.35e+102) {
tmp = ((x * (((1.0 - b) / a) * t_1)) / t_1) / y;
} else if (b <= 9.2e+151) {
tmp = (x * ((((1.0 - fma(b, b, 0.0)) / (1.0 + fma(b, fma(b, b, 0.0), 0.0))) * (1.0 + (b * (b + -1.0)))) / a)) / y;
} else {
tmp = fma(b, ((x / y) * fma(0.5, b, -1.0)), (x / y));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(1.0 / a) * Float64(1.0 + b)) tmp = 0.0 if (b <= -8.8e+54) tmp = Float64(Float64(x * fma(b, fma(b, fma(b, -0.16666666666666666, 0.5), -1.0), 1.0)) / y); elseif (b <= 1.35e+102) tmp = Float64(Float64(Float64(x * Float64(Float64(Float64(1.0 - b) / a) * t_1)) / t_1) / y); elseif (b <= 9.2e+151) tmp = Float64(Float64(x * Float64(Float64(Float64(Float64(1.0 - fma(b, b, 0.0)) / Float64(1.0 + fma(b, fma(b, b, 0.0), 0.0))) * Float64(1.0 + Float64(b * Float64(b + -1.0)))) / a)) / y); else tmp = fma(b, Float64(Float64(x / y) * fma(0.5, b, -1.0)), Float64(x / y)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 / a), $MachinePrecision] * N[(1.0 + b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -8.8e+54], N[(N[(x * N[(b * N[(b * N[(b * -0.16666666666666666 + 0.5), $MachinePrecision] + -1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 1.35e+102], N[(N[(N[(x * N[(N[(N[(1.0 - b), $MachinePrecision] / a), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 9.2e+151], N[(N[(x * N[(N[(N[(N[(1.0 - N[(b * b + 0.0), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(b * N[(b * b + 0.0), $MachinePrecision] + 0.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(b * N[(b + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(b * N[(N[(x / y), $MachinePrecision] * N[(0.5 * b + -1.0), $MachinePrecision]), $MachinePrecision] + N[(x / y), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{1}{a} \cdot \left(1 + b\right)\\
\mathbf{if}\;b \leq -8.8 \cdot 10^{+54}:\\
\;\;\;\;\frac{x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, \mathsf{fma}\left(b, -0.16666666666666666, 0.5\right), -1\right), 1\right)}{y}\\
\mathbf{elif}\;b \leq 1.35 \cdot 10^{+102}:\\
\;\;\;\;\frac{\frac{x \cdot \left(\frac{1 - b}{a} \cdot t\_1\right)}{t\_1}}{y}\\
\mathbf{elif}\;b \leq 9.2 \cdot 10^{+151}:\\
\;\;\;\;\frac{x \cdot \frac{\frac{1 - \mathsf{fma}\left(b, b, 0\right)}{1 + \mathsf{fma}\left(b, \mathsf{fma}\left(b, b, 0\right), 0\right)} \cdot \left(1 + b \cdot \left(b + -1\right)\right)}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(b, \frac{x}{y} \cdot \mathsf{fma}\left(0.5, b, -1\right), \frac{x}{y}\right)\\
\end{array}
\end{array}
if b < -8.7999999999999996e54Initial program 100.0%
Taylor expanded in y around 0
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6491.3
Simplified91.3%
Taylor expanded in b around inf
neg-mul-1N/A
neg-sub0N/A
--lowering--.f6489.1
Simplified89.1%
Taylor expanded in b around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6484.8
Simplified84.8%
if -8.7999999999999996e54 < b < 1.3500000000000001e102Initial program 98.6%
Taylor expanded in y around 0
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6476.5
Simplified76.5%
Taylor expanded in b around 0
associate-*r*N/A
neg-mul-1N/A
distribute-rgt1-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
neg-sub0N/A
--lowering--.f64N/A
exp-to-powN/A
pow-lowering-pow.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6463.7
Simplified63.7%
Taylor expanded in t around 0
/-lowering-/.f64N/A
--lowering--.f6434.3
Simplified34.3%
*-commutativeN/A
div-subN/A
flip--N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
difference-of-squaresN/A
div-subN/A
*-lowering-*.f64N/A
div-invN/A
div-invN/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
Applied egg-rr37.3%
if 1.3500000000000001e102 < b < 9.2000000000000003e151Initial program 100.0%
Taylor expanded in y around 0
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6487.7
Simplified87.7%
Taylor expanded in b around 0
associate-*r*N/A
neg-mul-1N/A
distribute-rgt1-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
neg-sub0N/A
--lowering--.f64N/A
exp-to-powN/A
pow-lowering-pow.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6421.9
Simplified21.9%
Taylor expanded in t around 0
/-lowering-/.f64N/A
--lowering--.f649.6
Simplified9.6%
flip--N/A
flip3-+N/A
associate-/r/N/A
*-lowering-*.f64N/A
Applied egg-rr100.0%
if 9.2000000000000003e151 < b Initial program 100.0%
Taylor expanded in y around 0
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6497.0
Simplified97.0%
Taylor expanded in b around inf
neg-mul-1N/A
neg-sub0N/A
--lowering--.f6482.1
Simplified82.1%
Taylor expanded in b around 0
+-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-outN/A
metadata-evalN/A
sub-negN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sub-negN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6428.8
Simplified28.8%
Final simplification46.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -5.1e+54)
(/ (* x (fma b (fma b (fma b -0.16666666666666666 0.5) -1.0) 1.0)) y)
(if (<= b 5.7e-273)
(/ (* x (/ (- a (* a b)) (* a a))) y)
(if (<= b 9.2e+151)
(/
(*
x
(/
(*
(/ (- 1.0 (fma b b 0.0)) (+ 1.0 (fma b (fma b b 0.0) 0.0)))
(+ 1.0 (* b (+ b -1.0))))
a))
y)
(fma b (* (/ x y) (fma 0.5 b -1.0)) (/ x y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -5.1e+54) {
tmp = (x * fma(b, fma(b, fma(b, -0.16666666666666666, 0.5), -1.0), 1.0)) / y;
} else if (b <= 5.7e-273) {
tmp = (x * ((a - (a * b)) / (a * a))) / y;
} else if (b <= 9.2e+151) {
tmp = (x * ((((1.0 - fma(b, b, 0.0)) / (1.0 + fma(b, fma(b, b, 0.0), 0.0))) * (1.0 + (b * (b + -1.0)))) / a)) / y;
} else {
tmp = fma(b, ((x / y) * fma(0.5, b, -1.0)), (x / y));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -5.1e+54) tmp = Float64(Float64(x * fma(b, fma(b, fma(b, -0.16666666666666666, 0.5), -1.0), 1.0)) / y); elseif (b <= 5.7e-273) tmp = Float64(Float64(x * Float64(Float64(a - Float64(a * b)) / Float64(a * a))) / y); elseif (b <= 9.2e+151) tmp = Float64(Float64(x * Float64(Float64(Float64(Float64(1.0 - fma(b, b, 0.0)) / Float64(1.0 + fma(b, fma(b, b, 0.0), 0.0))) * Float64(1.0 + Float64(b * Float64(b + -1.0)))) / a)) / y); else tmp = fma(b, Float64(Float64(x / y) * fma(0.5, b, -1.0)), Float64(x / y)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -5.1e+54], N[(N[(x * N[(b * N[(b * N[(b * -0.16666666666666666 + 0.5), $MachinePrecision] + -1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 5.7e-273], N[(N[(x * N[(N[(a - N[(a * b), $MachinePrecision]), $MachinePrecision] / N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 9.2e+151], N[(N[(x * N[(N[(N[(N[(1.0 - N[(b * b + 0.0), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(b * N[(b * b + 0.0), $MachinePrecision] + 0.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(b * N[(b + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(b * N[(N[(x / y), $MachinePrecision] * N[(0.5 * b + -1.0), $MachinePrecision]), $MachinePrecision] + N[(x / y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.1 \cdot 10^{+54}:\\
\;\;\;\;\frac{x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, \mathsf{fma}\left(b, -0.16666666666666666, 0.5\right), -1\right), 1\right)}{y}\\
\mathbf{elif}\;b \leq 5.7 \cdot 10^{-273}:\\
\;\;\;\;\frac{x \cdot \frac{a - a \cdot b}{a \cdot a}}{y}\\
\mathbf{elif}\;b \leq 9.2 \cdot 10^{+151}:\\
\;\;\;\;\frac{x \cdot \frac{\frac{1 - \mathsf{fma}\left(b, b, 0\right)}{1 + \mathsf{fma}\left(b, \mathsf{fma}\left(b, b, 0\right), 0\right)} \cdot \left(1 + b \cdot \left(b + -1\right)\right)}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(b, \frac{x}{y} \cdot \mathsf{fma}\left(0.5, b, -1\right), \frac{x}{y}\right)\\
\end{array}
\end{array}
if b < -5.10000000000000009e54Initial program 100.0%
Taylor expanded in y around 0
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6491.3
Simplified91.3%
Taylor expanded in b around inf
neg-mul-1N/A
neg-sub0N/A
--lowering--.f6489.1
Simplified89.1%
Taylor expanded in b around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6484.8
Simplified84.8%
if -5.10000000000000009e54 < b < 5.69999999999999972e-273Initial program 98.1%
Taylor expanded in y around 0
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6477.0
Simplified77.0%
Taylor expanded in b around 0
associate-*r*N/A
neg-mul-1N/A
distribute-rgt1-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
neg-sub0N/A
--lowering--.f64N/A
exp-to-powN/A
pow-lowering-pow.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6473.2
Simplified73.2%
Taylor expanded in t around 0
/-lowering-/.f64N/A
--lowering--.f6437.2
Simplified37.2%
div-subN/A
frac-subN/A
/-lowering-/.f64N/A
*-lft-identityN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6442.4
Applied egg-rr42.4%
if 5.69999999999999972e-273 < b < 9.2000000000000003e151Initial program 99.3%
Taylor expanded in y around 0
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6476.9
Simplified76.9%
Taylor expanded in b around 0
associate-*r*N/A
neg-mul-1N/A
distribute-rgt1-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
neg-sub0N/A
--lowering--.f64N/A
exp-to-powN/A
pow-lowering-pow.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6450.0
Simplified50.0%
Taylor expanded in t around 0
/-lowering-/.f64N/A
--lowering--.f6428.9
Simplified28.9%
flip--N/A
flip3-+N/A
associate-/r/N/A
*-lowering-*.f64N/A
Applied egg-rr37.2%
if 9.2000000000000003e151 < b Initial program 100.0%
Taylor expanded in y around 0
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6497.0
Simplified97.0%
Taylor expanded in b around inf
neg-mul-1N/A
neg-sub0N/A
--lowering--.f6482.1
Simplified82.1%
Taylor expanded in b around 0
+-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-outN/A
metadata-evalN/A
sub-negN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sub-negN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6428.8
Simplified28.8%
(FPCore (x y z t a b) :precision binary64 (if (<= b -3.4e+54) (/ (* x (fma b (fma b (fma b -0.16666666666666666 0.5) -1.0) 1.0)) y) (if (<= b 3.5e-275) (/ (* x (/ (- a (* a b)) (* a a))) y) (/ (/ x a) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -3.4e+54) {
tmp = (x * fma(b, fma(b, fma(b, -0.16666666666666666, 0.5), -1.0), 1.0)) / y;
} else if (b <= 3.5e-275) {
tmp = (x * ((a - (a * b)) / (a * a))) / y;
} else {
tmp = (x / a) / y;
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -3.4e+54) tmp = Float64(Float64(x * fma(b, fma(b, fma(b, -0.16666666666666666, 0.5), -1.0), 1.0)) / y); elseif (b <= 3.5e-275) tmp = Float64(Float64(x * Float64(Float64(a - Float64(a * b)) / Float64(a * a))) / y); else tmp = Float64(Float64(x / a) / y); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -3.4e+54], N[(N[(x * N[(b * N[(b * N[(b * -0.16666666666666666 + 0.5), $MachinePrecision] + -1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 3.5e-275], N[(N[(x * N[(N[(a - N[(a * b), $MachinePrecision]), $MachinePrecision] / N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.4 \cdot 10^{+54}:\\
\;\;\;\;\frac{x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, \mathsf{fma}\left(b, -0.16666666666666666, 0.5\right), -1\right), 1\right)}{y}\\
\mathbf{elif}\;b \leq 3.5 \cdot 10^{-275}:\\
\;\;\;\;\frac{x \cdot \frac{a - a \cdot b}{a \cdot a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\end{array}
\end{array}
if b < -3.4000000000000001e54Initial program 100.0%
Taylor expanded in y around 0
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6491.3
Simplified91.3%
Taylor expanded in b around inf
neg-mul-1N/A
neg-sub0N/A
--lowering--.f6489.1
Simplified89.1%
Taylor expanded in b around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6484.8
Simplified84.8%
if -3.4000000000000001e54 < b < 3.49999999999999969e-275Initial program 98.1%
Taylor expanded in y around 0
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6477.0
Simplified77.0%
Taylor expanded in b around 0
associate-*r*N/A
neg-mul-1N/A
distribute-rgt1-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
neg-sub0N/A
--lowering--.f64N/A
exp-to-powN/A
pow-lowering-pow.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6473.2
Simplified73.2%
Taylor expanded in t around 0
/-lowering-/.f64N/A
--lowering--.f6437.2
Simplified37.2%
div-subN/A
frac-subN/A
/-lowering-/.f64N/A
*-lft-identityN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6442.4
Applied egg-rr42.4%
if 3.49999999999999969e-275 < b Initial program 99.5%
Taylor expanded in y around 0
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6482.5
Simplified82.5%
Taylor expanded in b around 0
associate-*r*N/A
neg-mul-1N/A
distribute-rgt1-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
neg-sub0N/A
--lowering--.f64N/A
exp-to-powN/A
pow-lowering-pow.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6445.8
Simplified45.8%
Taylor expanded in t around 0
/-lowering-/.f64N/A
--lowering--.f6424.0
Simplified24.0%
Taylor expanded in b around 0
/-lowering-/.f6430.5
Simplified30.5%
(FPCore (x y z t a b) :precision binary64 (if (<= b -2.4e+27) (/ (* x (fma b (fma b (fma b -0.16666666666666666 0.5) -1.0) 1.0)) y) (/ (/ x a) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.4e+27) {
tmp = (x * fma(b, fma(b, fma(b, -0.16666666666666666, 0.5), -1.0), 1.0)) / y;
} else {
tmp = (x / a) / y;
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -2.4e+27) tmp = Float64(Float64(x * fma(b, fma(b, fma(b, -0.16666666666666666, 0.5), -1.0), 1.0)) / y); else tmp = Float64(Float64(x / a) / y); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -2.4e+27], N[(N[(x * N[(b * N[(b * N[(b * -0.16666666666666666 + 0.5), $MachinePrecision] + -1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.4 \cdot 10^{+27}:\\
\;\;\;\;\frac{x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, \mathsf{fma}\left(b, -0.16666666666666666, 0.5\right), -1\right), 1\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\end{array}
\end{array}
if b < -2.39999999999999998e27Initial program 100.0%
Taylor expanded in y around 0
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6492.1
Simplified92.1%
Taylor expanded in b around inf
neg-mul-1N/A
neg-sub0N/A
--lowering--.f6490.2
Simplified90.2%
Taylor expanded in b around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6478.6
Simplified78.6%
if -2.39999999999999998e27 < b Initial program 98.8%
Taylor expanded in y around 0
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6479.6
Simplified79.6%
Taylor expanded in b around 0
associate-*r*N/A
neg-mul-1N/A
distribute-rgt1-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
neg-sub0N/A
--lowering--.f64N/A
exp-to-powN/A
pow-lowering-pow.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6457.5
Simplified57.5%
Taylor expanded in t around 0
/-lowering-/.f64N/A
--lowering--.f6429.9
Simplified29.9%
Taylor expanded in b around 0
/-lowering-/.f6433.6
Simplified33.6%
(FPCore (x y z t a b) :precision binary64 (if (<= b -5.6e+26) (/ (fma x (* b (fma 0.5 b -1.0)) x) y) (/ (/ x a) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -5.6e+26) {
tmp = fma(x, (b * fma(0.5, b, -1.0)), x) / y;
} else {
tmp = (x / a) / y;
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -5.6e+26) tmp = Float64(fma(x, Float64(b * fma(0.5, b, -1.0)), x) / y); else tmp = Float64(Float64(x / a) / y); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -5.6e+26], N[(N[(x * N[(b * N[(0.5 * b + -1.0), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision] / y), $MachinePrecision], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.6 \cdot 10^{+26}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, b \cdot \mathsf{fma}\left(0.5, b, -1\right), x\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\end{array}
\end{array}
if b < -5.59999999999999999e26Initial program 100.0%
Taylor expanded in y around 0
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6492.1
Simplified92.1%
Taylor expanded in b around inf
neg-mul-1N/A
neg-sub0N/A
--lowering--.f6490.2
Simplified90.2%
Taylor expanded in b around 0
+-commutativeN/A
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
associate-*r*N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
distribute-lft-neg-inN/A
distribute-rgt-outN/A
neg-mul-1N/A
*-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
sub-negN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
accelerator-lowering-fma.f6465.2
Simplified65.2%
if -5.59999999999999999e26 < b Initial program 98.8%
Taylor expanded in y around 0
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6479.6
Simplified79.6%
Taylor expanded in b around 0
associate-*r*N/A
neg-mul-1N/A
distribute-rgt1-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
neg-sub0N/A
--lowering--.f64N/A
exp-to-powN/A
pow-lowering-pow.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6457.5
Simplified57.5%
Taylor expanded in t around 0
/-lowering-/.f64N/A
--lowering--.f6429.9
Simplified29.9%
Taylor expanded in b around 0
/-lowering-/.f6433.6
Simplified33.6%
(FPCore (x y z t a b) :precision binary64 (if (<= b -9e+103) (* x (/ (- 1.0 b) (* y a))) (/ (/ x a) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -9e+103) {
tmp = x * ((1.0 - b) / (y * a));
} else {
tmp = (x / a) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-9d+103)) then
tmp = x * ((1.0d0 - b) / (y * a))
else
tmp = (x / a) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -9e+103) {
tmp = x * ((1.0 - b) / (y * a));
} else {
tmp = (x / a) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -9e+103: tmp = x * ((1.0 - b) / (y * a)) else: tmp = (x / a) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -9e+103) tmp = Float64(x * Float64(Float64(1.0 - b) / Float64(y * a))); else tmp = Float64(Float64(x / a) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -9e+103) tmp = x * ((1.0 - b) / (y * a)); else tmp = (x / a) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -9e+103], N[(x * N[(N[(1.0 - b), $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -9 \cdot 10^{+103}:\\
\;\;\;\;x \cdot \frac{1 - b}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\end{array}
\end{array}
if b < -9.00000000000000002e103Initial program 100.0%
Taylor expanded in y around 0
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6490.2
Simplified90.2%
Taylor expanded in b around 0
associate-*r*N/A
neg-mul-1N/A
distribute-rgt1-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
neg-sub0N/A
--lowering--.f64N/A
exp-to-powN/A
pow-lowering-pow.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6456.0
Simplified56.0%
Taylor expanded in t around 0
/-lowering-/.f64N/A
--lowering--.f6458.7
Simplified58.7%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-/l/N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
remove-double-divN/A
un-div-invN/A
remove-double-negN/A
neg-mul-1N/A
distribute-lft-neg-inN/A
metadata-evalN/A
associate-*l/N/A
remove-double-divN/A
*-lowering-*.f6456.6
Applied egg-rr56.6%
if -9.00000000000000002e103 < b Initial program 98.9%
Taylor expanded in y around 0
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6480.6
Simplified80.6%
Taylor expanded in b around 0
associate-*r*N/A
neg-mul-1N/A
distribute-rgt1-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
neg-sub0N/A
--lowering--.f64N/A
exp-to-powN/A
pow-lowering-pow.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6457.7
Simplified57.7%
Taylor expanded in t around 0
/-lowering-/.f64N/A
--lowering--.f6430.0
Simplified30.0%
Taylor expanded in b around 0
/-lowering-/.f6433.0
Simplified33.0%
Final simplification36.7%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.1e+104) (* x (/ (- 1.0 b) y)) (/ (/ x a) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.1e+104) {
tmp = x * ((1.0 - b) / y);
} else {
tmp = (x / a) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-1.1d+104)) then
tmp = x * ((1.0d0 - b) / y)
else
tmp = (x / a) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.1e+104) {
tmp = x * ((1.0 - b) / y);
} else {
tmp = (x / a) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.1e+104: tmp = x * ((1.0 - b) / y) else: tmp = (x / a) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.1e+104) tmp = Float64(x * Float64(Float64(1.0 - b) / y)); else tmp = Float64(Float64(x / a) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.1e+104) tmp = x * ((1.0 - b) / y); else tmp = (x / a) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.1e+104], N[(x * N[(N[(1.0 - b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.1 \cdot 10^{+104}:\\
\;\;\;\;x \cdot \frac{1 - b}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\end{array}
\end{array}
if b < -1.1e104Initial program 100.0%
Taylor expanded in y around 0
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6490.2
Simplified90.2%
Taylor expanded in b around inf
neg-mul-1N/A
neg-sub0N/A
--lowering--.f6487.7
Simplified87.7%
Taylor expanded in b around 0
mul-1-negN/A
associate-/l*N/A
distribute-lft-neg-inN/A
distribute-lft1-inN/A
+-commutativeN/A
sub-negN/A
associate-/l*N/A
*-commutativeN/A
associate-*r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6446.7
Simplified46.7%
if -1.1e104 < b Initial program 98.9%
Taylor expanded in y around 0
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6480.6
Simplified80.6%
Taylor expanded in b around 0
associate-*r*N/A
neg-mul-1N/A
distribute-rgt1-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
neg-sub0N/A
--lowering--.f64N/A
exp-to-powN/A
pow-lowering-pow.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6457.7
Simplified57.7%
Taylor expanded in t around 0
/-lowering-/.f64N/A
--lowering--.f6430.0
Simplified30.0%
Taylor expanded in b around 0
/-lowering-/.f6433.0
Simplified33.0%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.3e+26) (* x (/ (- 1.0 b) y)) (/ x (* y a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.3e+26) {
tmp = x * ((1.0 - b) / y);
} else {
tmp = x / (y * a);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-1.3d+26)) then
tmp = x * ((1.0d0 - b) / y)
else
tmp = x / (y * a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.3e+26) {
tmp = x * ((1.0 - b) / y);
} else {
tmp = x / (y * a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.3e+26: tmp = x * ((1.0 - b) / y) else: tmp = x / (y * a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.3e+26) tmp = Float64(x * Float64(Float64(1.0 - b) / 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 (b <= -1.3e+26) tmp = x * ((1.0 - b) / y); else tmp = x / (y * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.3e+26], N[(x * N[(N[(1.0 - b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.3 \cdot 10^{+26}:\\
\;\;\;\;x \cdot \frac{1 - b}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\end{array}
\end{array}
if b < -1.30000000000000001e26Initial program 100.0%
Taylor expanded in y around 0
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6492.1
Simplified92.1%
Taylor expanded in b around inf
neg-mul-1N/A
neg-sub0N/A
--lowering--.f6490.2
Simplified90.2%
Taylor expanded in b around 0
mul-1-negN/A
associate-/l*N/A
distribute-lft-neg-inN/A
distribute-lft1-inN/A
+-commutativeN/A
sub-negN/A
associate-/l*N/A
*-commutativeN/A
associate-*r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6439.9
Simplified39.9%
if -1.30000000000000001e26 < b Initial program 98.8%
Taylor expanded in b around 0
+-rgt-identityN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
Simplified72.9%
Taylor expanded in y around 0
/-lowering-/.f64N/A
exp-to-powN/A
pow-lowering-pow.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6462.4
Simplified62.4%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f6429.8
Simplified29.8%
Final simplification31.7%
(FPCore (x y z t a b) :precision binary64 (/ x (* y a)))
double code(double x, double y, double z, double t, double a, double b) {
return x / (y * a);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x / (y * a)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x / (y * a);
}
def code(x, y, z, t, a, b): return x / (y * a)
function code(x, y, z, t, a, b) return Float64(x / Float64(y * a)) end
function tmp = code(x, y, z, t, a, b) tmp = x / (y * a); end
code[x_, y_, z_, t_, a_, b_] := N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y \cdot a}
\end{array}
Initial program 99.1%
Taylor expanded in b around 0
+-rgt-identityN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
Simplified69.8%
Taylor expanded in y around 0
/-lowering-/.f64N/A
exp-to-powN/A
pow-lowering-pow.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6459.5
Simplified59.5%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f6429.1
Simplified29.1%
Final simplification29.1%
(FPCore (x y z t a b) :precision binary64 (/ x y))
double code(double x, double y, double z, double t, double a, double b) {
return x / y;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x / y;
}
def code(x, y, z, t, a, b): return x / y
function code(x, y, z, t, a, b) return Float64(x / y) end
function tmp = code(x, y, z, t, a, b) tmp = x / y; end
code[x_, y_, z_, t_, a_, b_] := N[(x / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y}
\end{array}
Initial program 99.1%
Taylor expanded in y around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f6471.4
Simplified71.4%
Taylor expanded in b around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f6446.8
Simplified46.8%
Taylor expanded in y around 0
/-lowering-/.f6416.9
Simplified16.9%
(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 2024195
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:incompleteBetaWorker from math-functions-0.1.5.2, A"
:precision binary64
:alt
(! :herbie-platform default (if (< t -8845848504127471/10000000000000000) (/ (* x (/ (pow a (- t 1)) y)) (- (+ b 1) (* y (log z)))) (if (< t 8520312288374073/10000000000) (/ (* (/ x y) (pow a (- t 1))) (exp (- b (* (log z) y)))) (/ (* x (/ (pow a (- t 1)) y)) (- (+ b 1) (* y (log z)))))))
(/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))