
(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 25 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.8%
Final simplification98.8%
(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 (/ (* b (* b (fma x 0.5 (- (/ x (* b b)) (/ x b))))) y)))
(if (<= t_1 (- INFINITY))
t_2
(if (<= t_1 1e+219) (/ x (* a (* b (+ y (/ y b))))) 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 = (b * (b * fma(x, 0.5, ((x / (b * b)) - (x / b))))) / y;
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = t_2;
} else if (t_1 <= 1e+219) {
tmp = x / (a * (b * (y + (y / b))));
} 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(Float64(b * Float64(b * fma(x, 0.5, Float64(Float64(x / Float64(b * b)) - Float64(x / b))))) / y) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = t_2; elseif (t_1 <= 1e+219) tmp = Float64(x / Float64(a * Float64(b * Float64(y + Float64(y / b))))); 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[(N[(b * N[(b * N[(x * 0.5 + N[(N[(x / N[(b * b), $MachinePrecision]), $MachinePrecision] - N[(x / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], t$95$2, If[LessEqual[t$95$1, 1e+219], N[(x / N[(a * N[(b * N[(y + N[(y / b), $MachinePrecision]), $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 := \frac{b \cdot \left(b \cdot \mathsf{fma}\left(x, 0.5, \frac{x}{b \cdot b} - \frac{x}{b}\right)\right)}{y}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 10^{+219}:\\
\;\;\;\;\frac{x}{a \cdot \left(b \cdot \left(y + \frac{y}{b}\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 9.99999999999999965e218 < (/.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
*-lowering-*.f64N/A
log-lowering-log.f6471.3
Simplified71.3%
Taylor expanded in y around 0
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
neg-lowering-neg.f6444.6
Simplified44.6%
Taylor expanded in b around 0
+-commutativeN/A
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-outN/A
*-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
sub-negN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f6434.8
Simplified34.8%
Taylor expanded in b around inf
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
/-lowering-/.f6452.4
Simplified52.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) < 9.99999999999999965e218Initial program 98.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.f6464.9
Simplified64.9%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6465.3
Simplified65.3%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f6447.5
Simplified47.5%
Taylor expanded in b around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f6459.0
Simplified59.0%
Final simplification56.3%
(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 (/ (- 1.0 b) a)) y)))
(if (<= t_1 -2e+68) t_2 (if (<= t_1 2e+59) (/ x (* y (fma b a 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)) + (log(a) * (t + -1.0))) - b))) / y;
double t_2 = (x * ((1.0 - b) / a)) / y;
double tmp;
if (t_1 <= -2e+68) {
tmp = t_2;
} else if (t_1 <= 2e+59) {
tmp = x / (y * fma(b, a, 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(log(a) * Float64(t + -1.0))) - b))) / y) t_2 = Float64(Float64(x * Float64(Float64(1.0 - b) / a)) / y) tmp = 0.0 if (t_1 <= -2e+68) tmp = t_2; elseif (t_1 <= 2e+59) tmp = Float64(x / Float64(y * fma(b, a, 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[Log[a], $MachinePrecision] * N[(t + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[(N[(1.0 - b), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+68], t$95$2, If[LessEqual[t$95$1, 2e+59], N[(x / N[(y * N[(b * a + a), $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 := \frac{x \cdot \frac{1 - b}{a}}{y}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+68}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+59}:\\
\;\;\;\;\frac{x}{y \cdot \mathsf{fma}\left(b, a, 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) < -1.99999999999999991e68 or 1.99999999999999994e59 < (/.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 98.9%
Taylor expanded in b around 0
associate-*r*N/A
mul-1-negN/A
distribute-rgt1-inN/A
*-lowering-*.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
exp-sumN/A
*-lowering-*.f64N/A
*-commutativeN/A
exp-to-powN/A
pow-lowering-pow.f64N/A
exp-prodN/A
pow-lowering-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6474.1
Simplified74.1%
Taylor expanded in b around inf
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
*-commutativeN/A
neg-mul-1N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
neg-lowering-neg.f6474.1
Simplified74.1%
Taylor expanded in t around 0
/-lowering-/.f6468.1
Simplified68.1%
Taylor expanded in y around 0
/-lowering-/.f64N/A
--lowering--.f6446.9
Simplified46.9%
if -1.99999999999999991e68 < (/.f64 (*.f64 x (exp.f64 (-.f64 (+.f64 (*.f64 y (log.f64 z)) (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a))) b))) y) < 1.99999999999999994e59Initial program 98.8%
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.f6461.6
Simplified61.6%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6462.0
Simplified62.0%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f6445.3
Simplified45.3%
Taylor expanded in x around 0
distribute-rgt1-inN/A
+-commutativeN/A
*-commutativeN/A
/-lowering-/.f64N/A
distribute-rgt-inN/A
*-lft-identityN/A
distribute-lft-inN/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
*-commutativeN/A
accelerator-lowering-fma.f6448.0
Simplified48.0%
Final simplification47.5%
(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))
(/ (fma (- b) x x) (* y a))
(if (<= t_1 2e+59) (/ x (* y (fma b a a))) (/ (/ 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 = fma(-b, x, x) / (y * a);
} else if (t_1 <= 2e+59) {
tmp = x / (y * fma(b, a, a));
} 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(fma(Float64(-b), x, x) / Float64(y * a)); elseif (t_1 <= 2e+59) tmp = Float64(x / Float64(y * fma(b, a, a))); 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[(N[((-b) * x + x), $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+59], N[(x / N[(y * N[(b * a + a), $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:\\
\;\;\;\;\frac{\mathsf{fma}\left(-b, x, x\right)}{y \cdot a}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+59}:\\
\;\;\;\;\frac{x}{y \cdot \mathsf{fma}\left(b, a, a\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 b around 0
associate-*r*N/A
mul-1-negN/A
distribute-rgt1-inN/A
*-lowering-*.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
exp-sumN/A
*-lowering-*.f64N/A
*-commutativeN/A
exp-to-powN/A
pow-lowering-pow.f64N/A
exp-prodN/A
pow-lowering-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6460.9
Simplified60.9%
Taylor expanded in b around inf
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
*-commutativeN/A
neg-mul-1N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
neg-lowering-neg.f6460.9
Simplified60.9%
Taylor expanded in t around 0
/-lowering-/.f6454.8
Simplified54.8%
Taylor expanded in y around 0
/-lowering-/.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
*-commutativeN/A
*-lowering-*.f6441.0
Simplified41.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) < 1.99999999999999994e59Initial 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.f6463.4
Simplified63.4%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6463.8
Simplified63.8%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f6446.0
Simplified46.0%
Taylor expanded in x around 0
distribute-rgt1-inN/A
+-commutativeN/A
*-commutativeN/A
/-lowering-/.f64N/A
distribute-rgt-inN/A
*-lft-identityN/A
distribute-lft-inN/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
*-commutativeN/A
accelerator-lowering-fma.f6448.6
Simplified48.6%
if 1.99999999999999994e59 < (/.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.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.f6471.4
Simplified71.4%
Taylor expanded in b around 0
Simplified67.1%
Taylor expanded in t around 0
/-lowering-/.f6440.4
Simplified40.4%
Final simplification45.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 a) y)))
(if (<= t_1 -2e+68) t_2 (if (<= t_1 2e+59) (/ x (* y (fma b a 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)) + (log(a) * (t + -1.0))) - b))) / y;
double t_2 = (x / a) / y;
double tmp;
if (t_1 <= -2e+68) {
tmp = t_2;
} else if (t_1 <= 2e+59) {
tmp = x / (y * fma(b, a, 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(log(a) * Float64(t + -1.0))) - b))) / y) t_2 = Float64(Float64(x / a) / y) tmp = 0.0 if (t_1 <= -2e+68) tmp = t_2; elseif (t_1 <= 2e+59) tmp = Float64(x / Float64(y * fma(b, a, 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[Log[a], $MachinePrecision] * N[(t + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+68], t$95$2, If[LessEqual[t$95$1, 2e+59], N[(x / N[(y * N[(b * a + a), $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 := \frac{\frac{x}{a}}{y}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+68}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+59}:\\
\;\;\;\;\frac{x}{y \cdot \mathsf{fma}\left(b, a, 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) < -1.99999999999999991e68 or 1.99999999999999994e59 < (/.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 98.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.f6475.9
Simplified75.9%
Taylor expanded in b around 0
Simplified66.2%
Taylor expanded in t around 0
/-lowering-/.f6440.1
Simplified40.1%
if -1.99999999999999991e68 < (/.f64 (*.f64 x (exp.f64 (-.f64 (+.f64 (*.f64 y (log.f64 z)) (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a))) b))) y) < 1.99999999999999994e59Initial program 98.8%
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.f6461.6
Simplified61.6%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6462.0
Simplified62.0%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f6445.3
Simplified45.3%
Taylor expanded in x around 0
distribute-rgt1-inN/A
+-commutativeN/A
*-commutativeN/A
/-lowering-/.f64N/A
distribute-rgt-inN/A
*-lft-identityN/A
distribute-lft-inN/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
*-commutativeN/A
accelerator-lowering-fma.f6448.0
Simplified48.0%
Final simplification44.3%
(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 -2e+27)
t_2
(if (<= t_1 -230.0)
(/ x (* y (fma b a a)))
(if (<= t_1 -14.0)
(/ x (* y (exp b)))
(if (<= t_1 1e+67) (/ (* x (pow z y)) y) t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = log(a) * (t + -1.0);
double t_2 = (x * pow(a, t)) / y;
double tmp;
if (t_1 <= -2e+27) {
tmp = t_2;
} else if (t_1 <= -230.0) {
tmp = x / (y * fma(b, a, a));
} else if (t_1 <= -14.0) {
tmp = x / (y * exp(b));
} else if (t_1 <= 1e+67) {
tmp = (x * pow(z, y)) / y;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(log(a) * Float64(t + -1.0)) t_2 = Float64(Float64(x * (a ^ t)) / y) tmp = 0.0 if (t_1 <= -2e+27) tmp = t_2; elseif (t_1 <= -230.0) tmp = Float64(x / Float64(y * fma(b, a, a))); elseif (t_1 <= -14.0) tmp = Float64(x / Float64(y * exp(b))); elseif (t_1 <= 1e+67) tmp = Float64(Float64(x * (z ^ y)) / y); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[Log[a], $MachinePrecision] * N[(t + -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[Power[a, t], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+27], t$95$2, If[LessEqual[t$95$1, -230.0], N[(x / N[(y * N[(b * a + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -14.0], N[(x / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+67], N[(N[(x * N[Power[z, y], $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 -2 \cdot 10^{+27}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq -230:\\
\;\;\;\;\frac{x}{y \cdot \mathsf{fma}\left(b, a, a\right)}\\
\mathbf{elif}\;t\_1 \leq -14:\\
\;\;\;\;\frac{x}{y \cdot e^{b}}\\
\mathbf{elif}\;t\_1 \leq 10^{+67}:\\
\;\;\;\;\frac{x \cdot {z}^{y}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -2e27 or 9.99999999999999983e66 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) Initial program 100.0%
Taylor expanded in t around inf
*-commutativeN/A
*-lowering-*.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-log91.4
Simplified91.4%
Taylor expanded in b around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f6482.9
Simplified82.9%
if -2e27 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -230Initial program 95.8%
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.f6476.1
Simplified76.1%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6455.3
Simplified55.3%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f6461.8
Simplified61.8%
Taylor expanded in x around 0
distribute-rgt1-inN/A
+-commutativeN/A
*-commutativeN/A
/-lowering-/.f64N/A
distribute-rgt-inN/A
*-lft-identityN/A
distribute-lft-inN/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
*-commutativeN/A
accelerator-lowering-fma.f6470.1
Simplified70.1%
if -230 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -14Initial program 98.7%
Taylor expanded in y around inf
*-lowering-*.f64N/A
log-lowering-log.f6481.7
Simplified81.7%
Taylor expanded in y around 0
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
neg-lowering-neg.f6476.8
Simplified76.8%
*-commutativeN/A
associate-/l*N/A
exp-negN/A
frac-timesN/A
*-lft-identityN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f6476.8
Applied egg-rr76.8%
if -14 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 9.99999999999999983e66Initial program 98.9%
Taylor expanded in y around inf
*-lowering-*.f64N/A
log-lowering-log.f6481.2
Simplified81.2%
Taylor expanded in b around 0
*-commutativeN/A
*-lowering-*.f64N/A
pow-lowering-pow.f6459.1
Simplified59.1%
Final simplification73.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (log a) (+ t -1.0))))
(if (<= t_1 -705.0)
(/ (* x (pow a (+ t -1.0))) y)
(if (<= t_1 -14.0)
(/ x (* y (* a (exp b))))
(if (<= t_1 1e+67)
(/ (* x (* (fma b (/ 1.0 b) (- b)) (* (pow z y) (/ 1.0 a)))) y)
(/ (* x (pow a t)) y))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = log(a) * (t + -1.0);
double tmp;
if (t_1 <= -705.0) {
tmp = (x * pow(a, (t + -1.0))) / y;
} else if (t_1 <= -14.0) {
tmp = x / (y * (a * exp(b)));
} else if (t_1 <= 1e+67) {
tmp = (x * (fma(b, (1.0 / b), -b) * (pow(z, y) * (1.0 / a)))) / y;
} else {
tmp = (x * pow(a, t)) / y;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(log(a) * Float64(t + -1.0)) tmp = 0.0 if (t_1 <= -705.0) tmp = Float64(Float64(x * (a ^ Float64(t + -1.0))) / y); elseif (t_1 <= -14.0) tmp = Float64(x / Float64(y * Float64(a * exp(b)))); elseif (t_1 <= 1e+67) tmp = Float64(Float64(x * Float64(fma(b, Float64(1.0 / b), Float64(-b)) * Float64((z ^ y) * Float64(1.0 / a)))) / y); else tmp = Float64(Float64(x * (a ^ t)) / y); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[Log[a], $MachinePrecision] * N[(t + -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -705.0], N[(N[(x * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t$95$1, -14.0], N[(x / N[(y * N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+67], N[(N[(x * N[(N[(b * N[(1.0 / b), $MachinePrecision] + (-b)), $MachinePrecision] * N[(N[Power[z, y], $MachinePrecision] * N[(1.0 / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[Power[a, t], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log a \cdot \left(t + -1\right)\\
\mathbf{if}\;t\_1 \leq -705:\\
\;\;\;\;\frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
\mathbf{elif}\;t\_1 \leq -14:\\
\;\;\;\;\frac{x}{y \cdot \left(a \cdot e^{b}\right)}\\
\mathbf{elif}\;t\_1 \leq 10^{+67}:\\
\;\;\;\;\frac{x \cdot \left(\mathsf{fma}\left(b, \frac{1}{b}, -b\right) \cdot \left({z}^{y} \cdot \frac{1}{a}\right)\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot {a}^{t}}{y}\\
\end{array}
\end{array}
if (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -705Initial program 100.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.f6463.8
Simplified63.8%
Taylor expanded in b around 0
Simplified83.6%
if -705 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -14Initial program 96.5%
Taylor expanded in t around 0
associate-/l*N/A
*-lowering-*.f64N/A
exp-diffN/A
associate-/l/N/A
/-lowering-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
/-lowering-/.f64N/A
*-commutativeN/A
exp-to-powN/A
pow-lowering-pow.f64N/A
rem-exp-logN/A
*-lowering-*.f64N/A
exp-lowering-exp.f6493.5
Simplified93.5%
Taylor expanded in y around 0
/-lowering-/.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f6492.0
Simplified92.0%
if -14 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 9.99999999999999983e66Initial program 98.9%
Taylor expanded in b around 0
associate-*r*N/A
mul-1-negN/A
distribute-rgt1-inN/A
*-lowering-*.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
exp-sumN/A
*-lowering-*.f64N/A
*-commutativeN/A
exp-to-powN/A
pow-lowering-pow.f64N/A
exp-prodN/A
pow-lowering-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6464.4
Simplified64.4%
Taylor expanded in b around inf
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
*-commutativeN/A
neg-mul-1N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
neg-lowering-neg.f6464.4
Simplified64.4%
Taylor expanded in t around 0
/-lowering-/.f6475.1
Simplified75.1%
if 9.99999999999999983e66 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) Initial program 100.0%
Taylor expanded in t around inf
*-commutativeN/A
*-lowering-*.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-log92.6
Simplified92.6%
Taylor expanded in b around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f6479.6
Simplified79.6%
Final simplification82.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (exp (- (* t (log a)) b))) y)))
(if (<= t -1.3e+32)
t_1
(if (<= t 1.45e+64) (* x (/ (/ (pow z y) a) (* y (exp b)))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * exp(((t * log(a)) - b))) / y;
double tmp;
if (t <= -1.3e+32) {
tmp = t_1;
} else if (t <= 1.45e+64) {
tmp = x * ((pow(z, y) / 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 * exp(((t * log(a)) - b))) / y
if (t <= (-1.3d+32)) then
tmp = t_1
else if (t <= 1.45d+64) then
tmp = x * (((z ** y) / 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.exp(((t * Math.log(a)) - b))) / y;
double tmp;
if (t <= -1.3e+32) {
tmp = t_1;
} else if (t <= 1.45e+64) {
tmp = x * ((Math.pow(z, y) / a) / (y * Math.exp(b)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x * math.exp(((t * math.log(a)) - b))) / y tmp = 0 if t <= -1.3e+32: tmp = t_1 elif t <= 1.45e+64: tmp = x * ((math.pow(z, y) / a) / (y * math.exp(b))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * exp(Float64(Float64(t * log(a)) - b))) / y) tmp = 0.0 if (t <= -1.3e+32) tmp = t_1; elseif (t <= 1.45e+64) tmp = Float64(x * Float64(Float64((z ^ y) / 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 * exp(((t * log(a)) - b))) / y; tmp = 0.0; if (t <= -1.3e+32) tmp = t_1; elseif (t <= 1.45e+64) tmp = x * (((z ^ y) / 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[Exp[N[(N[(t * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t, -1.3e+32], t$95$1, If[LessEqual[t, 1.45e+64], N[(x * N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot e^{t \cdot \log a - b}}{y}\\
\mathbf{if}\;t \leq -1.3 \cdot 10^{+32}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.45 \cdot 10^{+64}:\\
\;\;\;\;x \cdot \frac{\frac{{z}^{y}}{a}}{y \cdot e^{b}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.3000000000000001e32 or 1.44999999999999997e64 < t Initial program 100.0%
Taylor expanded in t around inf
*-commutativeN/A
*-lowering-*.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-log91.6
Simplified91.6%
if -1.3000000000000001e32 < t < 1.44999999999999997e64Initial program 97.9%
Taylor expanded in t around 0
associate-/l*N/A
*-lowering-*.f64N/A
exp-diffN/A
associate-/l/N/A
/-lowering-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
/-lowering-/.f64N/A
*-commutativeN/A
exp-to-powN/A
pow-lowering-pow.f64N/A
rem-exp-logN/A
*-lowering-*.f64N/A
exp-lowering-exp.f6489.3
Simplified89.3%
Final simplification90.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (exp (- (* y (log z)) b))) y)))
(if (<= y -4.5e+46)
t_1
(if (<= y 1.45e-111)
(/ (* x (exp (- (* t (log a)) b))) y)
(if (<= y 1.56e+19) (/ (* 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 * exp(((y * log(z)) - b))) / y;
double tmp;
if (y <= -4.5e+46) {
tmp = t_1;
} else if (y <= 1.45e-111) {
tmp = (x * exp(((t * log(a)) - b))) / y;
} else if (y <= 1.56e+19) {
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 * exp(((y * log(z)) - b))) / y
if (y <= (-4.5d+46)) then
tmp = t_1
else if (y <= 1.45d-111) then
tmp = (x * exp(((t * log(a)) - b))) / y
else if (y <= 1.56d+19) 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.exp(((y * Math.log(z)) - b))) / y;
double tmp;
if (y <= -4.5e+46) {
tmp = t_1;
} else if (y <= 1.45e-111) {
tmp = (x * Math.exp(((t * Math.log(a)) - b))) / y;
} else if (y <= 1.56e+19) {
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.exp(((y * math.log(z)) - b))) / y tmp = 0 if y <= -4.5e+46: tmp = t_1 elif y <= 1.45e-111: tmp = (x * math.exp(((t * math.log(a)) - b))) / y elif y <= 1.56e+19: 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 * exp(Float64(Float64(y * log(z)) - b))) / y) tmp = 0.0 if (y <= -4.5e+46) tmp = t_1; elseif (y <= 1.45e-111) tmp = Float64(Float64(x * exp(Float64(Float64(t * log(a)) - b))) / y); elseif (y <= 1.56e+19) 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 * exp(((y * log(z)) - b))) / y; tmp = 0.0; if (y <= -4.5e+46) tmp = t_1; elseif (y <= 1.45e-111) tmp = (x * exp(((t * log(a)) - b))) / y; elseif (y <= 1.56e+19) 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[Exp[N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -4.5e+46], t$95$1, If[LessEqual[y, 1.45e-111], N[(N[(x * N[Exp[N[(N[(t * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 1.56e+19], 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 e^{y \cdot \log z - b}}{y}\\
\mathbf{if}\;y \leq -4.5 \cdot 10^{+46}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{-111}:\\
\;\;\;\;\frac{x \cdot e^{t \cdot \log a - b}}{y}\\
\mathbf{elif}\;y \leq 1.56 \cdot 10^{+19}:\\
\;\;\;\;\frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.5000000000000001e46 or 1.56e19 < y Initial program 100.0%
Taylor expanded in y around inf
*-lowering-*.f64N/A
log-lowering-log.f6495.7
Simplified95.7%
if -4.5000000000000001e46 < y < 1.45000000000000001e-111Initial program 98.2%
Taylor expanded in t around inf
*-commutativeN/A
*-lowering-*.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-log82.7
Simplified82.7%
if 1.45000000000000001e-111 < y < 1.56e19Initial program 96.2%
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.f6484.5
Simplified84.5%
Taylor expanded in b around 0
Simplified83.4%
Final simplification88.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (exp (- (* y (log z)) b))) y)))
(if (<= y -1.7e+45)
t_1
(if (<= y 2.7e+35) (/ (* x (pow a (+ t -1.0))) (* y (exp b))) 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 <= -1.7e+45) {
tmp = t_1;
} else if (y <= 2.7e+35) {
tmp = (x * pow(a, (t + -1.0))) / (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 * exp(((y * log(z)) - b))) / y
if (y <= (-1.7d+45)) then
tmp = t_1
else if (y <= 2.7d+35) then
tmp = (x * (a ** (t + (-1.0d0)))) / (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.exp(((y * Math.log(z)) - b))) / y;
double tmp;
if (y <= -1.7e+45) {
tmp = t_1;
} else if (y <= 2.7e+35) {
tmp = (x * Math.pow(a, (t + -1.0))) / (y * Math.exp(b));
} 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 <= -1.7e+45: tmp = t_1 elif y <= 2.7e+35: tmp = (x * math.pow(a, (t + -1.0))) / (y * math.exp(b)) 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 <= -1.7e+45) tmp = t_1; elseif (y <= 2.7e+35) tmp = Float64(Float64(x * (a ^ Float64(t + -1.0))) / 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 * exp(((y * log(z)) - b))) / y; tmp = 0.0; if (y <= -1.7e+45) tmp = t_1; elseif (y <= 2.7e+35) tmp = (x * (a ^ (t + -1.0))) / (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[Exp[N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -1.7e+45], t$95$1, If[LessEqual[y, 2.7e+35], N[(N[(x * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(y * N[Exp[b], $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 -1.7 \cdot 10^{+45}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{+35}:\\
\;\;\;\;\frac{x \cdot {a}^{\left(t + -1\right)}}{y \cdot e^{b}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.7e45 or 2.70000000000000003e35 < y Initial program 100.0%
Taylor expanded in y around inf
*-lowering-*.f64N/A
log-lowering-log.f6496.4
Simplified96.4%
if -1.7e45 < y < 2.70000000000000003e35Initial program 98.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.f6481.4
Simplified81.4%
Final simplification87.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (exp (- (* y (log z)) b))) y)))
(if (<= y -1.7e+45)
t_1
(if (<= y 1.35e+19) (/ (* 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 * exp(((y * log(z)) - b))) / y;
double tmp;
if (y <= -1.7e+45) {
tmp = t_1;
} else if (y <= 1.35e+19) {
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 * exp(((y * log(z)) - b))) / y
if (y <= (-1.7d+45)) then
tmp = t_1
else if (y <= 1.35d+19) 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.exp(((y * Math.log(z)) - b))) / y;
double tmp;
if (y <= -1.7e+45) {
tmp = t_1;
} else if (y <= 1.35e+19) {
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.exp(((y * math.log(z)) - b))) / y tmp = 0 if y <= -1.7e+45: tmp = t_1 elif y <= 1.35e+19: 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 * exp(Float64(Float64(y * log(z)) - b))) / y) tmp = 0.0 if (y <= -1.7e+45) tmp = t_1; elseif (y <= 1.35e+19) 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 * exp(((y * log(z)) - b))) / y; tmp = 0.0; if (y <= -1.7e+45) tmp = t_1; elseif (y <= 1.35e+19) 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[Exp[N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -1.7e+45], t$95$1, If[LessEqual[y, 1.35e+19], 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 e^{y \cdot \log z - b}}{y}\\
\mathbf{if}\;y \leq -1.7 \cdot 10^{+45}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.35 \cdot 10^{+19}:\\
\;\;\;\;\frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.7e45 or 1.35e19 < y Initial program 100.0%
Taylor expanded in y around inf
*-lowering-*.f64N/A
log-lowering-log.f6495.7
Simplified95.7%
if -1.7e45 < y < 1.35e19Initial 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.f6481.4
Simplified81.4%
Taylor expanded in b around 0
Simplified74.1%
Final simplification83.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (pow a (+ t -1.0)) (/ x y))) (t_2 (/ (* x (pow z y)) y)))
(if (<= y -1.7e+45)
t_2
(if (<= y 7.6e-299)
t_1
(if (<= y 1.15e-200)
(/ x (* y (exp b)))
(if (<= y 1.26e+20) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = pow(a, (t + -1.0)) * (x / y);
double t_2 = (x * pow(z, y)) / y;
double tmp;
if (y <= -1.7e+45) {
tmp = t_2;
} else if (y <= 7.6e-299) {
tmp = t_1;
} else if (y <= 1.15e-200) {
tmp = x / (y * exp(b));
} else if (y <= 1.26e+20) {
tmp = t_1;
} 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))) * (x / y)
t_2 = (x * (z ** y)) / y
if (y <= (-1.7d+45)) then
tmp = t_2
else if (y <= 7.6d-299) then
tmp = t_1
else if (y <= 1.15d-200) then
tmp = x / (y * exp(b))
else if (y <= 1.26d+20) then
tmp = t_1
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)) * (x / y);
double t_2 = (x * Math.pow(z, y)) / y;
double tmp;
if (y <= -1.7e+45) {
tmp = t_2;
} else if (y <= 7.6e-299) {
tmp = t_1;
} else if (y <= 1.15e-200) {
tmp = x / (y * Math.exp(b));
} else if (y <= 1.26e+20) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = math.pow(a, (t + -1.0)) * (x / y) t_2 = (x * math.pow(z, y)) / y tmp = 0 if y <= -1.7e+45: tmp = t_2 elif y <= 7.6e-299: tmp = t_1 elif y <= 1.15e-200: tmp = x / (y * math.exp(b)) elif y <= 1.26e+20: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64((a ^ Float64(t + -1.0)) * Float64(x / y)) t_2 = Float64(Float64(x * (z ^ y)) / y) tmp = 0.0 if (y <= -1.7e+45) tmp = t_2; elseif (y <= 7.6e-299) tmp = t_1; elseif (y <= 1.15e-200) tmp = Float64(x / Float64(y * exp(b))); elseif (y <= 1.26e+20) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a ^ (t + -1.0)) * (x / y); t_2 = (x * (z ^ y)) / y; tmp = 0.0; if (y <= -1.7e+45) tmp = t_2; elseif (y <= 7.6e-299) tmp = t_1; elseif (y <= 1.15e-200) tmp = x / (y * exp(b)); elseif (y <= 1.26e+20) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -1.7e+45], t$95$2, If[LessEqual[y, 7.6e-299], t$95$1, If[LessEqual[y, 1.15e-200], N[(x / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.26e+20], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {a}^{\left(t + -1\right)} \cdot \frac{x}{y}\\
t_2 := \frac{x \cdot {z}^{y}}{y}\\
\mathbf{if}\;y \leq -1.7 \cdot 10^{+45}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 7.6 \cdot 10^{-299}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{-200}:\\
\;\;\;\;\frac{x}{y \cdot e^{b}}\\
\mathbf{elif}\;y \leq 1.26 \cdot 10^{+20}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -1.7e45 or 1.26e20 < y Initial program 100.0%
Taylor expanded in y around inf
*-lowering-*.f64N/A
log-lowering-log.f6495.7
Simplified95.7%
Taylor expanded in b around 0
*-commutativeN/A
*-lowering-*.f64N/A
pow-lowering-pow.f6488.8
Simplified88.8%
if -1.7e45 < y < 7.6000000000000005e-299 or 1.15000000000000004e-200 < y < 1.26e20Initial program 97.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.f6482.2
Simplified82.2%
Taylor expanded in b 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-/.f6468.0
Simplified68.0%
if 7.6000000000000005e-299 < y < 1.15000000000000004e-200Initial program 99.2%
Taylor expanded in y around inf
*-lowering-*.f64N/A
log-lowering-log.f6466.4
Simplified66.4%
Taylor expanded in y around 0
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
neg-lowering-neg.f6466.4
Simplified66.4%
*-commutativeN/A
associate-/l*N/A
exp-negN/A
frac-timesN/A
*-lft-identityN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f6466.4
Applied egg-rr66.4%
Final simplification77.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (pow a t)) y)) (t_2 (/ x (* y (exp b)))))
(if (<= b -750.0)
t_2
(if (<= b -1.3e-86)
t_1
(if (<= b 3.1e-201)
(/ x (* a (* b (+ y (/ y b)))))
(if (<= b 5600.0) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * pow(a, t)) / y;
double t_2 = x / (y * exp(b));
double tmp;
if (b <= -750.0) {
tmp = t_2;
} else if (b <= -1.3e-86) {
tmp = t_1;
} else if (b <= 3.1e-201) {
tmp = x / (a * (b * (y + (y / b))));
} else if (b <= 5600.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (x * (a ** t)) / y
t_2 = x / (y * exp(b))
if (b <= (-750.0d0)) then
tmp = t_2
else if (b <= (-1.3d-86)) then
tmp = t_1
else if (b <= 3.1d-201) then
tmp = x / (a * (b * (y + (y / b))))
else if (b <= 5600.0d0) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * Math.pow(a, t)) / y;
double t_2 = x / (y * Math.exp(b));
double tmp;
if (b <= -750.0) {
tmp = t_2;
} else if (b <= -1.3e-86) {
tmp = t_1;
} else if (b <= 3.1e-201) {
tmp = x / (a * (b * (y + (y / b))));
} else if (b <= 5600.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x * math.pow(a, t)) / y t_2 = x / (y * math.exp(b)) tmp = 0 if b <= -750.0: tmp = t_2 elif b <= -1.3e-86: tmp = t_1 elif b <= 3.1e-201: tmp = x / (a * (b * (y + (y / b)))) elif b <= 5600.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * (a ^ t)) / y) t_2 = Float64(x / Float64(y * exp(b))) tmp = 0.0 if (b <= -750.0) tmp = t_2; elseif (b <= -1.3e-86) tmp = t_1; elseif (b <= 3.1e-201) tmp = Float64(x / Float64(a * Float64(b * Float64(y + Float64(y / b))))); elseif (b <= 5600.0) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x * (a ^ t)) / y; t_2 = x / (y * exp(b)); tmp = 0.0; if (b <= -750.0) tmp = t_2; elseif (b <= -1.3e-86) tmp = t_1; elseif (b <= 3.1e-201) tmp = x / (a * (b * (y + (y / b)))); elseif (b <= 5600.0) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x * N[Power[a, t], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -750.0], t$95$2, If[LessEqual[b, -1.3e-86], t$95$1, If[LessEqual[b, 3.1e-201], N[(x / N[(a * N[(b * N[(y + N[(y / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5600.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot {a}^{t}}{y}\\
t_2 := \frac{x}{y \cdot e^{b}}\\
\mathbf{if}\;b \leq -750:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq -1.3 \cdot 10^{-86}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 3.1 \cdot 10^{-201}:\\
\;\;\;\;\frac{x}{a \cdot \left(b \cdot \left(y + \frac{y}{b}\right)\right)}\\
\mathbf{elif}\;b \leq 5600:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -750 or 5600 < b Initial program 100.0%
Taylor expanded in y around inf
*-lowering-*.f64N/A
log-lowering-log.f6489.9
Simplified89.9%
Taylor expanded in y around 0
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
neg-lowering-neg.f6479.8
Simplified79.8%
*-commutativeN/A
associate-/l*N/A
exp-negN/A
frac-timesN/A
*-lft-identityN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f6479.8
Applied egg-rr79.8%
if -750 < b < -1.3000000000000001e-86 or 3.0999999999999999e-201 < b < 5600Initial program 97.4%
Taylor expanded in t around inf
*-commutativeN/A
*-lowering-*.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-log60.4
Simplified60.4%
Taylor expanded in b around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f6460.4
Simplified60.4%
if -1.3000000000000001e-86 < b < 3.0999999999999999e-201Initial program 98.3%
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.f6476.8
Simplified76.8%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6476.8
Simplified76.8%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f6447.7
Simplified47.7%
Taylor expanded in b around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f6466.7
Simplified66.7%
Final simplification71.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (pow z y)) y)))
(if (<= y -1.7e+45)
t_1
(if (<= y 1.1e+20) (/ (* 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 <= -1.7e+45) {
tmp = t_1;
} else if (y <= 1.1e+20) {
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 <= (-1.7d+45)) then
tmp = t_1
else if (y <= 1.1d+20) 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 <= -1.7e+45) {
tmp = t_1;
} else if (y <= 1.1e+20) {
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 <= -1.7e+45: tmp = t_1 elif y <= 1.1e+20: 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 <= -1.7e+45) tmp = t_1; elseif (y <= 1.1e+20) 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 <= -1.7e+45) tmp = t_1; elseif (y <= 1.1e+20) 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, -1.7e+45], t$95$1, If[LessEqual[y, 1.1e+20], 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 -1.7 \cdot 10^{+45}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{+20}:\\
\;\;\;\;\frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.7e45 or 1.1e20 < y Initial program 100.0%
Taylor expanded in y around inf
*-lowering-*.f64N/A
log-lowering-log.f6495.7
Simplified95.7%
Taylor expanded in b around 0
*-commutativeN/A
*-lowering-*.f64N/A
pow-lowering-pow.f6488.8
Simplified88.8%
if -1.7e45 < y < 1.1e20Initial 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.f6481.5
Simplified81.5%
Taylor expanded in b around 0
Simplified73.6%
Final simplification80.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (* y (exp b)))))
(if (<= b -0.0056)
t_1
(if (<= b 0.0043) (/ x (* a (* b (+ y (/ y b))))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (y * exp(b));
double tmp;
if (b <= -0.0056) {
tmp = t_1;
} else if (b <= 0.0043) {
tmp = x / (a * (b * (y + (y / 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 / (y * exp(b))
if (b <= (-0.0056d0)) then
tmp = t_1
else if (b <= 0.0043d0) then
tmp = x / (a * (b * (y + (y / 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 / (y * Math.exp(b));
double tmp;
if (b <= -0.0056) {
tmp = t_1;
} else if (b <= 0.0043) {
tmp = x / (a * (b * (y + (y / b))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (y * math.exp(b)) tmp = 0 if b <= -0.0056: tmp = t_1 elif b <= 0.0043: tmp = x / (a * (b * (y + (y / b)))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(y * exp(b))) tmp = 0.0 if (b <= -0.0056) tmp = t_1; elseif (b <= 0.0043) tmp = Float64(x / Float64(a * Float64(b * Float64(y + Float64(y / b))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (y * exp(b)); tmp = 0.0; if (b <= -0.0056) tmp = t_1; elseif (b <= 0.0043) tmp = x / (a * (b * (y + (y / b)))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -0.0056], t$95$1, If[LessEqual[b, 0.0043], N[(x / N[(a * N[(b * N[(y + N[(y / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y \cdot e^{b}}\\
\mathbf{if}\;b \leq -0.0056:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 0.0043:\\
\;\;\;\;\frac{x}{a \cdot \left(b \cdot \left(y + \frac{y}{b}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -0.00559999999999999994 or 0.0043 < b Initial program 100.0%
Taylor expanded in y around inf
*-lowering-*.f64N/A
log-lowering-log.f6487.7
Simplified87.7%
Taylor expanded in y around 0
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
neg-lowering-neg.f6477.9
Simplified77.9%
*-commutativeN/A
associate-/l*N/A
exp-negN/A
frac-timesN/A
*-lft-identityN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f6477.9
Applied egg-rr77.9%
if -0.00559999999999999994 < b < 0.0043Initial program 97.8%
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.f6476.1
Simplified76.1%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6476.2
Simplified76.2%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f6442.9
Simplified42.9%
Taylor expanded in b around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f6454.9
Simplified54.9%
Final simplification65.7%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -6e+121)
(/ (* x (* (* b (* b b)) -0.16666666666666666)) y)
(if (<= b 4.3e-34)
(/ x (* a (* b (+ y (/ y b)))))
(* (/ x (* a (+ 1.0 b))) (/ 1.0 y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -6e+121) {
tmp = (x * ((b * (b * b)) * -0.16666666666666666)) / y;
} else if (b <= 4.3e-34) {
tmp = x / (a * (b * (y + (y / b))));
} else {
tmp = (x / (a * (1.0 + b))) * (1.0 / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-6d+121)) then
tmp = (x * ((b * (b * b)) * (-0.16666666666666666d0))) / y
else if (b <= 4.3d-34) then
tmp = x / (a * (b * (y + (y / b))))
else
tmp = (x / (a * (1.0d0 + b))) * (1.0d0 / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -6e+121) {
tmp = (x * ((b * (b * b)) * -0.16666666666666666)) / y;
} else if (b <= 4.3e-34) {
tmp = x / (a * (b * (y + (y / b))));
} else {
tmp = (x / (a * (1.0 + b))) * (1.0 / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -6e+121: tmp = (x * ((b * (b * b)) * -0.16666666666666666)) / y elif b <= 4.3e-34: tmp = x / (a * (b * (y + (y / b)))) else: tmp = (x / (a * (1.0 + b))) * (1.0 / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -6e+121) tmp = Float64(Float64(x * Float64(Float64(b * Float64(b * b)) * -0.16666666666666666)) / y); elseif (b <= 4.3e-34) tmp = Float64(x / Float64(a * Float64(b * Float64(y + Float64(y / b))))); else tmp = Float64(Float64(x / Float64(a * Float64(1.0 + b))) * Float64(1.0 / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -6e+121) tmp = (x * ((b * (b * b)) * -0.16666666666666666)) / y; elseif (b <= 4.3e-34) tmp = x / (a * (b * (y + (y / b)))); else tmp = (x / (a * (1.0 + b))) * (1.0 / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -6e+121], N[(N[(x * N[(N[(b * N[(b * b), $MachinePrecision]), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 4.3e-34], N[(x / N[(a * N[(b * N[(y + N[(y / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(a * N[(1.0 + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -6 \cdot 10^{+121}:\\
\;\;\;\;\frac{x \cdot \left(\left(b \cdot \left(b \cdot b\right)\right) \cdot -0.16666666666666666\right)}{y}\\
\mathbf{elif}\;b \leq 4.3 \cdot 10^{-34}:\\
\;\;\;\;\frac{x}{a \cdot \left(b \cdot \left(y + \frac{y}{b}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(1 + b\right)} \cdot \frac{1}{y}\\
\end{array}
\end{array}
if b < -6.0000000000000005e121Initial program 100.0%
Taylor expanded in y around inf
*-lowering-*.f64N/A
log-lowering-log.f6490.8
Simplified90.8%
Taylor expanded in y around 0
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
neg-lowering-neg.f6478.5
Simplified78.5%
Taylor expanded in b around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
associate-*r*N/A
distribute-rgt-outN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
neg-lowering-neg.f6469.5
Simplified69.5%
Taylor expanded in b around inf
associate-*r/N/A
*-commutativeN/A
associate-*r*N/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6478.5
Simplified78.5%
if -6.0000000000000005e121 < b < 4.3e-34Initial program 98.2%
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.f6472.1
Simplified72.1%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6468.8
Simplified68.8%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f6438.5
Simplified38.5%
Taylor expanded in b around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f6449.3
Simplified49.3%
if 4.3e-34 < b Initial program 99.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.0
Simplified64.0%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6451.0
Simplified51.0%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f6444.4
Simplified44.4%
div-invN/A
associate-*r/N/A
distribute-lft1-inN/A
associate-*r*N/A
+-commutativeN/A
metadata-evalN/A
associate--r-N/A
neg-sub0N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
neg-sub0N/A
associate--r-N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f6455.3
Applied egg-rr55.3%
Final simplification54.6%
(FPCore (x y z t a b) :precision binary64 (if (<= b -6e+121) (/ (* x (* (* b (* b b)) -0.16666666666666666)) y) (* (/ x (* a (+ 1.0 b))) (/ 1.0 y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -6e+121) {
tmp = (x * ((b * (b * b)) * -0.16666666666666666)) / y;
} else {
tmp = (x / (a * (1.0 + b))) * (1.0 / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-6d+121)) then
tmp = (x * ((b * (b * b)) * (-0.16666666666666666d0))) / y
else
tmp = (x / (a * (1.0d0 + b))) * (1.0d0 / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -6e+121) {
tmp = (x * ((b * (b * b)) * -0.16666666666666666)) / y;
} else {
tmp = (x / (a * (1.0 + b))) * (1.0 / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -6e+121: tmp = (x * ((b * (b * b)) * -0.16666666666666666)) / y else: tmp = (x / (a * (1.0 + b))) * (1.0 / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -6e+121) tmp = Float64(Float64(x * Float64(Float64(b * Float64(b * b)) * -0.16666666666666666)) / y); else tmp = Float64(Float64(x / Float64(a * Float64(1.0 + b))) * Float64(1.0 / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -6e+121) tmp = (x * ((b * (b * b)) * -0.16666666666666666)) / y; else tmp = (x / (a * (1.0 + b))) * (1.0 / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -6e+121], N[(N[(x * N[(N[(b * N[(b * b), $MachinePrecision]), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x / N[(a * N[(1.0 + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -6 \cdot 10^{+121}:\\
\;\;\;\;\frac{x \cdot \left(\left(b \cdot \left(b \cdot b\right)\right) \cdot -0.16666666666666666\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(1 + b\right)} \cdot \frac{1}{y}\\
\end{array}
\end{array}
if b < -6.0000000000000005e121Initial program 100.0%
Taylor expanded in y around inf
*-lowering-*.f64N/A
log-lowering-log.f6490.8
Simplified90.8%
Taylor expanded in y around 0
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
neg-lowering-neg.f6478.5
Simplified78.5%
Taylor expanded in b around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
associate-*r*N/A
distribute-rgt-outN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
neg-lowering-neg.f6469.5
Simplified69.5%
Taylor expanded in b around inf
associate-*r/N/A
*-commutativeN/A
associate-*r*N/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6478.5
Simplified78.5%
if -6.0000000000000005e121 < b Initial program 98.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.f6469.5
Simplified69.5%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6463.1
Simplified63.1%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f6440.4
Simplified40.4%
div-invN/A
associate-*r/N/A
distribute-lft1-inN/A
associate-*r*N/A
+-commutativeN/A
metadata-evalN/A
associate--r-N/A
neg-sub0N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
neg-sub0N/A
associate--r-N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f6443.3
Applied egg-rr43.3%
Final simplification47.7%
(FPCore (x y z t a b) :precision binary64 (if (<= b -6e+121) (/ (* x (* (* b (* b b)) -0.16666666666666666)) y) (/ x (* y (fma b a a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -6e+121) {
tmp = (x * ((b * (b * b)) * -0.16666666666666666)) / y;
} else {
tmp = x / (y * fma(b, a, a));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -6e+121) tmp = Float64(Float64(x * Float64(Float64(b * Float64(b * b)) * -0.16666666666666666)) / y); else tmp = Float64(x / Float64(y * fma(b, a, a))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -6e+121], N[(N[(x * N[(N[(b * N[(b * b), $MachinePrecision]), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(y * N[(b * a + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -6 \cdot 10^{+121}:\\
\;\;\;\;\frac{x \cdot \left(\left(b \cdot \left(b \cdot b\right)\right) \cdot -0.16666666666666666\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \mathsf{fma}\left(b, a, a\right)}\\
\end{array}
\end{array}
if b < -6.0000000000000005e121Initial program 100.0%
Taylor expanded in y around inf
*-lowering-*.f64N/A
log-lowering-log.f6490.8
Simplified90.8%
Taylor expanded in y around 0
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
neg-lowering-neg.f6478.5
Simplified78.5%
Taylor expanded in b around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
associate-*r*N/A
distribute-rgt-outN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
neg-lowering-neg.f6469.5
Simplified69.5%
Taylor expanded in b around inf
associate-*r/N/A
*-commutativeN/A
associate-*r*N/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6478.5
Simplified78.5%
if -6.0000000000000005e121 < b Initial program 98.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.f6469.5
Simplified69.5%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6463.1
Simplified63.1%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f6440.4
Simplified40.4%
Taylor expanded in x around 0
distribute-rgt1-inN/A
+-commutativeN/A
*-commutativeN/A
/-lowering-/.f64N/A
distribute-rgt-inN/A
*-lft-identityN/A
distribute-lft-inN/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
*-commutativeN/A
accelerator-lowering-fma.f6442.5
Simplified42.5%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.45e+122) (/ (fma x (* b (* b 0.5)) x) y) (/ x (* y (fma b a a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.45e+122) {
tmp = fma(x, (b * (b * 0.5)), x) / y;
} else {
tmp = x / (y * fma(b, a, a));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.45e+122) tmp = Float64(fma(x, Float64(b * Float64(b * 0.5)), x) / y); else tmp = Float64(x / Float64(y * fma(b, a, a))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.45e+122], N[(N[(x * N[(b * N[(b * 0.5), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(y * N[(b * a + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.45 \cdot 10^{+122}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, b \cdot \left(b \cdot 0.5\right), x\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \mathsf{fma}\left(b, a, a\right)}\\
\end{array}
\end{array}
if b < -1.45e122Initial program 100.0%
Taylor expanded in y around inf
*-lowering-*.f64N/A
log-lowering-log.f6490.8
Simplified90.8%
Taylor expanded in y around 0
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
neg-lowering-neg.f6478.5
Simplified78.5%
Taylor expanded in b around 0
+-commutativeN/A
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-outN/A
*-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
sub-negN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f6469.6
Simplified69.6%
Taylor expanded in b around inf
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6469.6
Simplified69.6%
if -1.45e122 < b Initial program 98.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.f6469.5
Simplified69.5%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6463.1
Simplified63.1%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f6440.4
Simplified40.4%
Taylor expanded in x around 0
distribute-rgt1-inN/A
+-commutativeN/A
*-commutativeN/A
/-lowering-/.f64N/A
distribute-rgt-inN/A
*-lft-identityN/A
distribute-lft-inN/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
*-commutativeN/A
accelerator-lowering-fma.f6442.5
Simplified42.5%
(FPCore (x y z t a b) :precision binary64 (if (<= b -6e+121) (/ (* b (* b (* x 0.5))) y) (/ x (* y (fma b a a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -6e+121) {
tmp = (b * (b * (x * 0.5))) / y;
} else {
tmp = x / (y * fma(b, a, a));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -6e+121) tmp = Float64(Float64(b * Float64(b * Float64(x * 0.5))) / y); else tmp = Float64(x / Float64(y * fma(b, a, a))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -6e+121], N[(N[(b * N[(b * N[(x * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(y * N[(b * a + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -6 \cdot 10^{+121}:\\
\;\;\;\;\frac{b \cdot \left(b \cdot \left(x \cdot 0.5\right)\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \mathsf{fma}\left(b, a, a\right)}\\
\end{array}
\end{array}
if b < -6.0000000000000005e121Initial program 100.0%
Taylor expanded in y around inf
*-lowering-*.f64N/A
log-lowering-log.f6490.8
Simplified90.8%
Taylor expanded in y around 0
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
neg-lowering-neg.f6478.5
Simplified78.5%
Taylor expanded in b around 0
+-commutativeN/A
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-outN/A
*-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
sub-negN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f6469.6
Simplified69.6%
Taylor expanded in b around inf
associate-*r/N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
/-lowering-/.f64N/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6460.6
Simplified60.6%
if -6.0000000000000005e121 < b Initial program 98.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.f6469.5
Simplified69.5%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6463.1
Simplified63.1%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f6440.4
Simplified40.4%
Taylor expanded in x around 0
distribute-rgt1-inN/A
+-commutativeN/A
*-commutativeN/A
/-lowering-/.f64N/A
distribute-rgt-inN/A
*-lft-identityN/A
distribute-lft-inN/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
*-commutativeN/A
accelerator-lowering-fma.f6442.5
Simplified42.5%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.3e+192) (/ (- x (* x b)) y) (/ x (* y (fma b a a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.3e+192) {
tmp = (x - (x * b)) / y;
} else {
tmp = x / (y * fma(b, a, a));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.3e+192) tmp = Float64(Float64(x - Float64(x * b)) / y); else tmp = Float64(x / Float64(y * fma(b, a, a))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.3e+192], N[(N[(x - N[(x * b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(y * N[(b * a + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.3 \cdot 10^{+192}:\\
\;\;\;\;\frac{x - x \cdot b}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \mathsf{fma}\left(b, a, a\right)}\\
\end{array}
\end{array}
if b < -1.30000000000000002e192Initial program 100.0%
Taylor expanded in y around inf
*-lowering-*.f64N/A
log-lowering-log.f6495.1
Simplified95.1%
Taylor expanded in y around 0
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
neg-lowering-neg.f6490.2
Simplified90.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
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f6447.0
Simplified47.0%
if -1.30000000000000002e192 < b Initial program 98.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.f6468.5
Simplified68.5%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6462.1
Simplified62.1%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f6440.1
Simplified40.1%
Taylor expanded in x around 0
distribute-rgt1-inN/A
+-commutativeN/A
*-commutativeN/A
/-lowering-/.f64N/A
distribute-rgt-inN/A
*-lft-identityN/A
distribute-lft-inN/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
*-commutativeN/A
accelerator-lowering-fma.f6441.7
Simplified41.7%
Final simplification42.1%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.15e+192) (/ (- x (* x b)) y) (/ x (* a (fma b y y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.15e+192) {
tmp = (x - (x * b)) / y;
} else {
tmp = x / (a * fma(b, y, y));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.15e+192) tmp = Float64(Float64(x - Float64(x * b)) / y); else tmp = Float64(x / Float64(a * fma(b, y, y))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.15e+192], N[(N[(x - N[(x * b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(a * N[(b * y + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.15 \cdot 10^{+192}:\\
\;\;\;\;\frac{x - x \cdot b}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \mathsf{fma}\left(b, y, y\right)}\\
\end{array}
\end{array}
if b < -1.15e192Initial program 100.0%
Taylor expanded in y around inf
*-lowering-*.f64N/A
log-lowering-log.f6495.1
Simplified95.1%
Taylor expanded in y around 0
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
neg-lowering-neg.f6490.2
Simplified90.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
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f6447.0
Simplified47.0%
if -1.15e192 < b Initial program 98.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.f6468.5
Simplified68.5%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6462.1
Simplified62.1%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f6440.1
Simplified40.1%
Final simplification40.6%
(FPCore (x y z t a b) :precision binary64 (if (<= b 0.0048) (/ x (* y a)) (/ x (* a (* y b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 0.0048) {
tmp = x / (y * a);
} else {
tmp = x / (a * (y * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= 0.0048d0) then
tmp = x / (y * a)
else
tmp = x / (a * (y * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 0.0048) {
tmp = x / (y * a);
} else {
tmp = x / (a * (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 0.0048: tmp = x / (y * a) else: tmp = x / (a * (y * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 0.0048) tmp = Float64(x / Float64(y * a)); else tmp = Float64(x / Float64(a * Float64(y * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= 0.0048) tmp = x / (y * a); else tmp = x / (a * (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 0.0048], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 0.0048:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot b\right)}\\
\end{array}
\end{array}
if b < 0.00479999999999999958Initial program 98.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.f6470.4
Simplified70.4%
Taylor expanded in b around 0
Simplified68.6%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f6435.8
Simplified35.8%
if 0.00479999999999999958 < b Initial program 100.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.f6461.3
Simplified61.3%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6446.3
Simplified46.3%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f6444.8
Simplified44.8%
Taylor expanded in b around inf
*-lowering-*.f6444.8
Simplified44.8%
Final simplification38.0%
(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.8%
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.2
Simplified68.2%
Taylor expanded in b around 0
Simplified61.7%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f6430.8
Simplified30.8%
Final simplification30.8%
(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.8%
Taylor expanded in t around inf
*-commutativeN/A
*-lowering-*.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-log69.7
Simplified69.7%
Taylor expanded in b around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f6445.7
Simplified45.7%
Taylor expanded in t around 0
/-lowering-/.f6415.1
Simplified15.1%
(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 2024205
(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))