
(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 22 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 (* y (exp (- b (fma y (log z) (* (+ t -1.0) (log a))))))))
double code(double x, double y, double z, double t, double a, double b) {
return x / (y * exp((b - fma(y, log(z), ((t + -1.0) * log(a))))));
}
function code(x, y, z, t, a, b) return Float64(x / Float64(y * exp(Float64(b - fma(y, log(z), Float64(Float64(t + -1.0) * log(a))))))) end
code[x_, y_, z_, t_, a_, b_] := N[(x / N[(y * N[Exp[N[(b - N[(y * N[Log[z], $MachinePrecision] + N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y \cdot e^{b - \mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a\right)}}
\end{array}
Initial program 97.3%
lift-log.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-log.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-exp.f64N/A
lift-*.f64N/A
remove-double-negN/A
Applied rewrites97.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (exp (- (+ (* y (log z)) (* (+ t -1.0) (log a))) b))) y))
(t_2
(/
(+ (/ (* x 2.0) (* y a)) (* (/ x (* y (* b a))) (- -4.0 (/ -4.0 b))))
(* b b))))
(if (<= t_1 (- INFINITY))
t_2
(if (<= t_1 5e+283)
(/ 1.0 (* (fma a (fma b (* b 0.5) b) a) (/ y x)))
t_2))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * exp((((y * log(z)) + ((t + -1.0) * log(a))) - b))) / y;
double t_2 = (((x * 2.0) / (y * a)) + ((x / (y * (b * a))) * (-4.0 - (-4.0 / b)))) / (b * b);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = t_2;
} else if (t_1 <= 5e+283) {
tmp = 1.0 / (fma(a, fma(b, (b * 0.5), b), a) * (y / x));
} 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(Float64(t + -1.0) * log(a))) - b))) / y) t_2 = Float64(Float64(Float64(Float64(x * 2.0) / Float64(y * a)) + Float64(Float64(x / Float64(y * Float64(b * a))) * Float64(-4.0 - Float64(-4.0 / b)))) / Float64(b * b)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = t_2; elseif (t_1 <= 5e+283) tmp = Float64(1.0 / Float64(fma(a, fma(b, Float64(b * 0.5), b), a) * Float64(y / x))); 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[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(x * 2.0), $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision] + N[(N[(x / N[(y * N[(b * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(-4.0 - N[(-4.0 / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(b * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], t$95$2, If[LessEqual[t$95$1, 5e+283], N[(1.0 / N[(N[(a * N[(b * N[(b * 0.5), $MachinePrecision] + b), $MachinePrecision] + a), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot e^{\left(y \cdot \log z + \left(t + -1\right) \cdot \log a\right) - b}}{y}\\
t_2 := \frac{\frac{x \cdot 2}{y \cdot a} + \frac{x}{y \cdot \left(b \cdot a\right)} \cdot \left(-4 - \frac{-4}{b}\right)}{b \cdot b}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+283}:\\
\;\;\;\;\frac{1}{\mathsf{fma}\left(a, \mathsf{fma}\left(b, b \cdot 0.5, b\right), a\right) \cdot \frac{y}{x}}\\
\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 5.0000000000000004e283 < (/.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 t around 0
associate-/l*N/A
lower-*.f64N/A
exp-diffN/A
associate-/l/N/A
lower-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
rem-exp-logN/A
lower-*.f64N/A
lower-exp.f6468.3
Applied rewrites68.3%
Taylor expanded in b around 0
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6449.8
Applied rewrites49.8%
Taylor expanded in y around 0
distribute-rgt-inN/A
*-lft-identityN/A
associate-*l*N/A
+-commutativeN/A
distribute-rgt1-inN/A
associate-*r*N/A
lower-/.f64N/A
*-commutativeN/A
*-lft-identityN/A
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
associate-*l*N/A
distribute-rgt-inN/A
Applied rewrites17.7%
Taylor expanded in b around inf
Applied rewrites44.1%
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) < 5.0000000000000004e283Initial program 94.8%
Taylor expanded in t around 0
associate-/l*N/A
lower-*.f64N/A
exp-diffN/A
associate-/l/N/A
lower-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
rem-exp-logN/A
lower-*.f64N/A
lower-exp.f6467.5
Applied rewrites67.5%
Taylor expanded in b around 0
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6465.1
Applied rewrites65.1%
Taylor expanded in y around 0
distribute-rgt-inN/A
*-lft-identityN/A
associate-*l*N/A
+-commutativeN/A
distribute-rgt1-inN/A
associate-*r*N/A
lower-/.f64N/A
*-commutativeN/A
*-lft-identityN/A
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
associate-*l*N/A
distribute-rgt-inN/A
Applied rewrites56.7%
lift-*.f64N/A
lift-fma.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
remove-double-negN/A
*-rgt-identityN/A
remove-double-negN/A
lift-*.f64N/A
frac-timesN/A
clear-numN/A
frac-timesN/A
metadata-evalN/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f6457.9
Applied rewrites57.9%
Final simplification51.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (exp (- (+ (* y (log z)) (* (+ t -1.0) (log a))) b))) y))
(t_2 (/ x (* y (* 0.5 (* a (* b b)))))))
(if (<= t_1 (- INFINITY))
t_2
(if (<= t_1 5e+283)
(/ 1.0 (* (fma a (fma b (* b 0.5) b) a) (/ y x)))
t_2))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * exp((((y * log(z)) + ((t + -1.0) * log(a))) - b))) / y;
double t_2 = x / (y * (0.5 * (a * (b * b))));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = t_2;
} else if (t_1 <= 5e+283) {
tmp = 1.0 / (fma(a, fma(b, (b * 0.5), b), a) * (y / x));
} 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(Float64(t + -1.0) * log(a))) - b))) / y) t_2 = Float64(x / Float64(y * Float64(0.5 * Float64(a * Float64(b * b))))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = t_2; elseif (t_1 <= 5e+283) tmp = Float64(1.0 / Float64(fma(a, fma(b, Float64(b * 0.5), b), a) * Float64(y / x))); 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[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(y * N[(0.5 * N[(a * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], t$95$2, If[LessEqual[t$95$1, 5e+283], N[(1.0 / N[(N[(a * N[(b * N[(b * 0.5), $MachinePrecision] + b), $MachinePrecision] + a), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot e^{\left(y \cdot \log z + \left(t + -1\right) \cdot \log a\right) - b}}{y}\\
t_2 := \frac{x}{y \cdot \left(0.5 \cdot \left(a \cdot \left(b \cdot b\right)\right)\right)}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+283}:\\
\;\;\;\;\frac{1}{\mathsf{fma}\left(a, \mathsf{fma}\left(b, b \cdot 0.5, b\right), a\right) \cdot \frac{y}{x}}\\
\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 5.0000000000000004e283 < (/.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 t around 0
associate-/l*N/A
lower-*.f64N/A
exp-diffN/A
associate-/l/N/A
lower-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
rem-exp-logN/A
lower-*.f64N/A
lower-exp.f6468.3
Applied rewrites68.3%
Taylor expanded in b around 0
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6449.8
Applied rewrites49.8%
Taylor expanded in y around 0
distribute-rgt-inN/A
*-lft-identityN/A
associate-*l*N/A
+-commutativeN/A
distribute-rgt1-inN/A
associate-*r*N/A
lower-/.f64N/A
*-commutativeN/A
*-lft-identityN/A
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
associate-*l*N/A
distribute-rgt-inN/A
Applied rewrites17.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6441.0
Applied rewrites41.0%
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) < 5.0000000000000004e283Initial program 94.8%
Taylor expanded in t around 0
associate-/l*N/A
lower-*.f64N/A
exp-diffN/A
associate-/l/N/A
lower-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
rem-exp-logN/A
lower-*.f64N/A
lower-exp.f6467.5
Applied rewrites67.5%
Taylor expanded in b around 0
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6465.1
Applied rewrites65.1%
Taylor expanded in y around 0
distribute-rgt-inN/A
*-lft-identityN/A
associate-*l*N/A
+-commutativeN/A
distribute-rgt1-inN/A
associate-*r*N/A
lower-/.f64N/A
*-commutativeN/A
*-lft-identityN/A
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
associate-*l*N/A
distribute-rgt-inN/A
Applied rewrites56.7%
lift-*.f64N/A
lift-fma.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
remove-double-negN/A
*-rgt-identityN/A
remove-double-negN/A
lift-*.f64N/A
frac-timesN/A
clear-numN/A
frac-timesN/A
metadata-evalN/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f6457.9
Applied rewrites57.9%
Final simplification49.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (exp (- (+ (* y (log z)) (* (+ t -1.0) (log a))) b))) y))
(t_2 (/ x (* y (* 0.5 (* a (* b b)))))))
(if (<= t_1 (- INFINITY))
t_2
(if (<= t_1 5e+283) (/ x (* y (fma a (fma b (* b 0.5) b) a))) t_2))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * exp((((y * log(z)) + ((t + -1.0) * log(a))) - b))) / y;
double t_2 = x / (y * (0.5 * (a * (b * b))));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = t_2;
} else if (t_1 <= 5e+283) {
tmp = x / (y * fma(a, fma(b, (b * 0.5), b), a));
} 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(Float64(t + -1.0) * log(a))) - b))) / y) t_2 = Float64(x / Float64(y * Float64(0.5 * Float64(a * Float64(b * b))))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = t_2; elseif (t_1 <= 5e+283) tmp = Float64(x / Float64(y * fma(a, fma(b, Float64(b * 0.5), b), a))); 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[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(y * N[(0.5 * N[(a * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], t$95$2, If[LessEqual[t$95$1, 5e+283], N[(x / N[(y * N[(a * N[(b * N[(b * 0.5), $MachinePrecision] + b), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot e^{\left(y \cdot \log z + \left(t + -1\right) \cdot \log a\right) - b}}{y}\\
t_2 := \frac{x}{y \cdot \left(0.5 \cdot \left(a \cdot \left(b \cdot b\right)\right)\right)}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+283}:\\
\;\;\;\;\frac{x}{y \cdot \mathsf{fma}\left(a, \mathsf{fma}\left(b, b \cdot 0.5, b\right), a\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 5.0000000000000004e283 < (/.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 t around 0
associate-/l*N/A
lower-*.f64N/A
exp-diffN/A
associate-/l/N/A
lower-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
rem-exp-logN/A
lower-*.f64N/A
lower-exp.f6468.3
Applied rewrites68.3%
Taylor expanded in b around 0
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6449.8
Applied rewrites49.8%
Taylor expanded in y around 0
distribute-rgt-inN/A
*-lft-identityN/A
associate-*l*N/A
+-commutativeN/A
distribute-rgt1-inN/A
associate-*r*N/A
lower-/.f64N/A
*-commutativeN/A
*-lft-identityN/A
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
associate-*l*N/A
distribute-rgt-inN/A
Applied rewrites17.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6441.0
Applied rewrites41.0%
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) < 5.0000000000000004e283Initial program 94.8%
Taylor expanded in t around 0
associate-/l*N/A
lower-*.f64N/A
exp-diffN/A
associate-/l/N/A
lower-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
rem-exp-logN/A
lower-*.f64N/A
lower-exp.f6467.5
Applied rewrites67.5%
Taylor expanded in b around 0
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6465.1
Applied rewrites65.1%
Taylor expanded in y around 0
distribute-rgt-inN/A
*-lft-identityN/A
associate-*l*N/A
+-commutativeN/A
distribute-rgt1-inN/A
associate-*r*N/A
lower-/.f64N/A
*-commutativeN/A
*-lft-identityN/A
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
associate-*l*N/A
distribute-rgt-inN/A
Applied rewrites56.7%
Final simplification49.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (+ t -1.0) (log a)))
(t_2 (/ (* x (exp (- (* t (log a)) b))) y)))
(if (<= t_1 -50000000000000.0)
t_2
(if (<= t_1 -442.0)
(*
x
(/
(/ (pow z y) a)
(fma b (fma b (fma y 0.5 (* 0.16666666666666666 (* y b))) y) y)))
(if (<= t_1 5e+51) (/ (* x (exp (- (* y (log z)) b))) y) t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t + -1.0) * log(a);
double t_2 = (x * exp(((t * log(a)) - b))) / y;
double tmp;
if (t_1 <= -50000000000000.0) {
tmp = t_2;
} else if (t_1 <= -442.0) {
tmp = x * ((pow(z, y) / a) / fma(b, fma(b, fma(y, 0.5, (0.16666666666666666 * (y * b))), y), y));
} else if (t_1 <= 5e+51) {
tmp = (x * exp(((y * log(z)) - b))) / y;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t + -1.0) * log(a)) t_2 = Float64(Float64(x * exp(Float64(Float64(t * log(a)) - b))) / y) tmp = 0.0 if (t_1 <= -50000000000000.0) tmp = t_2; elseif (t_1 <= -442.0) tmp = Float64(x * Float64(Float64((z ^ y) / a) / fma(b, fma(b, fma(y, 0.5, Float64(0.16666666666666666 * Float64(y * b))), y), y))); elseif (t_1 <= 5e+51) tmp = Float64(Float64(x * exp(Float64(Float64(y * log(z)) - b))) / y); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[Exp[N[(N[(t * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t$95$1, -50000000000000.0], t$95$2, If[LessEqual[t$95$1, -442.0], N[(x * N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] / N[(b * N[(b * N[(y * 0.5 + N[(0.16666666666666666 * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+51], N[(N[(x * N[Exp[N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t + -1\right) \cdot \log a\\
t_2 := \frac{x \cdot e^{t \cdot \log a - b}}{y}\\
\mathbf{if}\;t\_1 \leq -50000000000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq -442:\\
\;\;\;\;x \cdot \frac{\frac{{z}^{y}}{a}}{\mathsf{fma}\left(b, \mathsf{fma}\left(b, \mathsf{fma}\left(y, 0.5, 0.16666666666666666 \cdot \left(y \cdot b\right)\right), y\right), y\right)}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+51}:\\
\;\;\;\;\frac{x \cdot e^{y \cdot \log z - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -5e13 or 5e51 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) Initial program 100.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log94.5
Applied rewrites94.5%
if -5e13 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -442Initial program 86.6%
Taylor expanded in t around 0
associate-/l*N/A
lower-*.f64N/A
exp-diffN/A
associate-/l/N/A
lower-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
rem-exp-logN/A
lower-*.f64N/A
lower-exp.f6495.6
Applied rewrites95.6%
Taylor expanded in b around 0
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6485.0
Applied rewrites85.0%
if -442 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 5e51Initial program 97.8%
Taylor expanded in y around inf
lower-*.f64N/A
lower-log.f6483.8
Applied rewrites83.8%
Final simplification88.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (+ t -1.0) (log a))))
(if (<= t_1 -50000000000000.0)
(/ x (* y (pow a (- 1.0 t))))
(if (<= t_1 -315.0)
(*
x
(/
(/ (pow z y) a)
(fma b (fma b (fma y 0.5 (* 0.16666666666666666 (* y b))) y) y)))
(if (<= t_1 5e+51)
(/ (/ (* x (pow z y)) y) a)
(/ x (* y (exp (* (log a) (- t))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t + -1.0) * log(a);
double tmp;
if (t_1 <= -50000000000000.0) {
tmp = x / (y * pow(a, (1.0 - t)));
} else if (t_1 <= -315.0) {
tmp = x * ((pow(z, y) / a) / fma(b, fma(b, fma(y, 0.5, (0.16666666666666666 * (y * b))), y), y));
} else if (t_1 <= 5e+51) {
tmp = ((x * pow(z, y)) / y) / a;
} else {
tmp = x / (y * exp((log(a) * -t)));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t + -1.0) * log(a)) tmp = 0.0 if (t_1 <= -50000000000000.0) tmp = Float64(x / Float64(y * (a ^ Float64(1.0 - t)))); elseif (t_1 <= -315.0) tmp = Float64(x * Float64(Float64((z ^ y) / a) / fma(b, fma(b, fma(y, 0.5, Float64(0.16666666666666666 * Float64(y * b))), y), y))); elseif (t_1 <= 5e+51) tmp = Float64(Float64(Float64(x * (z ^ y)) / y) / a); else tmp = Float64(x / Float64(y * exp(Float64(log(a) * Float64(-t))))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -50000000000000.0], N[(x / N[(y * N[Power[a, N[(1.0 - t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -315.0], N[(x * N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] / N[(b * N[(b * N[(y * 0.5 + N[(0.16666666666666666 * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+51], N[(N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] / a), $MachinePrecision], N[(x / N[(y * N[Exp[N[(N[Log[a], $MachinePrecision] * (-t)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t + -1\right) \cdot \log a\\
\mathbf{if}\;t\_1 \leq -50000000000000:\\
\;\;\;\;\frac{x}{y \cdot {a}^{\left(1 - t\right)}}\\
\mathbf{elif}\;t\_1 \leq -315:\\
\;\;\;\;x \cdot \frac{\frac{{z}^{y}}{a}}{\mathsf{fma}\left(b, \mathsf{fma}\left(b, \mathsf{fma}\left(y, 0.5, 0.16666666666666666 \cdot \left(y \cdot b\right)\right), y\right), y\right)}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+51}:\\
\;\;\;\;\frac{\frac{x \cdot {z}^{y}}{y}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot e^{\log a \cdot \left(-t\right)}}\\
\end{array}
\end{array}
if (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -5e13Initial program 100.0%
lift-log.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-log.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-exp.f64N/A
lift-*.f64N/A
remove-double-negN/A
Applied rewrites100.0%
Taylor expanded in y around 0
lower-*.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6496.5
Applied rewrites96.5%
Taylor expanded in b around 0
lower-/.f64N/A
lower-*.f64N/A
distribute-rgt-neg-inN/A
exp-to-powN/A
lower-pow.f64N/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
mul-1-negN/A
metadata-evalN/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
lower--.f6489.6
Applied rewrites89.6%
if -5e13 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -315Initial program 89.0%
Taylor expanded in t around 0
associate-/l*N/A
lower-*.f64N/A
exp-diffN/A
associate-/l/N/A
lower-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
rem-exp-logN/A
lower-*.f64N/A
lower-exp.f6490.8
Applied rewrites90.8%
Taylor expanded in b around 0
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6479.5
Applied rewrites79.5%
if -315 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 5e51Initial program 98.3%
Taylor expanded in t around 0
associate-/l*N/A
lower-*.f64N/A
exp-diffN/A
associate-/l/N/A
lower-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
rem-exp-logN/A
lower-*.f64N/A
lower-exp.f6477.3
Applied rewrites77.3%
Taylor expanded in b around 0
lower-/.f64N/A
lower-pow.f64N/A
*-commutativeN/A
lower-*.f6472.7
Applied rewrites72.7%
lift-pow.f64N/A
lift-*.f64N/A
associate-*r/N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/r*N/A
div-invN/A
lift-/.f64N/A
*-commutativeN/A
lower-/.f64N/A
*-commutativeN/A
lift-/.f64N/A
div-invN/A
lower-/.f6480.0
Applied rewrites80.0%
if 5e51 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) Initial program 100.0%
lift-log.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-log.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-exp.f64N/A
lift-*.f64N/A
remove-double-negN/A
Applied rewrites100.0%
Taylor expanded in t around inf
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-log.f6484.3
Applied rewrites84.3%
Final simplification82.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (+ t -1.0) (log a))) (t_2 (/ x (* y (pow a (- 1.0 t))))))
(if (<= t_1 -50000000000000.0)
t_2
(if (<= t_1 -315.0)
(*
x
(/
(/ (pow z y) a)
(fma b (fma b (fma y 0.5 (* 0.16666666666666666 (* y b))) y) y)))
(if (<= t_1 5e+51) (/ (/ (* x (pow z y)) y) a) t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t + -1.0) * log(a);
double t_2 = x / (y * pow(a, (1.0 - t)));
double tmp;
if (t_1 <= -50000000000000.0) {
tmp = t_2;
} else if (t_1 <= -315.0) {
tmp = x * ((pow(z, y) / a) / fma(b, fma(b, fma(y, 0.5, (0.16666666666666666 * (y * b))), y), y));
} else if (t_1 <= 5e+51) {
tmp = ((x * pow(z, y)) / y) / a;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t + -1.0) * log(a)) t_2 = Float64(x / Float64(y * (a ^ Float64(1.0 - t)))) tmp = 0.0 if (t_1 <= -50000000000000.0) tmp = t_2; elseif (t_1 <= -315.0) tmp = Float64(x * Float64(Float64((z ^ y) / a) / fma(b, fma(b, fma(y, 0.5, Float64(0.16666666666666666 * Float64(y * b))), y), y))); elseif (t_1 <= 5e+51) tmp = Float64(Float64(Float64(x * (z ^ y)) / y) / a); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(y * N[Power[a, N[(1.0 - t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -50000000000000.0], t$95$2, If[LessEqual[t$95$1, -315.0], N[(x * N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] / N[(b * N[(b * N[(y * 0.5 + N[(0.16666666666666666 * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+51], N[(N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] / a), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t + -1\right) \cdot \log a\\
t_2 := \frac{x}{y \cdot {a}^{\left(1 - t\right)}}\\
\mathbf{if}\;t\_1 \leq -50000000000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq -315:\\
\;\;\;\;x \cdot \frac{\frac{{z}^{y}}{a}}{\mathsf{fma}\left(b, \mathsf{fma}\left(b, \mathsf{fma}\left(y, 0.5, 0.16666666666666666 \cdot \left(y \cdot b\right)\right), y\right), y\right)}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+51}:\\
\;\;\;\;\frac{\frac{x \cdot {z}^{y}}{y}}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -5e13 or 5e51 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) Initial program 100.0%
lift-log.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-log.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-exp.f64N/A
lift-*.f64N/A
remove-double-negN/A
Applied rewrites100.0%
Taylor expanded in y around 0
lower-*.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6494.5
Applied rewrites94.5%
Taylor expanded in b around 0
lower-/.f64N/A
lower-*.f64N/A
distribute-rgt-neg-inN/A
exp-to-powN/A
lower-pow.f64N/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
mul-1-negN/A
metadata-evalN/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
lower--.f6487.1
Applied rewrites87.1%
if -5e13 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -315Initial program 89.0%
Taylor expanded in t around 0
associate-/l*N/A
lower-*.f64N/A
exp-diffN/A
associate-/l/N/A
lower-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
rem-exp-logN/A
lower-*.f64N/A
lower-exp.f6490.8
Applied rewrites90.8%
Taylor expanded in b around 0
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6479.5
Applied rewrites79.5%
if -315 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 5e51Initial program 98.3%
Taylor expanded in t around 0
associate-/l*N/A
lower-*.f64N/A
exp-diffN/A
associate-/l/N/A
lower-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
rem-exp-logN/A
lower-*.f64N/A
lower-exp.f6477.3
Applied rewrites77.3%
Taylor expanded in b around 0
lower-/.f64N/A
lower-pow.f64N/A
*-commutativeN/A
lower-*.f6472.7
Applied rewrites72.7%
lift-pow.f64N/A
lift-*.f64N/A
associate-*r/N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/r*N/A
div-invN/A
lift-/.f64N/A
*-commutativeN/A
lower-/.f64N/A
*-commutativeN/A
lift-/.f64N/A
div-invN/A
lower-/.f6480.0
Applied rewrites80.0%
Final simplification82.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (+ t -1.0) (log a))) (t_2 (/ x (* y (pow a (- 1.0 t))))))
(if (<= t_1 -50000000000000.0)
t_2
(if (<= t_1 -315.0)
(* x (/ (/ (pow z y) a) (fma b (fma 0.5 (* y b) y) y)))
(if (<= t_1 5e+51) (/ (/ (* x (pow z y)) y) a) t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t + -1.0) * log(a);
double t_2 = x / (y * pow(a, (1.0 - t)));
double tmp;
if (t_1 <= -50000000000000.0) {
tmp = t_2;
} else if (t_1 <= -315.0) {
tmp = x * ((pow(z, y) / a) / fma(b, fma(0.5, (y * b), y), y));
} else if (t_1 <= 5e+51) {
tmp = ((x * pow(z, y)) / y) / a;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t + -1.0) * log(a)) t_2 = Float64(x / Float64(y * (a ^ Float64(1.0 - t)))) tmp = 0.0 if (t_1 <= -50000000000000.0) tmp = t_2; elseif (t_1 <= -315.0) tmp = Float64(x * Float64(Float64((z ^ y) / a) / fma(b, fma(0.5, Float64(y * b), y), y))); elseif (t_1 <= 5e+51) tmp = Float64(Float64(Float64(x * (z ^ y)) / y) / a); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(y * N[Power[a, N[(1.0 - t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -50000000000000.0], t$95$2, If[LessEqual[t$95$1, -315.0], N[(x * N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] / N[(b * N[(0.5 * N[(y * b), $MachinePrecision] + y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+51], N[(N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] / a), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t + -1\right) \cdot \log a\\
t_2 := \frac{x}{y \cdot {a}^{\left(1 - t\right)}}\\
\mathbf{if}\;t\_1 \leq -50000000000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq -315:\\
\;\;\;\;x \cdot \frac{\frac{{z}^{y}}{a}}{\mathsf{fma}\left(b, \mathsf{fma}\left(0.5, y \cdot b, y\right), y\right)}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+51}:\\
\;\;\;\;\frac{\frac{x \cdot {z}^{y}}{y}}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -5e13 or 5e51 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) Initial program 100.0%
lift-log.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-log.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-exp.f64N/A
lift-*.f64N/A
remove-double-negN/A
Applied rewrites100.0%
Taylor expanded in y around 0
lower-*.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6494.5
Applied rewrites94.5%
Taylor expanded in b around 0
lower-/.f64N/A
lower-*.f64N/A
distribute-rgt-neg-inN/A
exp-to-powN/A
lower-pow.f64N/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
mul-1-negN/A
metadata-evalN/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
lower--.f6487.1
Applied rewrites87.1%
if -5e13 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -315Initial program 89.0%
Taylor expanded in t around 0
associate-/l*N/A
lower-*.f64N/A
exp-diffN/A
associate-/l/N/A
lower-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
rem-exp-logN/A
lower-*.f64N/A
lower-exp.f6490.8
Applied rewrites90.8%
Taylor expanded in b around 0
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6477.4
Applied rewrites77.4%
if -315 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 5e51Initial program 98.3%
Taylor expanded in t around 0
associate-/l*N/A
lower-*.f64N/A
exp-diffN/A
associate-/l/N/A
lower-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
rem-exp-logN/A
lower-*.f64N/A
lower-exp.f6477.3
Applied rewrites77.3%
Taylor expanded in b around 0
lower-/.f64N/A
lower-pow.f64N/A
*-commutativeN/A
lower-*.f6472.7
Applied rewrites72.7%
lift-pow.f64N/A
lift-*.f64N/A
associate-*r/N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/r*N/A
div-invN/A
lift-/.f64N/A
*-commutativeN/A
lower-/.f64N/A
*-commutativeN/A
lift-/.f64N/A
div-invN/A
lower-/.f6480.0
Applied rewrites80.0%
Final simplification82.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (+ t -1.0) (log a))) (t_2 (/ x (* y (pow a (- 1.0 t))))))
(if (<= t_1 -2000000000000.0)
t_2
(if (<= t_1 5e+51) (/ (/ (* x (pow z y)) y) a) t_2))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t + -1.0) * log(a);
double t_2 = x / (y * pow(a, (1.0 - t)));
double tmp;
if (t_1 <= -2000000000000.0) {
tmp = t_2;
} else if (t_1 <= 5e+51) {
tmp = ((x * pow(z, y)) / y) / a;
} 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 = (t + (-1.0d0)) * log(a)
t_2 = x / (y * (a ** (1.0d0 - t)))
if (t_1 <= (-2000000000000.0d0)) then
tmp = t_2
else if (t_1 <= 5d+51) then
tmp = ((x * (z ** y)) / y) / a
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 = (t + -1.0) * Math.log(a);
double t_2 = x / (y * Math.pow(a, (1.0 - t)));
double tmp;
if (t_1 <= -2000000000000.0) {
tmp = t_2;
} else if (t_1 <= 5e+51) {
tmp = ((x * Math.pow(z, y)) / y) / a;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t + -1.0) * math.log(a) t_2 = x / (y * math.pow(a, (1.0 - t))) tmp = 0 if t_1 <= -2000000000000.0: tmp = t_2 elif t_1 <= 5e+51: tmp = ((x * math.pow(z, y)) / y) / a else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t + -1.0) * log(a)) t_2 = Float64(x / Float64(y * (a ^ Float64(1.0 - t)))) tmp = 0.0 if (t_1 <= -2000000000000.0) tmp = t_2; elseif (t_1 <= 5e+51) tmp = Float64(Float64(Float64(x * (z ^ y)) / y) / a); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t + -1.0) * log(a); t_2 = x / (y * (a ^ (1.0 - t))); tmp = 0.0; if (t_1 <= -2000000000000.0) tmp = t_2; elseif (t_1 <= 5e+51) tmp = ((x * (z ^ y)) / y) / a; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(y * N[Power[a, N[(1.0 - t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2000000000000.0], t$95$2, If[LessEqual[t$95$1, 5e+51], N[(N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] / a), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t + -1\right) \cdot \log a\\
t_2 := \frac{x}{y \cdot {a}^{\left(1 - t\right)}}\\
\mathbf{if}\;t\_1 \leq -2000000000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+51}:\\
\;\;\;\;\frac{\frac{x \cdot {z}^{y}}{y}}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -2e12 or 5e51 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) Initial program 100.0%
lift-log.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-log.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-exp.f64N/A
lift-*.f64N/A
remove-double-negN/A
Applied rewrites100.0%
Taylor expanded in y around 0
lower-*.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6494.5
Applied rewrites94.5%
Taylor expanded in b around 0
lower-/.f64N/A
lower-*.f64N/A
distribute-rgt-neg-inN/A
exp-to-powN/A
lower-pow.f64N/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
mul-1-negN/A
metadata-evalN/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
lower--.f6487.2
Applied rewrites87.2%
if -2e12 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 5e51Initial program 95.3%
Taylor expanded in t around 0
associate-/l*N/A
lower-*.f64N/A
exp-diffN/A
associate-/l/N/A
lower-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
rem-exp-logN/A
lower-*.f64N/A
lower-exp.f6481.6
Applied rewrites81.6%
Taylor expanded in b around 0
lower-/.f64N/A
lower-pow.f64N/A
*-commutativeN/A
lower-*.f6467.3
Applied rewrites67.3%
lift-pow.f64N/A
lift-*.f64N/A
associate-*r/N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/r*N/A
div-invN/A
lift-/.f64N/A
*-commutativeN/A
lower-/.f64N/A
*-commutativeN/A
lift-/.f64N/A
div-invN/A
lower-/.f6475.7
Applied rewrites75.7%
Final simplification80.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (+ t -1.0) (log a))) (t_2 (/ x (* y (pow a (- 1.0 t))))))
(if (<= t_1 -2000000000000.0)
t_2
(if (<= t_1 5e+51) (/ (/ (* x (pow z y)) a) y) t_2))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t + -1.0) * log(a);
double t_2 = x / (y * pow(a, (1.0 - t)));
double tmp;
if (t_1 <= -2000000000000.0) {
tmp = t_2;
} else if (t_1 <= 5e+51) {
tmp = ((x * pow(z, y)) / a) / y;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (t + (-1.0d0)) * log(a)
t_2 = x / (y * (a ** (1.0d0 - t)))
if (t_1 <= (-2000000000000.0d0)) then
tmp = t_2
else if (t_1 <= 5d+51) then
tmp = ((x * (z ** y)) / a) / y
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t + -1.0) * Math.log(a);
double t_2 = x / (y * Math.pow(a, (1.0 - t)));
double tmp;
if (t_1 <= -2000000000000.0) {
tmp = t_2;
} else if (t_1 <= 5e+51) {
tmp = ((x * Math.pow(z, y)) / a) / y;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t + -1.0) * math.log(a) t_2 = x / (y * math.pow(a, (1.0 - t))) tmp = 0 if t_1 <= -2000000000000.0: tmp = t_2 elif t_1 <= 5e+51: tmp = ((x * math.pow(z, y)) / a) / y else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t + -1.0) * log(a)) t_2 = Float64(x / Float64(y * (a ^ Float64(1.0 - t)))) tmp = 0.0 if (t_1 <= -2000000000000.0) tmp = t_2; elseif (t_1 <= 5e+51) tmp = Float64(Float64(Float64(x * (z ^ y)) / a) / y); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t + -1.0) * log(a); t_2 = x / (y * (a ^ (1.0 - t))); tmp = 0.0; if (t_1 <= -2000000000000.0) tmp = t_2; elseif (t_1 <= 5e+51) tmp = ((x * (z ^ y)) / a) / y; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(y * N[Power[a, N[(1.0 - t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2000000000000.0], t$95$2, If[LessEqual[t$95$1, 5e+51], N[(N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t + -1\right) \cdot \log a\\
t_2 := \frac{x}{y \cdot {a}^{\left(1 - t\right)}}\\
\mathbf{if}\;t\_1 \leq -2000000000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+51}:\\
\;\;\;\;\frac{\frac{x \cdot {z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -2e12 or 5e51 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) Initial program 100.0%
lift-log.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-log.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-exp.f64N/A
lift-*.f64N/A
remove-double-negN/A
Applied rewrites100.0%
Taylor expanded in y around 0
lower-*.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6494.5
Applied rewrites94.5%
Taylor expanded in b around 0
lower-/.f64N/A
lower-*.f64N/A
distribute-rgt-neg-inN/A
exp-to-powN/A
lower-pow.f64N/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
mul-1-negN/A
metadata-evalN/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
lower--.f6487.2
Applied rewrites87.2%
if -2e12 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 5e51Initial program 95.3%
Taylor expanded in t around 0
associate-/l*N/A
lower-*.f64N/A
exp-diffN/A
associate-/l/N/A
lower-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
rem-exp-logN/A
lower-*.f64N/A
lower-exp.f6481.6
Applied rewrites81.6%
Taylor expanded in b around 0
lower-/.f64N/A
lower-pow.f64N/A
*-commutativeN/A
lower-*.f6467.3
Applied rewrites67.3%
lift-pow.f64N/A
lift-*.f64N/A
associate-*r/N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/r*N/A
lift-*.f64N/A
associate-*r/N/A
lift-/.f64N/A
lower-/.f64N/A
lift-/.f64N/A
associate-*r/N/A
lift-*.f64N/A
lower-/.f6475.1
Applied rewrites75.1%
Final simplification80.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (exp (- (* y (log z)) b))) y)))
(if (<= y -3.5e+47)
t_1
(if (<= y 0.106) (/ x (* y (exp (- b (* (+ t -1.0) (log a)))))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * exp(((y * log(z)) - b))) / y;
double tmp;
if (y <= -3.5e+47) {
tmp = t_1;
} else if (y <= 0.106) {
tmp = x / (y * exp((b - ((t + -1.0) * log(a)))));
} 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 * exp(((y * log(z)) - b))) / y
if (y <= (-3.5d+47)) then
tmp = t_1
else if (y <= 0.106d0) then
tmp = x / (y * exp((b - ((t + (-1.0d0)) * log(a)))))
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.exp(((y * Math.log(z)) - b))) / y;
double tmp;
if (y <= -3.5e+47) {
tmp = t_1;
} else if (y <= 0.106) {
tmp = x / (y * Math.exp((b - ((t + -1.0) * Math.log(a)))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x * math.exp(((y * math.log(z)) - b))) / y tmp = 0 if y <= -3.5e+47: tmp = t_1 elif y <= 0.106: tmp = x / (y * math.exp((b - ((t + -1.0) * math.log(a))))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * exp(Float64(Float64(y * log(z)) - b))) / y) tmp = 0.0 if (y <= -3.5e+47) tmp = t_1; elseif (y <= 0.106) tmp = Float64(x / Float64(y * exp(Float64(b - Float64(Float64(t + -1.0) * log(a)))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x * exp(((y * log(z)) - b))) / y; tmp = 0.0; if (y <= -3.5e+47) tmp = t_1; elseif (y <= 0.106) tmp = x / (y * exp((b - ((t + -1.0) * log(a))))); else tmp = t_1; end tmp_2 = 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]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -3.5e+47], t$95$1, If[LessEqual[y, 0.106], N[(x / N[(y * N[Exp[N[(b - N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot e^{y \cdot \log z - b}}{y}\\
\mathbf{if}\;y \leq -3.5 \cdot 10^{+47}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 0.106:\\
\;\;\;\;\frac{x}{y \cdot e^{b - \left(t + -1\right) \cdot \log a}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -3.50000000000000015e47 or 0.105999999999999997 < y Initial program 100.0%
Taylor expanded in y around inf
lower-*.f64N/A
lower-log.f6491.3
Applied rewrites91.3%
if -3.50000000000000015e47 < y < 0.105999999999999997Initial program 94.1%
lift-log.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-log.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-exp.f64N/A
lift-*.f64N/A
remove-double-negN/A
Applied rewrites95.3%
Taylor expanded in y around 0
lower-*.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6495.3
Applied rewrites95.3%
Final simplification93.2%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (/ (* x (exp (- (* y (log z)) b))) y))) (if (<= y -50.0) t_1 (if (<= y 0.036) (/ x (* y (pow a (- 1.0 t)))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * exp(((y * log(z)) - b))) / y;
double tmp;
if (y <= -50.0) {
tmp = t_1;
} else if (y <= 0.036) {
tmp = x / (y * pow(a, (1.0 - t)));
} 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 * exp(((y * log(z)) - b))) / y
if (y <= (-50.0d0)) then
tmp = t_1
else if (y <= 0.036d0) then
tmp = x / (y * (a ** (1.0d0 - t)))
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.exp(((y * Math.log(z)) - b))) / y;
double tmp;
if (y <= -50.0) {
tmp = t_1;
} else if (y <= 0.036) {
tmp = x / (y * Math.pow(a, (1.0 - t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x * math.exp(((y * math.log(z)) - b))) / y tmp = 0 if y <= -50.0: tmp = t_1 elif y <= 0.036: tmp = x / (y * math.pow(a, (1.0 - t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * exp(Float64(Float64(y * log(z)) - b))) / y) tmp = 0.0 if (y <= -50.0) tmp = t_1; elseif (y <= 0.036) tmp = Float64(x / Float64(y * (a ^ Float64(1.0 - t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x * exp(((y * log(z)) - b))) / y; tmp = 0.0; if (y <= -50.0) tmp = t_1; elseif (y <= 0.036) tmp = x / (y * (a ^ (1.0 - t))); else tmp = t_1; end tmp_2 = 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]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -50.0], t$95$1, If[LessEqual[y, 0.036], N[(x / N[(y * N[Power[a, N[(1.0 - t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot e^{y \cdot \log z - b}}{y}\\
\mathbf{if}\;y \leq -50:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 0.036:\\
\;\;\;\;\frac{x}{y \cdot {a}^{\left(1 - t\right)}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -50 or 0.0359999999999999973 < y Initial program 100.0%
Taylor expanded in y around inf
lower-*.f64N/A
lower-log.f6491.6
Applied rewrites91.6%
if -50 < y < 0.0359999999999999973Initial program 93.9%
lift-log.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-log.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-exp.f64N/A
lift-*.f64N/A
remove-double-negN/A
Applied rewrites95.1%
Taylor expanded in y around 0
lower-*.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6495.1
Applied rewrites95.1%
Taylor expanded in b around 0
lower-/.f64N/A
lower-*.f64N/A
distribute-rgt-neg-inN/A
exp-to-powN/A
lower-pow.f64N/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
mul-1-negN/A
metadata-evalN/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
lower--.f6476.5
Applied rewrites76.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (/ (pow z y) y))))
(if (<= y -1.95e+143)
t_1
(if (<= y 0.65) (/ x (* y (pow a (- 1.0 t)))) 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 <= -1.95e+143) {
tmp = t_1;
} else if (y <= 0.65) {
tmp = x / (y * pow(a, (1.0 - t)));
} 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 <= (-1.95d+143)) then
tmp = t_1
else if (y <= 0.65d0) then
tmp = x / (y * (a ** (1.0d0 - t)))
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 <= -1.95e+143) {
tmp = t_1;
} else if (y <= 0.65) {
tmp = x / (y * Math.pow(a, (1.0 - t)));
} 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 <= -1.95e+143: tmp = t_1 elif y <= 0.65: tmp = x / (y * math.pow(a, (1.0 - t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * Float64((z ^ y) / y)) tmp = 0.0 if (y <= -1.95e+143) tmp = t_1; elseif (y <= 0.65) tmp = Float64(x / Float64(y * (a ^ Float64(1.0 - t)))); 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 <= -1.95e+143) tmp = t_1; elseif (y <= 0.65) tmp = x / (y * (a ^ (1.0 - t))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(N[Power[z, y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.95e+143], t$95$1, If[LessEqual[y, 0.65], N[(x / N[(y * N[Power[a, N[(1.0 - t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{{z}^{y}}{y}\\
\mathbf{if}\;y \leq -1.95 \cdot 10^{+143}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 0.65:\\
\;\;\;\;\frac{x}{y \cdot {a}^{\left(1 - t\right)}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.9499999999999999e143 or 0.650000000000000022 < y Initial program 100.0%
Taylor expanded in y around inf
lower-*.f64N/A
lower-log.f6493.8
Applied rewrites93.8%
Taylor expanded in b around 0
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f6485.8
Applied rewrites85.8%
if -1.9499999999999999e143 < y < 0.650000000000000022Initial program 95.2%
lift-log.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-log.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-exp.f64N/A
lift-*.f64N/A
remove-double-negN/A
Applied rewrites96.1%
Taylor expanded in y around 0
lower-*.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6492.0
Applied rewrites92.0%
Taylor expanded in b around 0
lower-/.f64N/A
lower-*.f64N/A
distribute-rgt-neg-inN/A
exp-to-powN/A
lower-pow.f64N/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
mul-1-negN/A
metadata-evalN/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
lower--.f6473.8
Applied rewrites73.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (/ (pow z y) y))))
(if (<= y -1.52e+143)
t_1
(if (<= y 0.65) (* (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 <= -1.52e+143) {
tmp = t_1;
} else if (y <= 0.65) {
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 <= (-1.52d+143)) then
tmp = t_1
else if (y <= 0.65d0) 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 <= -1.52e+143) {
tmp = t_1;
} else if (y <= 0.65) {
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 <= -1.52e+143: tmp = t_1 elif y <= 0.65: 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((z ^ y) / y)) tmp = 0.0 if (y <= -1.52e+143) tmp = t_1; elseif (y <= 0.65) 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 <= -1.52e+143) tmp = t_1; elseif (y <= 0.65) 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[(N[Power[z, y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.52e+143], t$95$1, If[LessEqual[y, 0.65], 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 := x \cdot \frac{{z}^{y}}{y}\\
\mathbf{if}\;y \leq -1.52 \cdot 10^{+143}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 0.65:\\
\;\;\;\;{a}^{\left(t + -1\right)} \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.51999999999999996e143 or 0.650000000000000022 < y Initial program 100.0%
Taylor expanded in y around inf
lower-*.f64N/A
lower-log.f6493.8
Applied rewrites93.8%
Taylor expanded in b around 0
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f6485.8
Applied rewrites85.8%
if -1.51999999999999996e143 < y < 0.650000000000000022Initial program 95.2%
Applied rewrites75.5%
Taylor expanded in b around 0
Applied rewrites70.7%
Taylor expanded in y around 0
lower-/.f64N/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
lower-+.f6472.2
Applied rewrites72.2%
lift-+.f64N/A
lift-pow.f64N/A
lift-*.f64N/A
remove-double-negN/A
remove-double-negN/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lift-/.f64N/A
lower-*.f6468.9
lift-+.f64N/A
+-commutativeN/A
lower-+.f6468.9
Applied rewrites68.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (/ (pow z y) y))))
(if (<= y -1.66e+44)
t_1
(if (<= y 0.65)
(/ x (/ 1.0 (/ 1.0 (* y (fma a (fma b (* b 0.5) b) a)))))
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 <= -1.66e+44) {
tmp = t_1;
} else if (y <= 0.65) {
tmp = x / (1.0 / (1.0 / (y * fma(a, fma(b, (b * 0.5), b), a))));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(x * Float64((z ^ y) / y)) tmp = 0.0 if (y <= -1.66e+44) tmp = t_1; elseif (y <= 0.65) tmp = Float64(x / Float64(1.0 / Float64(1.0 / Float64(y * fma(a, fma(b, Float64(b * 0.5), b), a))))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(N[Power[z, y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.66e+44], t$95$1, If[LessEqual[y, 0.65], N[(x / N[(1.0 / N[(1.0 / N[(y * N[(a * N[(b * N[(b * 0.5), $MachinePrecision] + b), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{{z}^{y}}{y}\\
\mathbf{if}\;y \leq -1.66 \cdot 10^{+44}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 0.65:\\
\;\;\;\;\frac{x}{\frac{1}{\frac{1}{y \cdot \mathsf{fma}\left(a, \mathsf{fma}\left(b, b \cdot 0.5, b\right), a\right)}}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.65999999999999992e44 or 0.650000000000000022 < y Initial program 100.0%
Taylor expanded in y around inf
lower-*.f64N/A
lower-log.f6491.3
Applied rewrites91.3%
Taylor expanded in b around 0
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f6481.8
Applied rewrites81.8%
if -1.65999999999999992e44 < y < 0.650000000000000022Initial program 94.2%
Taylor expanded in t around 0
associate-/l*N/A
lower-*.f64N/A
exp-diffN/A
associate-/l/N/A
lower-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
rem-exp-logN/A
lower-*.f64N/A
lower-exp.f6468.4
Applied rewrites68.4%
Taylor expanded in b around 0
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6446.2
Applied rewrites46.2%
Taylor expanded in y around 0
distribute-rgt-inN/A
*-lft-identityN/A
associate-*l*N/A
+-commutativeN/A
distribute-rgt1-inN/A
associate-*r*N/A
lower-/.f64N/A
*-commutativeN/A
*-lft-identityN/A
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
associate-*l*N/A
distribute-rgt-inN/A
Applied rewrites50.9%
lift-*.f64N/A
lift-fma.f64N/A
lift-fma.f64N/A
lift-*.f6450.9
/-rgt-identityN/A
clear-numN/A
lower-/.f64N/A
lower-/.f6451.7
Applied rewrites51.7%
(FPCore (x y z t a b) :precision binary64 (if (<= (log a) -42.0) (/ (/ x a) y) (/ x (* y (fma a b a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (log(a) <= -42.0) {
tmp = (x / a) / y;
} else {
tmp = x / (y * fma(a, b, a));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (log(a) <= -42.0) tmp = Float64(Float64(x / a) / y); else tmp = Float64(x / Float64(y * fma(a, b, a))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[Log[a], $MachinePrecision], -42.0], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(y * N[(a * b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\log a \leq -42:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \mathsf{fma}\left(a, b, a\right)}\\
\end{array}
\end{array}
if (log.f64 a) < -42Initial program 99.6%
Applied rewrites65.4%
Taylor expanded in b around 0
Applied rewrites70.7%
Taylor expanded in y around 0
lower-/.f64N/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
lower-+.f6463.9
Applied rewrites63.9%
Taylor expanded in t around 0
lower-/.f6430.4
Applied rewrites30.4%
if -42 < (log.f64 a) Initial program 95.1%
Taylor expanded in t around 0
associate-/l*N/A
lower-*.f64N/A
exp-diffN/A
associate-/l/N/A
lower-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
rem-exp-logN/A
lower-*.f64N/A
lower-exp.f6471.0
Applied rewrites71.0%
Taylor expanded in b around 0
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6465.5
Applied rewrites65.5%
Taylor expanded in y around 0
distribute-rgt-inN/A
*-lft-identityN/A
associate-*l*N/A
+-commutativeN/A
distribute-rgt1-inN/A
associate-*r*N/A
lower-/.f64N/A
*-commutativeN/A
*-lft-identityN/A
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
associate-*l*N/A
distribute-rgt-inN/A
Applied rewrites44.5%
Taylor expanded in b around 0
associate-*r*N/A
distribute-rgt-outN/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f6441.5
Applied rewrites41.5%
(FPCore (x y z t a b) :precision binary64 (if (<= (log a) -42.0) (* x (/ 1.0 (* y a))) (/ x (* y (fma a b a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (log(a) <= -42.0) {
tmp = x * (1.0 / (y * a));
} else {
tmp = x / (y * fma(a, b, a));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (log(a) <= -42.0) tmp = Float64(x * Float64(1.0 / Float64(y * a))); else tmp = Float64(x / Float64(y * fma(a, b, a))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[Log[a], $MachinePrecision], -42.0], N[(x * N[(1.0 / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(a * b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\log a \leq -42:\\
\;\;\;\;x \cdot \frac{1}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \mathsf{fma}\left(a, b, a\right)}\\
\end{array}
\end{array}
if (log.f64 a) < -42Initial program 99.6%
Taylor expanded in t around 0
associate-/l*N/A
lower-*.f64N/A
exp-diffN/A
associate-/l/N/A
lower-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
rem-exp-logN/A
lower-*.f64N/A
lower-exp.f6464.6
Applied rewrites64.6%
Taylor expanded in b around 0
lower-/.f64N/A
lower-pow.f64N/A
*-commutativeN/A
lower-*.f6460.9
Applied rewrites60.9%
Taylor expanded in y around 0
Applied rewrites26.9%
if -42 < (log.f64 a) Initial program 95.1%
Taylor expanded in t around 0
associate-/l*N/A
lower-*.f64N/A
exp-diffN/A
associate-/l/N/A
lower-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
rem-exp-logN/A
lower-*.f64N/A
lower-exp.f6471.0
Applied rewrites71.0%
Taylor expanded in b around 0
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6465.5
Applied rewrites65.5%
Taylor expanded in y around 0
distribute-rgt-inN/A
*-lft-identityN/A
associate-*l*N/A
+-commutativeN/A
distribute-rgt1-inN/A
associate-*r*N/A
lower-/.f64N/A
*-commutativeN/A
*-lft-identityN/A
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
associate-*l*N/A
distribute-rgt-inN/A
Applied rewrites44.5%
Taylor expanded in b around 0
associate-*r*N/A
distribute-rgt-outN/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f6441.5
Applied rewrites41.5%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.65e-173) (* (- 1.0 b) (/ x (* y a))) (/ x (* y (* 0.5 (* a (* b b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.65e-173) {
tmp = (1.0 - b) * (x / (y * a));
} else {
tmp = x / (y * (0.5 * (a * (b * b))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-1.65d-173)) then
tmp = (1.0d0 - b) * (x / (y * a))
else
tmp = x / (y * (0.5d0 * (a * (b * b))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.65e-173) {
tmp = (1.0 - b) * (x / (y * a));
} else {
tmp = x / (y * (0.5 * (a * (b * b))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.65e-173: tmp = (1.0 - b) * (x / (y * a)) else: tmp = x / (y * (0.5 * (a * (b * b)))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.65e-173) tmp = Float64(Float64(1.0 - b) * Float64(x / Float64(y * a))); else tmp = Float64(x / Float64(y * Float64(0.5 * Float64(a * Float64(b * b))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.65e-173) tmp = (1.0 - b) * (x / (y * a)); else tmp = x / (y * (0.5 * (a * (b * b)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.65e-173], N[(N[(1.0 - b), $MachinePrecision] * N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(0.5 * N[(a * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.65 \cdot 10^{-173}:\\
\;\;\;\;\left(1 - b\right) \cdot \frac{x}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(0.5 \cdot \left(a \cdot \left(b \cdot b\right)\right)\right)}\\
\end{array}
\end{array}
if b < -1.6500000000000001e-173Initial program 97.6%
Taylor expanded in t around 0
associate-/l*N/A
lower-*.f64N/A
exp-diffN/A
associate-/l/N/A
lower-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
rem-exp-logN/A
lower-*.f64N/A
lower-exp.f6467.9
Applied rewrites67.9%
Taylor expanded in b around 0
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6452.8
Applied rewrites52.8%
Taylor expanded in y around 0
distribute-rgt-inN/A
*-lft-identityN/A
associate-*l*N/A
+-commutativeN/A
distribute-rgt1-inN/A
associate-*r*N/A
lower-/.f64N/A
*-commutativeN/A
*-lft-identityN/A
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
associate-*l*N/A
distribute-rgt-inN/A
Applied rewrites35.0%
Taylor expanded in b around 0
associate-/l*N/A
associate-*r*N/A
distribute-lft1-inN/A
lower-*.f64N/A
lower-+.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f6443.0
Applied rewrites43.0%
if -1.6500000000000001e-173 < b Initial program 97.0%
Taylor expanded in t around 0
associate-/l*N/A
lower-*.f64N/A
exp-diffN/A
associate-/l/N/A
lower-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
rem-exp-logN/A
lower-*.f64N/A
lower-exp.f6467.9
Applied rewrites67.9%
Taylor expanded in b around 0
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6461.2
Applied rewrites61.2%
Taylor expanded in y around 0
distribute-rgt-inN/A
*-lft-identityN/A
associate-*l*N/A
+-commutativeN/A
distribute-rgt1-inN/A
associate-*r*N/A
lower-/.f64N/A
*-commutativeN/A
*-lft-identityN/A
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
associate-*l*N/A
distribute-rgt-inN/A
Applied rewrites40.4%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6446.2
Applied rewrites46.2%
Final simplification44.9%
(FPCore (x y z t a b) :precision binary64 (if (<= (+ t -1.0) 3.3e+87) (* x (/ 1.0 (* y a))) (/ 1.0 (/ y x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t + -1.0) <= 3.3e+87) {
tmp = x * (1.0 / (y * a));
} else {
tmp = 1.0 / (y / x);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t + (-1.0d0)) <= 3.3d+87) then
tmp = x * (1.0d0 / (y * a))
else
tmp = 1.0d0 / (y / x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t + -1.0) <= 3.3e+87) {
tmp = x * (1.0 / (y * a));
} else {
tmp = 1.0 / (y / x);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t + -1.0) <= 3.3e+87: tmp = x * (1.0 / (y * a)) else: tmp = 1.0 / (y / x) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(t + -1.0) <= 3.3e+87) tmp = Float64(x * Float64(1.0 / Float64(y * a))); else tmp = Float64(1.0 / Float64(y / x)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t + -1.0) <= 3.3e+87) tmp = x * (1.0 / (y * a)); else tmp = 1.0 / (y / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(t + -1.0), $MachinePrecision], 3.3e+87], N[(x * N[(1.0 / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(y / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t + -1 \leq 3.3 \cdot 10^{+87}:\\
\;\;\;\;x \cdot \frac{1}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{y}{x}}\\
\end{array}
\end{array}
if (-.f64 t #s(literal 1 binary64)) < 3.3000000000000001e87Initial program 96.7%
Taylor expanded in t around 0
associate-/l*N/A
lower-*.f64N/A
exp-diffN/A
associate-/l/N/A
lower-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
rem-exp-logN/A
lower-*.f64N/A
lower-exp.f6472.6
Applied rewrites72.6%
Taylor expanded in b around 0
lower-/.f64N/A
lower-pow.f64N/A
*-commutativeN/A
lower-*.f6462.6
Applied rewrites62.6%
Taylor expanded in y around 0
Applied rewrites35.7%
if 3.3000000000000001e87 < (-.f64 t #s(literal 1 binary64)) Initial program 100.0%
Taylor expanded in y around inf
lower-*.f64N/A
lower-log.f6457.6
Applied rewrites57.6%
Taylor expanded in b around 0
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f6442.8
Applied rewrites42.8%
Taylor expanded in y around 0
lower-/.f6420.8
Applied rewrites20.8%
clear-numN/A
lower-/.f64N/A
lower-/.f6422.0
Applied rewrites22.0%
Final simplification33.2%
(FPCore (x y z t a b) :precision binary64 (if (<= (+ t -1.0) 3.3e+87) (* x (/ 1.0 (* y a))) (/ x y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t + -1.0) <= 3.3e+87) {
tmp = x * (1.0 / (y * a));
} else {
tmp = x / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t + (-1.0d0)) <= 3.3d+87) then
tmp = x * (1.0d0 / (y * a))
else
tmp = x / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t + -1.0) <= 3.3e+87) {
tmp = x * (1.0 / (y * a));
} else {
tmp = x / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t + -1.0) <= 3.3e+87: tmp = x * (1.0 / (y * a)) else: tmp = x / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(t + -1.0) <= 3.3e+87) tmp = Float64(x * Float64(1.0 / Float64(y * a))); else tmp = Float64(x / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t + -1.0) <= 3.3e+87) tmp = x * (1.0 / (y * a)); else tmp = x / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(t + -1.0), $MachinePrecision], 3.3e+87], N[(x * N[(1.0 / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t + -1 \leq 3.3 \cdot 10^{+87}:\\
\;\;\;\;x \cdot \frac{1}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\end{array}
if (-.f64 t #s(literal 1 binary64)) < 3.3000000000000001e87Initial program 96.7%
Taylor expanded in t around 0
associate-/l*N/A
lower-*.f64N/A
exp-diffN/A
associate-/l/N/A
lower-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
rem-exp-logN/A
lower-*.f64N/A
lower-exp.f6472.6
Applied rewrites72.6%
Taylor expanded in b around 0
lower-/.f64N/A
lower-pow.f64N/A
*-commutativeN/A
lower-*.f6462.6
Applied rewrites62.6%
Taylor expanded in y around 0
Applied rewrites35.7%
if 3.3000000000000001e87 < (-.f64 t #s(literal 1 binary64)) Initial program 100.0%
Taylor expanded in y around inf
lower-*.f64N/A
lower-log.f6457.6
Applied rewrites57.6%
Taylor expanded in b around 0
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f6442.8
Applied rewrites42.8%
Taylor expanded in y around 0
lower-/.f6420.8
Applied rewrites20.8%
Final simplification33.0%
(FPCore (x y z t a b) :precision binary64 (if (<= (+ t -1.0) 3.3e+87) (/ x (* y a)) (/ x y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t + -1.0) <= 3.3e+87) {
tmp = x / (y * a);
} else {
tmp = x / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t + (-1.0d0)) <= 3.3d+87) then
tmp = x / (y * a)
else
tmp = x / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t + -1.0) <= 3.3e+87) {
tmp = x / (y * a);
} else {
tmp = x / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t + -1.0) <= 3.3e+87: tmp = x / (y * a) else: tmp = x / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(t + -1.0) <= 3.3e+87) tmp = Float64(x / Float64(y * a)); else tmp = Float64(x / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t + -1.0) <= 3.3e+87) tmp = x / (y * a); else tmp = x / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(t + -1.0), $MachinePrecision], 3.3e+87], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision], N[(x / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t + -1 \leq 3.3 \cdot 10^{+87}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\end{array}
if (-.f64 t #s(literal 1 binary64)) < 3.3000000000000001e87Initial program 96.7%
Taylor expanded in t around 0
associate-/l*N/A
lower-*.f64N/A
exp-diffN/A
associate-/l/N/A
lower-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
rem-exp-logN/A
lower-*.f64N/A
lower-exp.f6472.6
Applied rewrites72.6%
Taylor expanded in b around 0
lower-/.f64N/A
lower-pow.f64N/A
*-commutativeN/A
lower-*.f6462.6
Applied rewrites62.6%
Taylor expanded in y around 0
lower-/.f64N/A
lower-*.f6435.2
Applied rewrites35.2%
if 3.3000000000000001e87 < (-.f64 t #s(literal 1 binary64)) Initial program 100.0%
Taylor expanded in y around inf
lower-*.f64N/A
lower-log.f6457.6
Applied rewrites57.6%
Taylor expanded in b around 0
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f6442.8
Applied rewrites42.8%
Taylor expanded in y around 0
lower-/.f6420.8
Applied rewrites20.8%
Final simplification32.6%
(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 97.3%
Taylor expanded in y around inf
lower-*.f64N/A
lower-log.f6470.7
Applied rewrites70.7%
Taylor expanded in b around 0
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f6451.4
Applied rewrites51.4%
Taylor expanded in y around 0
lower-/.f6415.0
Applied rewrites15.0%
(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 2024219
(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))