
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x * exp((((y * log(z)) + ((t - 1.0d0) * log(a))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x * Math.exp((((y * Math.log(z)) + ((t - 1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + ((t - 1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x * exp((((y * log(z)) + ((t - 1.0d0) * log(a))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x * Math.exp((((y * Math.log(z)) + ((t - 1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + ((t - 1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\end{array}
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (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 98.4%
Final simplification98.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (exp (- (+ (* y (log z)) (* (log a) (+ t -1.0))) b))) y))
(t_2 (* x (/ (fma b (fma b 0.5 -1.0) 1.0) y))))
(if (<= t_1 (- INFINITY))
t_2
(if (<= t_1 2e+300)
(/
x
(* a (* y (fma b (fma b (fma b 0.16666666666666666 0.5) 1.0) 1.0))))
t_2))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * exp((((y * log(z)) + (log(a) * (t + -1.0))) - b))) / y;
double t_2 = x * (fma(b, fma(b, 0.5, -1.0), 1.0) / y);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = t_2;
} else if (t_1 <= 2e+300) {
tmp = x / (a * (y * fma(b, fma(b, fma(b, 0.16666666666666666, 0.5), 1.0), 1.0)));
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(log(a) * Float64(t + -1.0))) - b))) / y) t_2 = Float64(x * Float64(fma(b, fma(b, 0.5, -1.0), 1.0) / y)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = t_2; elseif (t_1 <= 2e+300) tmp = Float64(x / Float64(a * Float64(y * fma(b, fma(b, fma(b, 0.16666666666666666, 0.5), 1.0), 1.0)))); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = 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]}, Block[{t$95$2 = N[(x * N[(N[(b * N[(b * 0.5 + -1.0), $MachinePrecision] + 1.0), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], t$95$2, If[LessEqual[t$95$1, 2e+300], N[(x / N[(a * N[(y * N[(b * N[(b * N[(b * 0.16666666666666666 + 0.5), $MachinePrecision] + 1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot e^{\left(y \cdot \log z + \log a \cdot \left(t + -1\right)\right) - b}}{y}\\
t_2 := x \cdot \frac{\mathsf{fma}\left(b, \mathsf{fma}\left(b, 0.5, -1\right), 1\right)}{y}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+300}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, \mathsf{fma}\left(b, 0.16666666666666666, 0.5\right), 1\right), 1\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (/.f64 (*.f64 x (exp.f64 (-.f64 (+.f64 (*.f64 y (log.f64 z)) (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a))) b))) y) < -inf.0 or 2.0000000000000001e300 < (/.f64 (*.f64 x (exp.f64 (-.f64 (+.f64 (*.f64 y (log.f64 z)) (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a))) b))) y) Initial program 100.0%
Taylor expanded in y around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f6481.1
Simplified81.1%
Taylor expanded in y around 0
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
neg-sub0N/A
--lowering--.f6440.4
Simplified40.4%
Taylor expanded in b around 0
Simplified32.9%
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
accelerator-lowering-fma.f6441.4
Applied egg-rr41.4%
if -inf.0 < (/.f64 (*.f64 x (exp.f64 (-.f64 (+.f64 (*.f64 y (log.f64 z)) (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a))) b))) y) < 2.0000000000000001e300Initial program 96.9%
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.f6466.9
Simplified66.9%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f6464.5
Simplified64.5%
Taylor expanded in b around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6471.3
Simplified71.3%
Final simplification57.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (exp (- (+ (* y (log z)) (* (log a) (+ t -1.0))) b))) y))
(t_2 (* x (/ (fma b (fma b 0.5 -1.0) 1.0) y))))
(if (<= t_1 (- INFINITY))
t_2
(if (<= t_1 2e+300) (/ x (* a (* y (fma b (fma b 0.5 1.0) 1.0)))) t_2))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * exp((((y * log(z)) + (log(a) * (t + -1.0))) - b))) / y;
double t_2 = x * (fma(b, fma(b, 0.5, -1.0), 1.0) / y);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = t_2;
} else if (t_1 <= 2e+300) {
tmp = x / (a * (y * fma(b, fma(b, 0.5, 1.0), 1.0)));
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(log(a) * Float64(t + -1.0))) - b))) / y) t_2 = Float64(x * Float64(fma(b, fma(b, 0.5, -1.0), 1.0) / y)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = t_2; elseif (t_1 <= 2e+300) tmp = Float64(x / Float64(a * Float64(y * fma(b, fma(b, 0.5, 1.0), 1.0)))); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = 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]}, Block[{t$95$2 = N[(x * N[(N[(b * N[(b * 0.5 + -1.0), $MachinePrecision] + 1.0), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], t$95$2, If[LessEqual[t$95$1, 2e+300], N[(x / N[(a * N[(y * N[(b * N[(b * 0.5 + 1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot e^{\left(y \cdot \log z + \log a \cdot \left(t + -1\right)\right) - b}}{y}\\
t_2 := x \cdot \frac{\mathsf{fma}\left(b, \mathsf{fma}\left(b, 0.5, -1\right), 1\right)}{y}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+300}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, 0.5, 1\right), 1\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (/.f64 (*.f64 x (exp.f64 (-.f64 (+.f64 (*.f64 y (log.f64 z)) (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a))) b))) y) < -inf.0 or 2.0000000000000001e300 < (/.f64 (*.f64 x (exp.f64 (-.f64 (+.f64 (*.f64 y (log.f64 z)) (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a))) b))) y) Initial program 100.0%
Taylor expanded in y around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f6481.1
Simplified81.1%
Taylor expanded in y around 0
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
neg-sub0N/A
--lowering--.f6440.4
Simplified40.4%
Taylor expanded in b around 0
Simplified32.9%
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
accelerator-lowering-fma.f6441.4
Applied egg-rr41.4%
if -inf.0 < (/.f64 (*.f64 x (exp.f64 (-.f64 (+.f64 (*.f64 y (log.f64 z)) (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a))) b))) y) < 2.0000000000000001e300Initial program 96.9%
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.f6466.9
Simplified66.9%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f6464.5
Simplified64.5%
Taylor expanded in b around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6464.9
Simplified64.9%
Final simplification53.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (exp (- (+ (* y (log z)) (* (log a) (+ t -1.0))) b))) y)))
(if (<= t_1 (- INFINITY))
(* x (/ (- 1.0 b) y))
(if (<= t_1 1e+203) (/ x (* a (fma y b y))) (/ (/ x a) y)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * exp((((y * log(z)) + (log(a) * (t + -1.0))) - b))) / y;
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = x * ((1.0 - b) / y);
} else if (t_1 <= 1e+203) {
tmp = x / (a * fma(y, b, y));
} else {
tmp = (x / a) / y;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(log(a) * Float64(t + -1.0))) - b))) / y) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(x * Float64(Float64(1.0 - b) / y)); elseif (t_1 <= 1e+203) tmp = Float64(x / Float64(a * fma(y, b, y))); else tmp = Float64(Float64(x / a) / y); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = 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]}, If[LessEqual[t$95$1, (-Infinity)], N[(x * N[(N[(1.0 - b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+203], N[(x / N[(a * N[(y * b + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot e^{\left(y \cdot \log z + \log a \cdot \left(t + -1\right)\right) - b}}{y}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;x \cdot \frac{1 - b}{y}\\
\mathbf{elif}\;t\_1 \leq 10^{+203}:\\
\;\;\;\;\frac{x}{a \cdot \mathsf{fma}\left(y, b, y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\end{array}
\end{array}
if (/.f64 (*.f64 x (exp.f64 (-.f64 (+.f64 (*.f64 y (log.f64 z)) (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a))) b))) y) < -inf.0Initial program 100.0%
Taylor expanded in y around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f6481.3
Simplified81.3%
Taylor expanded in y around 0
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
neg-sub0N/A
--lowering--.f6443.6
Simplified43.6%
Taylor expanded in b around 0
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
div-subN/A
unsub-negN/A
mul-1-negN/A
/-lowering-/.f64N/A
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
neg-mul-1N/A
unsub-negN/A
--lowering--.f6416.7
Simplified16.7%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6421.8
Applied egg-rr21.8%
if -inf.0 < (/.f64 (*.f64 x (exp.f64 (-.f64 (+.f64 (*.f64 y (log.f64 z)) (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a))) b))) y) < 9.9999999999999999e202Initial program 97.0%
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.f6466.1
Simplified66.1%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f6464.4
Simplified64.4%
Taylor expanded in b around 0
distribute-lft-outN/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6448.3
Simplified48.3%
if 9.9999999999999999e202 < (/.f64 (*.f64 x (exp.f64 (-.f64 (+.f64 (*.f64 y (log.f64 z)) (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a))) b))) y) Initial program 99.6%
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.f6468.1
Simplified68.1%
Taylor expanded in b around 0
Simplified61.2%
Taylor expanded in t around 0
/-lowering-/.f6429.8
Simplified29.8%
Final simplification37.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (log a) (+ t -1.0))) (t_2 (/ (* x (pow a t)) y)))
(if (<= t_1 -5e+145)
t_2
(if (<= t_1 5e+130) (/ (* 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 * pow(a, t)) / y;
double tmp;
if (t_1 <= -5e+145) {
tmp = t_2;
} else if (t_1 <= 5e+130) {
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 * (a ^ t)) / y) tmp = 0.0 if (t_1 <= -5e+145) tmp = t_2; elseif (t_1 <= 5e+130) 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[Power[a, t], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+145], t$95$2, If[LessEqual[t$95$1, 5e+130], 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 {a}^{t}}{y}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+145}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+130}:\\
\;\;\;\;\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)) < -4.99999999999999967e145 or 4.9999999999999996e130 < (*.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-log98.5
Simplified98.5%
Taylor expanded in b around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f6492.5
Simplified92.5%
if -4.99999999999999967e145 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 4.9999999999999996e130Initial program 97.8%
Taylor expanded in y around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f6481.0
Simplified81.0%
Final simplification84.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (log a) (+ t -1.0))) (t_2 (/ (* x (pow a t)) y)))
(if (<= t_1 -620.0)
t_2
(if (<= t_1 1000.0)
(/
x
(* a (* y (fma b (fma b (fma b 0.16666666666666666 0.5) 1.0) 1.0))))
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 * pow(a, t)) / y;
double tmp;
if (t_1 <= -620.0) {
tmp = t_2;
} else if (t_1 <= 1000.0) {
tmp = x / (a * (y * fma(b, fma(b, fma(b, 0.16666666666666666, 0.5), 1.0), 1.0)));
} 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 * (a ^ t)) / y) tmp = 0.0 if (t_1 <= -620.0) tmp = t_2; elseif (t_1 <= 1000.0) tmp = Float64(x / Float64(a * Float64(y * fma(b, fma(b, fma(b, 0.16666666666666666, 0.5), 1.0), 1.0)))); 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[Power[a, t], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t$95$1, -620.0], t$95$2, If[LessEqual[t$95$1, 1000.0], N[(x / N[(a * N[(y * N[(b * N[(b * N[(b * 0.16666666666666666 + 0.5), $MachinePrecision] + 1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log a \cdot \left(t + -1\right)\\
t_2 := \frac{x \cdot {a}^{t}}{y}\\
\mathbf{if}\;t\_1 \leq -620:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 1000:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, \mathsf{fma}\left(b, 0.16666666666666666, 0.5\right), 1\right), 1\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -620 or 1e3 < (*.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-log89.5
Simplified89.5%
Taylor expanded in b around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f6479.0
Simplified79.0%
if -620 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 1e3Initial program 96.7%
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.f6464.1
Simplified64.1%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f6468.6
Simplified68.6%
Taylor expanded in b around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6454.5
Simplified54.5%
Final simplification67.0%
(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.6e+43)
t_1
(if (<= y 2.95e-237)
(/ (* x (exp (- (fma (log a) t 0.0) b))) y)
(if (<= y 2.1e-37) (* (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 * exp((fma(y, log(z), 0.0) - b))) / y;
double tmp;
if (y <= -3.6e+43) {
tmp = t_1;
} else if (y <= 2.95e-237) {
tmp = (x * exp((fma(log(a), t, 0.0) - b))) / y;
} else if (y <= 2.1e-37) {
tmp = pow(a, (t + -1.0)) * (x / 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.6e+43) tmp = t_1; elseif (y <= 2.95e-237) tmp = Float64(Float64(x * exp(Float64(fma(log(a), t, 0.0) - b))) / y); elseif (y <= 2.1e-37) tmp = Float64((a ^ Float64(t + -1.0)) * Float64(x / 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.6e+43], t$95$1, If[LessEqual[y, 2.95e-237], N[(N[(x * N[Exp[N[(N[(N[Log[a], $MachinePrecision] * t + 0.0), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 2.1e-37], 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 \cdot e^{\mathsf{fma}\left(y, \log z, 0\right) - b}}{y}\\
\mathbf{if}\;y \leq -3.6 \cdot 10^{+43}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.95 \cdot 10^{-237}:\\
\;\;\;\;\frac{x \cdot e^{\mathsf{fma}\left(\log a, t, 0\right) - b}}{y}\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{-37}:\\
\;\;\;\;{a}^{\left(t + -1\right)} \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -3.6000000000000001e43 or 2.1000000000000001e-37 < y Initial program 100.0%
Taylor expanded in y around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f6492.5
Simplified92.5%
if -3.6000000000000001e43 < y < 2.95000000000000018e-237Initial program 98.2%
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-log85.5
Simplified85.5%
if 2.95000000000000018e-237 < y < 2.1000000000000001e-37Initial program 93.4%
Taylor expanded in b around 0
+-rgt-identityN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
Simplified78.1%
Taylor expanded in y around 0
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
exp-to-powN/A
pow-lowering-pow.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f6480.6
Simplified80.6%
Final simplification88.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (exp (- (fma (log a) t 0.0) b))) y)))
(if (<= b -6.1e+27)
t_1
(if (<= b 2.3) (fma x (* (pow a (+ t -1.0)) (/ (pow z y) y)) 0.0) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * exp((fma(log(a), t, 0.0) - b))) / y;
double tmp;
if (b <= -6.1e+27) {
tmp = t_1;
} else if (b <= 2.3) {
tmp = fma(x, (pow(a, (t + -1.0)) * (pow(z, y) / y)), 0.0);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * exp(Float64(fma(log(a), t, 0.0) - b))) / y) tmp = 0.0 if (b <= -6.1e+27) tmp = t_1; elseif (b <= 2.3) tmp = fma(x, Float64((a ^ Float64(t + -1.0)) * Float64((z ^ y) / y)), 0.0); 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[(N[Log[a], $MachinePrecision] * t + 0.0), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[b, -6.1e+27], t$95$1, If[LessEqual[b, 2.3], N[(x * N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] * N[(N[Power[z, y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + 0.0), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot e^{\mathsf{fma}\left(\log a, t, 0\right) - b}}{y}\\
\mathbf{if}\;b \leq -6.1 \cdot 10^{+27}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 2.3:\\
\;\;\;\;\mathsf{fma}\left(x, {a}^{\left(t + -1\right)} \cdot \frac{{z}^{y}}{y}, 0\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -6.0999999999999997e27 or 2.2999999999999998 < 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-log90.6
Simplified90.6%
if -6.0999999999999997e27 < b < 2.2999999999999998Initial program 96.8%
Taylor expanded in b around 0
+-rgt-identityN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
Simplified89.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (pow z y)) y)))
(if (<= y -2.05e+36)
t_1
(if (<= y -1.1e-113)
(/ (* x (pow a (+ t -1.0))) y)
(if (<= y 3.1e+81) (/ x (* a (* y (exp b)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * pow(z, y)) / y;
double tmp;
if (y <= -2.05e+36) {
tmp = t_1;
} else if (y <= -1.1e-113) {
tmp = (x * pow(a, (t + -1.0))) / y;
} else if (y <= 3.1e+81) {
tmp = x / (a * (y * exp(b)));
} 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 * (z ** y)) / y
if (y <= (-2.05d+36)) then
tmp = t_1
else if (y <= (-1.1d-113)) then
tmp = (x * (a ** (t + (-1.0d0)))) / y
else if (y <= 3.1d+81) then
tmp = x / (a * (y * exp(b)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * Math.pow(z, y)) / y;
double tmp;
if (y <= -2.05e+36) {
tmp = t_1;
} else if (y <= -1.1e-113) {
tmp = (x * Math.pow(a, (t + -1.0))) / y;
} else if (y <= 3.1e+81) {
tmp = x / (a * (y * Math.exp(b)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x * math.pow(z, y)) / y tmp = 0 if y <= -2.05e+36: tmp = t_1 elif y <= -1.1e-113: tmp = (x * math.pow(a, (t + -1.0))) / y elif y <= 3.1e+81: tmp = x / (a * (y * math.exp(b))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * (z ^ y)) / y) tmp = 0.0 if (y <= -2.05e+36) tmp = t_1; elseif (y <= -1.1e-113) tmp = Float64(Float64(x * (a ^ Float64(t + -1.0))) / y); elseif (y <= 3.1e+81) tmp = Float64(x / Float64(a * Float64(y * exp(b)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x * (z ^ y)) / y; tmp = 0.0; if (y <= -2.05e+36) tmp = t_1; elseif (y <= -1.1e-113) tmp = (x * (a ^ (t + -1.0))) / y; elseif (y <= 3.1e+81) tmp = x / (a * (y * exp(b))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -2.05e+36], t$95$1, If[LessEqual[y, -1.1e-113], N[(N[(x * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 3.1e+81], N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot {z}^{y}}{y}\\
\mathbf{if}\;y \leq -2.05 \cdot 10^{+36}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.1 \cdot 10^{-113}:\\
\;\;\;\;\frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
\mathbf{elif}\;y \leq 3.1 \cdot 10^{+81}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.05000000000000006e36 or 3.1e81 < y Initial program 100.0%
Taylor expanded in y around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f6493.0
Simplified93.0%
Taylor expanded in b around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f6488.7
Simplified88.7%
if -2.05000000000000006e36 < y < -1.10000000000000002e-113Initial program 99.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.f6479.5
Simplified79.5%
Taylor expanded in b around 0
Simplified76.9%
if -1.10000000000000002e-113 < y < 3.1e81Initial program 96.5%
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.f6478.2
Simplified78.2%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f6476.5
Simplified76.5%
Final simplification81.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (pow z y)) y)))
(if (<= y -7.5e+38)
t_1
(if (<= y 3.95e-212)
(/ x (* y (exp b)))
(if (<= y 1.52e+36)
(/
x
(* a (* y (fma b (fma b (fma b 0.16666666666666666 0.5) 1.0) 1.0))))
t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * pow(z, y)) / y;
double tmp;
if (y <= -7.5e+38) {
tmp = t_1;
} else if (y <= 3.95e-212) {
tmp = x / (y * exp(b));
} else if (y <= 1.52e+36) {
tmp = x / (a * (y * fma(b, fma(b, fma(b, 0.16666666666666666, 0.5), 1.0), 1.0)));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * (z ^ y)) / y) tmp = 0.0 if (y <= -7.5e+38) tmp = t_1; elseif (y <= 3.95e-212) tmp = Float64(x / Float64(y * exp(b))); elseif (y <= 1.52e+36) tmp = Float64(x / Float64(a * Float64(y * fma(b, fma(b, fma(b, 0.16666666666666666, 0.5), 1.0), 1.0)))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -7.5e+38], t$95$1, If[LessEqual[y, 3.95e-212], N[(x / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.52e+36], N[(x / N[(a * N[(y * N[(b * N[(b * N[(b * 0.16666666666666666 + 0.5), $MachinePrecision] + 1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot {z}^{y}}{y}\\
\mathbf{if}\;y \leq -7.5 \cdot 10^{+38}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 3.95 \cdot 10^{-212}:\\
\;\;\;\;\frac{x}{y \cdot e^{b}}\\
\mathbf{elif}\;y \leq 1.52 \cdot 10^{+36}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, \mathsf{fma}\left(b, 0.16666666666666666, 0.5\right), 1\right), 1\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -7.4999999999999999e38 or 1.52e36 < y Initial program 100.0%
Taylor expanded in y around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f6492.9
Simplified92.9%
Taylor expanded in b around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f6486.5
Simplified86.5%
if -7.4999999999999999e38 < y < 3.9500000000000002e-212Initial program 98.2%
Taylor expanded in y around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f6459.1
Simplified59.1%
Taylor expanded in y around 0
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
neg-sub0N/A
--lowering--.f6458.0
Simplified58.0%
sub0-negN/A
exp-negN/A
un-div-invN/A
associate-/l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f6458.0
Applied egg-rr58.0%
if 3.9500000000000002e-212 < y < 1.52e36Initial program 94.4%
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.f6468.3
Simplified68.3%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f6477.1
Simplified77.1%
Taylor expanded in b around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6462.6
Simplified62.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (pow z y)) y)))
(if (<= y -2e+36)
t_1
(if (<= y 2.05e+61) (/ (* 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 * pow(z, y)) / y;
double tmp;
if (y <= -2e+36) {
tmp = t_1;
} else if (y <= 2.05e+61) {
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 * (z ** y)) / y
if (y <= (-2d+36)) then
tmp = t_1
else if (y <= 2.05d+61) 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 * Math.pow(z, y)) / y;
double tmp;
if (y <= -2e+36) {
tmp = t_1;
} else if (y <= 2.05e+61) {
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 * math.pow(z, y)) / y tmp = 0 if y <= -2e+36: tmp = t_1 elif y <= 2.05e+61: 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(Float64(x * (z ^ y)) / y) tmp = 0.0 if (y <= -2e+36) tmp = t_1; elseif (y <= 2.05e+61) 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 * (z ^ y)) / y; tmp = 0.0; if (y <= -2e+36) tmp = t_1; elseif (y <= 2.05e+61) 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[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -2e+36], t$95$1, If[LessEqual[y, 2.05e+61], 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 \cdot {z}^{y}}{y}\\
\mathbf{if}\;y \leq -2 \cdot 10^{+36}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.05 \cdot 10^{+61}:\\
\;\;\;\;\frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.00000000000000008e36 or 2.04999999999999986e61 < y Initial program 100.0%
Taylor expanded in y around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f6493.4
Simplified93.4%
Taylor expanded in b around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f6488.4
Simplified88.4%
if -2.00000000000000008e36 < y < 2.04999999999999986e61Initial program 97.0%
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.f6478.2
Simplified78.2%
Taylor expanded in b around 0
Simplified69.4%
Final simplification78.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (pow z y)) y)))
(if (<= y -2.6e+36)
t_1
(if (<= y 5.5e+61) (* (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 * pow(z, y)) / y;
double tmp;
if (y <= -2.6e+36) {
tmp = t_1;
} else if (y <= 5.5e+61) {
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 * (z ** y)) / y
if (y <= (-2.6d+36)) then
tmp = t_1
else if (y <= 5.5d+61) 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 * Math.pow(z, y)) / y;
double tmp;
if (y <= -2.6e+36) {
tmp = t_1;
} else if (y <= 5.5e+61) {
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 * math.pow(z, y)) / y tmp = 0 if y <= -2.6e+36: tmp = t_1 elif y <= 5.5e+61: 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(Float64(x * (z ^ y)) / y) tmp = 0.0 if (y <= -2.6e+36) tmp = t_1; elseif (y <= 5.5e+61) 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 * (z ^ y)) / y; tmp = 0.0; if (y <= -2.6e+36) tmp = t_1; elseif (y <= 5.5e+61) 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[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -2.6e+36], t$95$1, If[LessEqual[y, 5.5e+61], 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 \cdot {z}^{y}}{y}\\
\mathbf{if}\;y \leq -2.6 \cdot 10^{+36}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{+61}:\\
\;\;\;\;{a}^{\left(t + -1\right)} \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.6000000000000001e36 or 5.50000000000000036e61 < y Initial program 100.0%
Taylor expanded in y around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f6493.4
Simplified93.4%
Taylor expanded in b around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f6488.4
Simplified88.4%
if -2.6000000000000001e36 < y < 5.50000000000000036e61Initial program 97.0%
Taylor expanded in b around 0
+-rgt-identityN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
Simplified68.2%
Taylor expanded in y around 0
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
exp-to-powN/A
pow-lowering-pow.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f6464.7
Simplified64.7%
Final simplification75.7%
(FPCore (x y z t a b) :precision binary64 (if (<= b -115.0) (/ x (* y (exp b))) (/ x (* a (* y (fma b (fma b (fma b 0.16666666666666666 0.5) 1.0) 1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -115.0) {
tmp = x / (y * exp(b));
} else {
tmp = x / (a * (y * fma(b, fma(b, fma(b, 0.16666666666666666, 0.5), 1.0), 1.0)));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -115.0) tmp = Float64(x / Float64(y * exp(b))); else tmp = Float64(x / Float64(a * Float64(y * fma(b, fma(b, fma(b, 0.16666666666666666, 0.5), 1.0), 1.0)))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -115.0], N[(x / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y * N[(b * N[(b * N[(b * 0.16666666666666666 + 0.5), $MachinePrecision] + 1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -115:\\
\;\;\;\;\frac{x}{y \cdot e^{b}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, \mathsf{fma}\left(b, 0.16666666666666666, 0.5\right), 1\right), 1\right)\right)}\\
\end{array}
\end{array}
if b < -115Initial program 100.0%
Taylor expanded in y around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f6485.5
Simplified85.5%
Taylor expanded in y around 0
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
neg-sub0N/A
--lowering--.f6474.2
Simplified74.2%
sub0-negN/A
exp-negN/A
un-div-invN/A
associate-/l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f6474.2
Applied egg-rr74.2%
if -115 < b Initial program 97.9%
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.f6464.7
Simplified64.7%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f6452.7
Simplified52.7%
Taylor expanded in b around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6450.8
Simplified50.8%
(FPCore (x y z t a b) :precision binary64 (if (<= b -180.0) (* x (/ (fma b (fma b 0.5 -1.0) 1.0) y)) (/ x (* a (fma y b y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -180.0) {
tmp = x * (fma(b, fma(b, 0.5, -1.0), 1.0) / y);
} else {
tmp = x / (a * fma(y, b, y));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -180.0) tmp = Float64(x * Float64(fma(b, fma(b, 0.5, -1.0), 1.0) / y)); else tmp = Float64(x / Float64(a * fma(y, b, y))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -180.0], N[(x * N[(N[(b * N[(b * 0.5 + -1.0), $MachinePrecision] + 1.0), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y * b + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -180:\\
\;\;\;\;x \cdot \frac{\mathsf{fma}\left(b, \mathsf{fma}\left(b, 0.5, -1\right), 1\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \mathsf{fma}\left(y, b, y\right)}\\
\end{array}
\end{array}
if b < -180Initial program 100.0%
Taylor expanded in y around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f6485.5
Simplified85.5%
Taylor expanded in y around 0
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
neg-sub0N/A
--lowering--.f6474.2
Simplified74.2%
Taylor expanded in b around 0
Simplified57.5%
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
accelerator-lowering-fma.f6466.7
Applied egg-rr66.7%
if -180 < b Initial program 97.9%
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.f6464.7
Simplified64.7%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f6452.7
Simplified52.7%
Taylor expanded in b around 0
distribute-lft-outN/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6436.8
Simplified36.8%
Final simplification43.9%
(FPCore (x y z t a b) :precision binary64 (if (<= b -11.0) (* (/ x y) (* b (fma b 0.5 -1.0))) (/ x (* a (fma y b y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -11.0) {
tmp = (x / y) * (b * fma(b, 0.5, -1.0));
} else {
tmp = x / (a * fma(y, b, y));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -11.0) tmp = Float64(Float64(x / y) * Float64(b * fma(b, 0.5, -1.0))); else tmp = Float64(x / Float64(a * fma(y, b, y))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -11.0], N[(N[(x / y), $MachinePrecision] * N[(b * N[(b * 0.5 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y * b + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -11:\\
\;\;\;\;\frac{x}{y} \cdot \left(b \cdot \mathsf{fma}\left(b, 0.5, -1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \mathsf{fma}\left(y, b, y\right)}\\
\end{array}
\end{array}
if b < -11Initial program 100.0%
Taylor expanded in y around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f6485.5
Simplified85.5%
Taylor expanded in y around 0
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
neg-sub0N/A
--lowering--.f6474.2
Simplified74.2%
Taylor expanded in b around 0
Simplified57.5%
Taylor expanded in b around inf
unpow2N/A
associate-*l*N/A
sub-negN/A
distribute-rgt-inN/A
distribute-lft-neg-outN/A
lft-mult-inverseN/A
sub-negN/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
*-commutativeN/A
accelerator-lowering-fma.f6457.5
Simplified57.5%
if -11 < b Initial program 97.9%
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.f6464.7
Simplified64.7%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f6452.7
Simplified52.7%
Taylor expanded in b around 0
distribute-lft-outN/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6436.8
Simplified36.8%
(FPCore (x y z t a b) :precision binary64 (if (<= b -35.0) (* x (/ (- 1.0 b) y)) (/ x (* a (fma y b y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -35.0) {
tmp = x * ((1.0 - b) / y);
} else {
tmp = x / (a * fma(y, b, y));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -35.0) tmp = Float64(x * Float64(Float64(1.0 - b) / y)); else tmp = Float64(x / Float64(a * fma(y, b, y))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -35.0], N[(x * N[(N[(1.0 - b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y * b + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -35:\\
\;\;\;\;x \cdot \frac{1 - b}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \mathsf{fma}\left(y, b, y\right)}\\
\end{array}
\end{array}
if b < -35Initial program 100.0%
Taylor expanded in y around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f6485.5
Simplified85.5%
Taylor expanded in y around 0
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
neg-sub0N/A
--lowering--.f6474.2
Simplified74.2%
Taylor expanded in b around 0
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
div-subN/A
unsub-negN/A
mul-1-negN/A
/-lowering-/.f64N/A
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
neg-mul-1N/A
unsub-negN/A
--lowering--.f6429.2
Simplified29.2%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6432.4
Applied egg-rr32.4%
if -35 < b Initial program 97.9%
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.f6464.7
Simplified64.7%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f6452.7
Simplified52.7%
Taylor expanded in b around 0
distribute-lft-outN/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6436.8
Simplified36.8%
Final simplification35.7%
(FPCore (x y z t a b) :precision binary64 (if (<= b -4.8e+24) (* 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 <= -4.8e+24) {
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 <= (-4.8d+24)) 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 <= -4.8e+24) {
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 <= -4.8e+24: 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 <= -4.8e+24) 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 <= -4.8e+24) 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, -4.8e+24], 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 -4.8 \cdot 10^{+24}:\\
\;\;\;\;x \cdot \frac{1 - b}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\end{array}
\end{array}
if b < -4.8000000000000001e24Initial program 100.0%
Taylor expanded in y around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f6485.2
Simplified85.2%
Taylor expanded in y around 0
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
neg-sub0N/A
--lowering--.f6473.8
Simplified73.8%
Taylor expanded in b around 0
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
div-subN/A
unsub-negN/A
mul-1-negN/A
/-lowering-/.f64N/A
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
neg-mul-1N/A
unsub-negN/A
--lowering--.f6429.7
Simplified29.7%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6432.9
Applied egg-rr32.9%
if -4.8000000000000001e24 < b Initial program 97.9%
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.f6464.9
Simplified64.9%
Taylor expanded in b around 0
Simplified60.2%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f6431.5
Simplified31.5%
Final simplification31.8%
(FPCore (x y z t a b) :precision binary64 (/ x (* y a)))
double code(double x, double y, double z, double t, double a, double b) {
return x / (y * a);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x / (y * a)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x / (y * a);
}
def code(x, y, z, t, a, b): return x / (y * a)
function code(x, y, z, t, a, b) return Float64(x / Float64(y * a)) end
function tmp = code(x, y, z, t, a, b) tmp = x / (y * a); end
code[x_, y_, z_, t_, a_, b_] := N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y \cdot a}
\end{array}
Initial program 98.4%
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.f6464.2
Simplified64.2%
Taylor expanded in b around 0
Simplified58.5%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f6429.3
Simplified29.3%
Final simplification29.3%
(FPCore (x y z t a b) :precision binary64 (/ x y))
double code(double x, double y, double z, double t, double a, double b) {
return x / y;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x / y;
}
def code(x, y, z, t, a, b): return x / y
function code(x, y, z, t, a, b) return Float64(x / y) end
function tmp = code(x, y, z, t, a, b) tmp = x / y; end
code[x_, y_, z_, t_, a_, b_] := N[(x / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y}
\end{array}
Initial program 98.4%
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-log68.3
Simplified68.3%
Taylor expanded in b around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f6446.8
Simplified46.8%
Taylor expanded in t around 0
/-lowering-/.f6412.2
Simplified12.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (pow a (- t 1.0)))
(t_2 (/ (* x (/ t_1 y)) (- (+ b 1.0) (* y (log z))))))
(if (< t -0.8845848504127471)
t_2
(if (< t 852031.2288374073)
(/ (* (/ x y) t_1) (exp (- b (* (log z) y))))
t_2))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = pow(a, (t - 1.0));
double t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * log(z)));
double tmp;
if (t < -0.8845848504127471) {
tmp = t_2;
} else if (t < 852031.2288374073) {
tmp = ((x / y) * t_1) / exp((b - (log(z) * y)));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = a ** (t - 1.0d0)
t_2 = (x * (t_1 / y)) / ((b + 1.0d0) - (y * log(z)))
if (t < (-0.8845848504127471d0)) then
tmp = t_2
else if (t < 852031.2288374073d0) then
tmp = ((x / y) * t_1) / exp((b - (log(z) * y)))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = Math.pow(a, (t - 1.0));
double t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * Math.log(z)));
double tmp;
if (t < -0.8845848504127471) {
tmp = t_2;
} else if (t < 852031.2288374073) {
tmp = ((x / y) * t_1) / Math.exp((b - (Math.log(z) * y)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = math.pow(a, (t - 1.0)) t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * math.log(z))) tmp = 0 if t < -0.8845848504127471: tmp = t_2 elif t < 852031.2288374073: tmp = ((x / y) * t_1) / math.exp((b - (math.log(z) * y))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = a ^ Float64(t - 1.0) t_2 = Float64(Float64(x * Float64(t_1 / y)) / Float64(Float64(b + 1.0) - Float64(y * log(z)))) tmp = 0.0 if (t < -0.8845848504127471) tmp = t_2; elseif (t < 852031.2288374073) tmp = Float64(Float64(Float64(x / y) * t_1) / exp(Float64(b - Float64(log(z) * y)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a ^ (t - 1.0); t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * log(z))); tmp = 0.0; if (t < -0.8845848504127471) tmp = t_2; elseif (t < 852031.2288374073) tmp = ((x / y) * t_1) / exp((b - (log(z) * y))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision] / N[(N[(b + 1.0), $MachinePrecision] - N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -0.8845848504127471], t$95$2, If[Less[t, 852031.2288374073], N[(N[(N[(x / y), $MachinePrecision] * t$95$1), $MachinePrecision] / N[Exp[N[(b - N[(N[Log[z], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {a}^{\left(t - 1\right)}\\
t_2 := \frac{x \cdot \frac{t\_1}{y}}{\left(b + 1\right) - y \cdot \log z}\\
\mathbf{if}\;t < -0.8845848504127471:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t < 852031.2288374073:\\
\;\;\;\;\frac{\frac{x}{y} \cdot t\_1}{e^{b - \log z \cdot y}}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024196
(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))