
(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 17 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)) (* (- 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}
Initial program 99.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y)))
(if (or (<= t_1 -2e-129) (not (<= t_1 0.0)))
(/ (* x (fma (- (* (/ b a) 0.5) (pow a -1.0)) b (pow a -1.0))) y)
(/ (* x (/ (- b) a)) y))))
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 tmp;
if ((t_1 <= -2e-129) || !(t_1 <= 0.0)) {
tmp = (x * fma((((b / a) * 0.5) - pow(a, -1.0)), b, pow(a, -1.0))) / y;
} else {
tmp = (x * (-b / 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(Float64(t - 1.0) * log(a))) - b))) / y) tmp = 0.0 if ((t_1 <= -2e-129) || !(t_1 <= 0.0)) tmp = Float64(Float64(x * fma(Float64(Float64(Float64(b / a) * 0.5) - (a ^ -1.0)), b, (a ^ -1.0))) / y); else tmp = Float64(Float64(x * Float64(Float64(-b) / 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[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e-129], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(N[(x * N[(N[(N[(N[(b / a), $MachinePrecision] * 0.5), $MachinePrecision] - N[Power[a, -1.0], $MachinePrecision]), $MachinePrecision] * b + N[Power[a, -1.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[((-b) / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]
\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}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-129} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;\frac{x \cdot \mathsf{fma}\left(\frac{b}{a} \cdot 0.5 - {a}^{-1}, b, {a}^{-1}\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \frac{-b}{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) < -1.9999999999999999e-129 or 0.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) Initial program 98.7%
Taylor expanded in t around 0
exp-diffN/A
lower-/.f64N/A
+-commutativeN/A
fp-cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
exp-diffN/A
rem-exp-logN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-exp.f6478.2
Applied rewrites78.2%
Taylor expanded in y around 0
Applied rewrites63.1%
Taylor expanded in b around 0
Applied rewrites64.0%
if -1.9999999999999999e-129 < (/.f64 (*.f64 x (exp.f64 (-.f64 (+.f64 (*.f64 y (log.f64 z)) (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a))) b))) y) < 0.0Initial program 99.2%
Taylor expanded in t around 0
exp-diffN/A
lower-/.f64N/A
+-commutativeN/A
fp-cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
exp-diffN/A
rem-exp-logN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-exp.f6465.5
Applied rewrites65.5%
Taylor expanded in y around 0
Applied rewrites57.4%
Taylor expanded in b around 0
Applied rewrites17.8%
Taylor expanded in b around inf
Applied rewrites25.7%
Final simplification45.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= (- t 1.0) -1.0000000000026263)
(/ (* x (exp (- (* (+ -1.0 t) (log a)) b))) y)
(if (<= (- t 1.0) 5e+101)
(/ (* x (exp (- (fma (log z) y (- (log a))) b))) y)
(/ (* x (exp (- (* (log a) t) b))) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t - 1.0) <= -1.0000000000026263) {
tmp = (x * exp((((-1.0 + t) * log(a)) - b))) / y;
} else if ((t - 1.0) <= 5e+101) {
tmp = (x * exp((fma(log(z), y, -log(a)) - b))) / y;
} else {
tmp = (x * exp(((log(a) * t) - b))) / y;
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(t - 1.0) <= -1.0000000000026263) tmp = Float64(Float64(x * exp(Float64(Float64(Float64(-1.0 + t) * log(a)) - b))) / y); elseif (Float64(t - 1.0) <= 5e+101) tmp = Float64(Float64(x * exp(Float64(fma(log(z), y, Float64(-log(a))) - b))) / y); else tmp = Float64(Float64(x * exp(Float64(Float64(log(a) * t) - b))) / y); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(t - 1.0), $MachinePrecision], -1.0000000000026263], N[(N[(x * N[Exp[N[(N[(N[(-1.0 + t), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[N[(t - 1.0), $MachinePrecision], 5e+101], N[(N[(x * N[Exp[N[(N[(N[Log[z], $MachinePrecision] * y + (-N[Log[a], $MachinePrecision])), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[Exp[N[(N[(N[Log[a], $MachinePrecision] * t), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t - 1 \leq -1.0000000000026263:\\
\;\;\;\;\frac{x \cdot e^{\left(-1 + t\right) \cdot \log a - b}}{y}\\
\mathbf{elif}\;t - 1 \leq 5 \cdot 10^{+101}:\\
\;\;\;\;\frac{x \cdot e^{\mathsf{fma}\left(\log z, y, -\log a\right) - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\log a \cdot t - b}}{y}\\
\end{array}
\end{array}
if (-.f64 t #s(literal 1 binary64)) < -1.0000000000026263Initial program 99.8%
Taylor expanded in y around 0
distribute-rgt-out--N/A
metadata-evalN/A
fp-cancel-sign-sub-invN/A
distribute-rgt-outN/A
+-commutativeN/A
*-commutativeN/A
metadata-evalN/A
remove-double-negN/A
distribute-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
distribute-neg-inN/A
metadata-evalN/A
remove-double-negN/A
lower-+.f64N/A
lower-log.f6494.0
Applied rewrites94.0%
if -1.0000000000026263 < (-.f64 t #s(literal 1 binary64)) < 4.99999999999999989e101Initial program 98.3%
Taylor expanded in t around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-log.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-log.f6497.0
Applied rewrites97.0%
if 4.99999999999999989e101 < (-.f64 t #s(literal 1 binary64)) Initial program 100.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6495.1
Applied rewrites95.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= (- t 1.0) -1.0000000000026263)
(/ (* x (exp (- (* (+ -1.0 t) (log a)) b))) y)
(if (<= (- t 1.0) 5e+101)
(* x (/ (exp (- (fma (log z) y (- (log a))) b)) y))
(/ (* x (exp (- (* (log a) t) b))) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t - 1.0) <= -1.0000000000026263) {
tmp = (x * exp((((-1.0 + t) * log(a)) - b))) / y;
} else if ((t - 1.0) <= 5e+101) {
tmp = x * (exp((fma(log(z), y, -log(a)) - b)) / y);
} else {
tmp = (x * exp(((log(a) * t) - b))) / y;
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(t - 1.0) <= -1.0000000000026263) tmp = Float64(Float64(x * exp(Float64(Float64(Float64(-1.0 + t) * log(a)) - b))) / y); elseif (Float64(t - 1.0) <= 5e+101) tmp = Float64(x * Float64(exp(Float64(fma(log(z), y, Float64(-log(a))) - b)) / y)); else tmp = Float64(Float64(x * exp(Float64(Float64(log(a) * t) - b))) / y); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(t - 1.0), $MachinePrecision], -1.0000000000026263], N[(N[(x * N[Exp[N[(N[(N[(-1.0 + t), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[N[(t - 1.0), $MachinePrecision], 5e+101], N[(x * N[(N[Exp[N[(N[(N[Log[z], $MachinePrecision] * y + (-N[Log[a], $MachinePrecision])), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[Exp[N[(N[(N[Log[a], $MachinePrecision] * t), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t - 1 \leq -1.0000000000026263:\\
\;\;\;\;\frac{x \cdot e^{\left(-1 + t\right) \cdot \log a - b}}{y}\\
\mathbf{elif}\;t - 1 \leq 5 \cdot 10^{+101}:\\
\;\;\;\;x \cdot \frac{e^{\mathsf{fma}\left(\log z, y, -\log a\right) - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\log a \cdot t - b}}{y}\\
\end{array}
\end{array}
if (-.f64 t #s(literal 1 binary64)) < -1.0000000000026263Initial program 99.8%
Taylor expanded in y around 0
distribute-rgt-out--N/A
metadata-evalN/A
fp-cancel-sign-sub-invN/A
distribute-rgt-outN/A
+-commutativeN/A
*-commutativeN/A
metadata-evalN/A
remove-double-negN/A
distribute-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
distribute-neg-inN/A
metadata-evalN/A
remove-double-negN/A
lower-+.f64N/A
lower-log.f6494.0
Applied rewrites94.0%
if -1.0000000000026263 < (-.f64 t #s(literal 1 binary64)) < 4.99999999999999989e101Initial program 98.3%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-log.f64N/A
lower-log.f6498.2
Applied rewrites98.2%
Taylor expanded in t around 0
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-exp.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-log.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-log.f6495.9
Applied rewrites95.9%
if 4.99999999999999989e101 < (-.f64 t #s(literal 1 binary64)) Initial program 100.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6495.1
Applied rewrites95.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (/ (pow z y) a)) y))
(t_2 (/ (* x (exp (- (* (log a) t) b))) y)))
(if (<= b -3e+21)
t_2
(if (<= b -5.6e-181)
t_1
(if (<= b 4.5e-60)
(/ (* x (pow a (- t 1.0))) y)
(if (<= b 128000000000.0) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * (pow(z, y) / a)) / y;
double t_2 = (x * exp(((log(a) * t) - b))) / y;
double tmp;
if (b <= -3e+21) {
tmp = t_2;
} else if (b <= -5.6e-181) {
tmp = t_1;
} else if (b <= 4.5e-60) {
tmp = (x * pow(a, (t - 1.0))) / y;
} else if (b <= 128000000000.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 * ((z ** y) / a)) / y
t_2 = (x * exp(((log(a) * t) - b))) / y
if (b <= (-3d+21)) then
tmp = t_2
else if (b <= (-5.6d-181)) then
tmp = t_1
else if (b <= 4.5d-60) then
tmp = (x * (a ** (t - 1.0d0))) / y
else if (b <= 128000000000.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(z, y) / a)) / y;
double t_2 = (x * Math.exp(((Math.log(a) * t) - b))) / y;
double tmp;
if (b <= -3e+21) {
tmp = t_2;
} else if (b <= -5.6e-181) {
tmp = t_1;
} else if (b <= 4.5e-60) {
tmp = (x * Math.pow(a, (t - 1.0))) / y;
} else if (b <= 128000000000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x * (math.pow(z, y) / a)) / y t_2 = (x * math.exp(((math.log(a) * t) - b))) / y tmp = 0 if b <= -3e+21: tmp = t_2 elif b <= -5.6e-181: tmp = t_1 elif b <= 4.5e-60: tmp = (x * math.pow(a, (t - 1.0))) / y elif b <= 128000000000.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * Float64((z ^ y) / a)) / y) t_2 = Float64(Float64(x * exp(Float64(Float64(log(a) * t) - b))) / y) tmp = 0.0 if (b <= -3e+21) tmp = t_2; elseif (b <= -5.6e-181) tmp = t_1; elseif (b <= 4.5e-60) tmp = Float64(Float64(x * (a ^ Float64(t - 1.0))) / y); elseif (b <= 128000000000.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 * ((z ^ y) / a)) / y; t_2 = (x * exp(((log(a) * t) - b))) / y; tmp = 0.0; if (b <= -3e+21) tmp = t_2; elseif (b <= -5.6e-181) tmp = t_1; elseif (b <= 4.5e-60) tmp = (x * (a ^ (t - 1.0))) / y; elseif (b <= 128000000000.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[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[Exp[N[(N[(N[Log[a], $MachinePrecision] * t), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[b, -3e+21], t$95$2, If[LessEqual[b, -5.6e-181], t$95$1, If[LessEqual[b, 4.5e-60], N[(N[(x * N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 128000000000.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
t_2 := \frac{x \cdot e^{\log a \cdot t - b}}{y}\\
\mathbf{if}\;b \leq -3 \cdot 10^{+21}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq -5.6 \cdot 10^{-181}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 4.5 \cdot 10^{-60}:\\
\;\;\;\;\frac{x \cdot {a}^{\left(t - 1\right)}}{y}\\
\mathbf{elif}\;b \leq 128000000000:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -3e21 or 1.28e11 < b Initial program 100.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6493.4
Applied rewrites93.4%
if -3e21 < b < -5.59999999999999973e-181 or 4.50000000000000001e-60 < b < 1.28e11Initial program 98.6%
Taylor expanded in b around 0
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f6492.6
Applied rewrites92.6%
Applied rewrites92.8%
Taylor expanded in t around 0
Applied rewrites87.2%
if -5.59999999999999973e-181 < b < 4.50000000000000001e-60Initial program 97.7%
Taylor expanded in b around 0
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f6485.3
Applied rewrites85.3%
Taylor expanded in y around 0
Applied rewrites79.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -4.4e+26)
(* (/ (exp (- b)) y) x)
(if (<= b -5.6e-181)
(/ (* x (/ (pow z y) a)) y)
(if (<= b 12500000000.0)
(/ (* x (pow a (- t 1.0))) y)
(/ (* x (pow (* (exp b) a) -1.0)) y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -4.4e+26) {
tmp = (exp(-b) / y) * x;
} else if (b <= -5.6e-181) {
tmp = (x * (pow(z, y) / a)) / y;
} else if (b <= 12500000000.0) {
tmp = (x * pow(a, (t - 1.0))) / y;
} else {
tmp = (x * pow((exp(b) * a), -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 <= (-4.4d+26)) then
tmp = (exp(-b) / y) * x
else if (b <= (-5.6d-181)) then
tmp = (x * ((z ** y) / a)) / y
else if (b <= 12500000000.0d0) then
tmp = (x * (a ** (t - 1.0d0))) / y
else
tmp = (x * ((exp(b) * a) ** (-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 <= -4.4e+26) {
tmp = (Math.exp(-b) / y) * x;
} else if (b <= -5.6e-181) {
tmp = (x * (Math.pow(z, y) / a)) / y;
} else if (b <= 12500000000.0) {
tmp = (x * Math.pow(a, (t - 1.0))) / y;
} else {
tmp = (x * Math.pow((Math.exp(b) * a), -1.0)) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -4.4e+26: tmp = (math.exp(-b) / y) * x elif b <= -5.6e-181: tmp = (x * (math.pow(z, y) / a)) / y elif b <= 12500000000.0: tmp = (x * math.pow(a, (t - 1.0))) / y else: tmp = (x * math.pow((math.exp(b) * a), -1.0)) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -4.4e+26) tmp = Float64(Float64(exp(Float64(-b)) / y) * x); elseif (b <= -5.6e-181) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y); elseif (b <= 12500000000.0) tmp = Float64(Float64(x * (a ^ Float64(t - 1.0))) / y); else tmp = Float64(Float64(x * (Float64(exp(b) * a) ^ -1.0)) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -4.4e+26) tmp = (exp(-b) / y) * x; elseif (b <= -5.6e-181) tmp = (x * ((z ^ y) / a)) / y; elseif (b <= 12500000000.0) tmp = (x * (a ^ (t - 1.0))) / y; else tmp = (x * ((exp(b) * a) ^ -1.0)) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -4.4e+26], N[(N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[b, -5.6e-181], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 12500000000.0], N[(N[(x * N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[Power[N[(N[Exp[b], $MachinePrecision] * a), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.4 \cdot 10^{+26}:\\
\;\;\;\;\frac{e^{-b}}{y} \cdot x\\
\mathbf{elif}\;b \leq -5.6 \cdot 10^{-181}:\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{elif}\;b \leq 12500000000:\\
\;\;\;\;\frac{x \cdot {a}^{\left(t - 1\right)}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot {\left(e^{b} \cdot a\right)}^{-1}}{y}\\
\end{array}
\end{array}
if b < -4.40000000000000014e26Initial program 100.0%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-log.f64N/A
lower-log.f6494.5
Applied rewrites94.5%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f6485.4
Applied rewrites85.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6485.4
Applied rewrites85.4%
if -4.40000000000000014e26 < b < -5.59999999999999973e-181Initial program 98.8%
Taylor expanded in b around 0
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f6491.7
Applied rewrites91.7%
Applied rewrites92.1%
Taylor expanded in t around 0
Applied rewrites88.8%
if -5.59999999999999973e-181 < b < 1.25e10Initial program 97.8%
Taylor expanded in b around 0
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f6487.8
Applied rewrites87.8%
Taylor expanded in y around 0
Applied rewrites76.3%
if 1.25e10 < b Initial program 100.0%
Taylor expanded in t around 0
exp-diffN/A
lower-/.f64N/A
+-commutativeN/A
fp-cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
exp-diffN/A
rem-exp-logN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-exp.f6471.4
Applied rewrites71.4%
Taylor expanded in y around 0
Applied rewrites83.6%
Final simplification81.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -5.4e+19) (not (<= y 5.8e+147))) (/ (* x (/ (pow z y) a)) y) (/ (* x (exp (- (* (+ -1.0 t) (log a)) b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -5.4e+19) || !(y <= 5.8e+147)) {
tmp = (x * (pow(z, y) / a)) / y;
} else {
tmp = (x * exp((((-1.0 + t) * log(a)) - b))) / 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 ((y <= (-5.4d+19)) .or. (.not. (y <= 5.8d+147))) then
tmp = (x * ((z ** y) / a)) / y
else
tmp = (x * exp(((((-1.0d0) + t) * log(a)) - b))) / 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 ((y <= -5.4e+19) || !(y <= 5.8e+147)) {
tmp = (x * (Math.pow(z, y) / a)) / y;
} else {
tmp = (x * Math.exp((((-1.0 + t) * Math.log(a)) - b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -5.4e+19) or not (y <= 5.8e+147): tmp = (x * (math.pow(z, y) / a)) / y else: tmp = (x * math.exp((((-1.0 + t) * math.log(a)) - b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -5.4e+19) || !(y <= 5.8e+147)) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y); else tmp = Float64(Float64(x * exp(Float64(Float64(Float64(-1.0 + t) * log(a)) - b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -5.4e+19) || ~((y <= 5.8e+147))) tmp = (x * ((z ^ y) / a)) / y; else tmp = (x * exp((((-1.0 + t) * log(a)) - b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -5.4e+19], N[Not[LessEqual[y, 5.8e+147]], $MachinePrecision]], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[Exp[N[(N[(N[(-1.0 + t), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.4 \cdot 10^{+19} \lor \neg \left(y \leq 5.8 \cdot 10^{+147}\right):\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\left(-1 + t\right) \cdot \log a - b}}{y}\\
\end{array}
\end{array}
if y < -5.4e19 or 5.7999999999999997e147 < y Initial program 100.0%
Taylor expanded in b around 0
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f6470.5
Applied rewrites70.5%
Applied rewrites70.5%
Taylor expanded in t around 0
Applied rewrites85.5%
if -5.4e19 < y < 5.7999999999999997e147Initial program 98.4%
Taylor expanded in y around 0
distribute-rgt-out--N/A
metadata-evalN/A
fp-cancel-sign-sub-invN/A
distribute-rgt-outN/A
+-commutativeN/A
*-commutativeN/A
metadata-evalN/A
remove-double-negN/A
distribute-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
distribute-neg-inN/A
metadata-evalN/A
remove-double-negN/A
lower-+.f64N/A
lower-log.f6494.0
Applied rewrites94.0%
Final simplification91.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -4.4e+26) (not (<= b 10500000000.0))) (/ (* x (exp (- (* (log a) t) b))) y) (/ (* x (* (pow a (- t 1.0)) (pow z y))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -4.4e+26) || !(b <= 10500000000.0)) {
tmp = (x * exp(((log(a) * t) - b))) / y;
} else {
tmp = (x * (pow(a, (t - 1.0)) * pow(z, y))) / 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 <= (-4.4d+26)) .or. (.not. (b <= 10500000000.0d0))) then
tmp = (x * exp(((log(a) * t) - b))) / y
else
tmp = (x * ((a ** (t - 1.0d0)) * (z ** y))) / 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 <= -4.4e+26) || !(b <= 10500000000.0)) {
tmp = (x * Math.exp(((Math.log(a) * t) - b))) / y;
} else {
tmp = (x * (Math.pow(a, (t - 1.0)) * Math.pow(z, y))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -4.4e+26) or not (b <= 10500000000.0): tmp = (x * math.exp(((math.log(a) * t) - b))) / y else: tmp = (x * (math.pow(a, (t - 1.0)) * math.pow(z, y))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -4.4e+26) || !(b <= 10500000000.0)) tmp = Float64(Float64(x * exp(Float64(Float64(log(a) * t) - b))) / y); else tmp = Float64(Float64(x * Float64((a ^ Float64(t - 1.0)) * (z ^ y))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -4.4e+26) || ~((b <= 10500000000.0))) tmp = (x * exp(((log(a) * t) - b))) / y; else tmp = (x * ((a ^ (t - 1.0)) * (z ^ y))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -4.4e+26], N[Not[LessEqual[b, 10500000000.0]], $MachinePrecision]], N[(N[(x * N[Exp[N[(N[(N[Log[a], $MachinePrecision] * t), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] * N[Power[z, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.4 \cdot 10^{+26} \lor \neg \left(b \leq 10500000000\right):\\
\;\;\;\;\frac{x \cdot e^{\log a \cdot t - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \left({a}^{\left(t - 1\right)} \cdot {z}^{y}\right)}{y}\\
\end{array}
\end{array}
if b < -4.40000000000000014e26 or 1.05e10 < b Initial program 100.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6492.6
Applied rewrites92.6%
if -4.40000000000000014e26 < b < 1.05e10Initial program 98.1%
Taylor expanded in b around 0
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f6488.9
Applied rewrites88.9%
Final simplification90.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -3e+21) (not (<= b 10500000000.0))) (/ (* x (exp (- (* (log a) t) b))) y) (* (* (pow a (- t 1.0)) (pow z y)) (/ x y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -3e+21) || !(b <= 10500000000.0)) {
tmp = (x * exp(((log(a) * t) - b))) / y;
} else {
tmp = (pow(a, (t - 1.0)) * pow(z, y)) * (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 ((b <= (-3d+21)) .or. (.not. (b <= 10500000000.0d0))) then
tmp = (x * exp(((log(a) * t) - b))) / y
else
tmp = ((a ** (t - 1.0d0)) * (z ** y)) * (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 ((b <= -3e+21) || !(b <= 10500000000.0)) {
tmp = (x * Math.exp(((Math.log(a) * t) - b))) / y;
} else {
tmp = (Math.pow(a, (t - 1.0)) * Math.pow(z, y)) * (x / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -3e+21) or not (b <= 10500000000.0): tmp = (x * math.exp(((math.log(a) * t) - b))) / y else: tmp = (math.pow(a, (t - 1.0)) * math.pow(z, y)) * (x / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -3e+21) || !(b <= 10500000000.0)) tmp = Float64(Float64(x * exp(Float64(Float64(log(a) * t) - b))) / y); else tmp = Float64(Float64((a ^ Float64(t - 1.0)) * (z ^ y)) * Float64(x / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -3e+21) || ~((b <= 10500000000.0))) tmp = (x * exp(((log(a) * t) - b))) / y; else tmp = ((a ^ (t - 1.0)) * (z ^ y)) * (x / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -3e+21], N[Not[LessEqual[b, 10500000000.0]], $MachinePrecision]], N[(N[(x * N[Exp[N[(N[(N[Log[a], $MachinePrecision] * t), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] * N[Power[z, y], $MachinePrecision]), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3 \cdot 10^{+21} \lor \neg \left(b \leq 10500000000\right):\\
\;\;\;\;\frac{x \cdot e^{\log a \cdot t - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\left({a}^{\left(t - 1\right)} \cdot {z}^{y}\right) \cdot \frac{x}{y}\\
\end{array}
\end{array}
if b < -3e21 or 1.05e10 < b Initial program 100.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6492.6
Applied rewrites92.6%
if -3e21 < b < 1.05e10Initial program 98.1%
Taylor expanded in b around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-/.f6477.9
Applied rewrites77.9%
Final simplification84.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -5.4e+23) (not (<= b 12500000000.0))) (* (/ (exp (- b)) y) x) (/ (* x (/ (pow a t) a)) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -5.4e+23) || !(b <= 12500000000.0)) {
tmp = (exp(-b) / y) * x;
} else {
tmp = (x * (pow(a, t) / a)) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-5.4d+23)) .or. (.not. (b <= 12500000000.0d0))) then
tmp = (exp(-b) / y) * x
else
tmp = (x * ((a ** t) / a)) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -5.4e+23) || !(b <= 12500000000.0)) {
tmp = (Math.exp(-b) / y) * x;
} else {
tmp = (x * (Math.pow(a, t) / a)) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -5.4e+23) or not (b <= 12500000000.0): tmp = (math.exp(-b) / y) * x else: tmp = (x * (math.pow(a, t) / a)) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -5.4e+23) || !(b <= 12500000000.0)) tmp = Float64(Float64(exp(Float64(-b)) / y) * x); else tmp = Float64(Float64(x * Float64((a ^ t) / a)) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -5.4e+23) || ~((b <= 12500000000.0))) tmp = (exp(-b) / y) * x; else tmp = (x * ((a ^ t) / a)) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -5.4e+23], N[Not[LessEqual[b, 12500000000.0]], $MachinePrecision]], N[(N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision], N[(N[(x * N[(N[Power[a, t], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.4 \cdot 10^{+23} \lor \neg \left(b \leq 12500000000\right):\\
\;\;\;\;\frac{e^{-b}}{y} \cdot x\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \frac{{a}^{t}}{a}}{y}\\
\end{array}
\end{array}
if b < -5.3999999999999997e23 or 1.25e10 < b Initial program 100.0%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-log.f64N/A
lower-log.f6496.7
Applied rewrites96.7%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f6484.4
Applied rewrites84.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6484.4
Applied rewrites84.4%
if -5.3999999999999997e23 < b < 1.25e10Initial program 98.1%
Taylor expanded in b around 0
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f6488.9
Applied rewrites88.9%
Applied rewrites89.0%
Taylor expanded in y around 0
Applied rewrites74.3%
Final simplification79.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (/ (exp (- b)) y) x)))
(if (<= b -4.4e+26)
t_1
(if (<= b -5.6e-181)
(/ (* x (/ (pow z y) a)) y)
(if (<= b 12500000000.0) (/ (* 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 = (exp(-b) / y) * x;
double tmp;
if (b <= -4.4e+26) {
tmp = t_1;
} else if (b <= -5.6e-181) {
tmp = (x * (pow(z, y) / a)) / y;
} else if (b <= 12500000000.0) {
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 = (exp(-b) / y) * x
if (b <= (-4.4d+26)) then
tmp = t_1
else if (b <= (-5.6d-181)) then
tmp = (x * ((z ** y) / a)) / y
else if (b <= 12500000000.0d0) 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 = (Math.exp(-b) / y) * x;
double tmp;
if (b <= -4.4e+26) {
tmp = t_1;
} else if (b <= -5.6e-181) {
tmp = (x * (Math.pow(z, y) / a)) / y;
} else if (b <= 12500000000.0) {
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 = (math.exp(-b) / y) * x tmp = 0 if b <= -4.4e+26: tmp = t_1 elif b <= -5.6e-181: tmp = (x * (math.pow(z, y) / a)) / y elif b <= 12500000000.0: 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(exp(Float64(-b)) / y) * x) tmp = 0.0 if (b <= -4.4e+26) tmp = t_1; elseif (b <= -5.6e-181) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y); elseif (b <= 12500000000.0) 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 = (exp(-b) / y) * x; tmp = 0.0; if (b <= -4.4e+26) tmp = t_1; elseif (b <= -5.6e-181) tmp = (x * ((z ^ y) / a)) / y; elseif (b <= 12500000000.0) 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[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[b, -4.4e+26], t$95$1, If[LessEqual[b, -5.6e-181], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 12500000000.0], 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{e^{-b}}{y} \cdot x\\
\mathbf{if}\;b \leq -4.4 \cdot 10^{+26}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -5.6 \cdot 10^{-181}:\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{elif}\;b \leq 12500000000:\\
\;\;\;\;\frac{x \cdot {a}^{\left(t - 1\right)}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -4.40000000000000014e26 or 1.25e10 < b Initial program 100.0%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-log.f64N/A
lower-log.f6496.7
Applied rewrites96.7%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f6484.4
Applied rewrites84.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6484.4
Applied rewrites84.4%
if -4.40000000000000014e26 < b < -5.59999999999999973e-181Initial program 98.8%
Taylor expanded in b around 0
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f6491.7
Applied rewrites91.7%
Applied rewrites92.1%
Taylor expanded in t around 0
Applied rewrites88.8%
if -5.59999999999999973e-181 < b < 1.25e10Initial program 97.8%
Taylor expanded in b around 0
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f6487.8
Applied rewrites87.8%
Taylor expanded in y around 0
Applied rewrites76.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -5.4e+23) (not (<= b 12500000000.0))) (* (/ (exp (- b)) y) x) (/ (* x (pow a (- t 1.0))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -5.4e+23) || !(b <= 12500000000.0)) {
tmp = (exp(-b) / y) * x;
} else {
tmp = (x * pow(a, (t - 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 <= (-5.4d+23)) .or. (.not. (b <= 12500000000.0d0))) then
tmp = (exp(-b) / y) * x
else
tmp = (x * (a ** (t - 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 <= -5.4e+23) || !(b <= 12500000000.0)) {
tmp = (Math.exp(-b) / y) * x;
} else {
tmp = (x * Math.pow(a, (t - 1.0))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -5.4e+23) or not (b <= 12500000000.0): tmp = (math.exp(-b) / y) * x else: tmp = (x * math.pow(a, (t - 1.0))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -5.4e+23) || !(b <= 12500000000.0)) tmp = Float64(Float64(exp(Float64(-b)) / y) * x); else tmp = Float64(Float64(x * (a ^ Float64(t - 1.0))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -5.4e+23) || ~((b <= 12500000000.0))) tmp = (exp(-b) / y) * x; else tmp = (x * (a ^ (t - 1.0))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -5.4e+23], N[Not[LessEqual[b, 12500000000.0]], $MachinePrecision]], N[(N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision], N[(N[(x * N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.4 \cdot 10^{+23} \lor \neg \left(b \leq 12500000000\right):\\
\;\;\;\;\frac{e^{-b}}{y} \cdot x\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot {a}^{\left(t - 1\right)}}{y}\\
\end{array}
\end{array}
if b < -5.3999999999999997e23 or 1.25e10 < b Initial program 100.0%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-log.f64N/A
lower-log.f6496.7
Applied rewrites96.7%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f6484.4
Applied rewrites84.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6484.4
Applied rewrites84.4%
if -5.3999999999999997e23 < b < 1.25e10Initial program 98.1%
Taylor expanded in b around 0
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f6488.9
Applied rewrites88.9%
Taylor expanded in y around 0
Applied rewrites74.2%
Final simplification79.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -3e+21) (not (<= b 1.95))) (* (/ (exp (- b)) y) x) (/ (* x (/ 1.0 a)) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -3e+21) || !(b <= 1.95)) {
tmp = (exp(-b) / y) * x;
} else {
tmp = (x * (1.0 / a)) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-3d+21)) .or. (.not. (b <= 1.95d0))) then
tmp = (exp(-b) / y) * x
else
tmp = (x * (1.0d0 / a)) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -3e+21) || !(b <= 1.95)) {
tmp = (Math.exp(-b) / y) * x;
} else {
tmp = (x * (1.0 / a)) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -3e+21) or not (b <= 1.95): tmp = (math.exp(-b) / y) * x else: tmp = (x * (1.0 / a)) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -3e+21) || !(b <= 1.95)) tmp = Float64(Float64(exp(Float64(-b)) / y) * x); else tmp = Float64(Float64(x * Float64(1.0 / a)) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -3e+21) || ~((b <= 1.95))) tmp = (exp(-b) / y) * x; else tmp = (x * (1.0 / a)) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -3e+21], N[Not[LessEqual[b, 1.95]], $MachinePrecision]], N[(N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision], N[(N[(x * N[(1.0 / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3 \cdot 10^{+21} \lor \neg \left(b \leq 1.95\right):\\
\;\;\;\;\frac{e^{-b}}{y} \cdot x\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \frac{1}{a}}{y}\\
\end{array}
\end{array}
if b < -3e21 or 1.94999999999999996 < b Initial program 100.0%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-log.f64N/A
lower-log.f6496.8
Applied rewrites96.8%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f6483.2
Applied rewrites83.2%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6483.2
Applied rewrites83.2%
if -3e21 < b < 1.94999999999999996Initial program 98.0%
Taylor expanded in t around 0
exp-diffN/A
lower-/.f64N/A
+-commutativeN/A
fp-cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
exp-diffN/A
rem-exp-logN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-exp.f6472.5
Applied rewrites72.5%
Taylor expanded in y around 0
Applied rewrites39.3%
Taylor expanded in b around 0
Applied rewrites41.5%
Taylor expanded in b around 0
Applied rewrites41.5%
Final simplification61.6%
(FPCore (x y z t a b) :precision binary64 (if (<= b -2.3e+27) (/ (* x (/ (/ (- (* b b) 1.0) (+ b 1.0)) (- a))) y) (/ (* x (/ 1.0 a)) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.3e+27) {
tmp = (x * ((((b * b) - 1.0) / (b + 1.0)) / -a)) / y;
} else {
tmp = (x * (1.0 / a)) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-2.3d+27)) then
tmp = (x * ((((b * b) - 1.0d0) / (b + 1.0d0)) / -a)) / y
else
tmp = (x * (1.0d0 / a)) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.3e+27) {
tmp = (x * ((((b * b) - 1.0) / (b + 1.0)) / -a)) / y;
} else {
tmp = (x * (1.0 / a)) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -2.3e+27: tmp = (x * ((((b * b) - 1.0) / (b + 1.0)) / -a)) / y else: tmp = (x * (1.0 / a)) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -2.3e+27) tmp = Float64(Float64(x * Float64(Float64(Float64(Float64(b * b) - 1.0) / Float64(b + 1.0)) / Float64(-a))) / y); else tmp = Float64(Float64(x * Float64(1.0 / a)) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -2.3e+27) tmp = (x * ((((b * b) - 1.0) / (b + 1.0)) / -a)) / y; else tmp = (x * (1.0 / a)) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -2.3e+27], N[(N[(x * N[(N[(N[(N[(b * b), $MachinePrecision] - 1.0), $MachinePrecision] / N[(b + 1.0), $MachinePrecision]), $MachinePrecision] / (-a)), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[(1.0 / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.3 \cdot 10^{+27}:\\
\;\;\;\;\frac{x \cdot \frac{\frac{b \cdot b - 1}{b + 1}}{-a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \frac{1}{a}}{y}\\
\end{array}
\end{array}
if b < -2.3000000000000001e27Initial program 100.0%
Taylor expanded in t around 0
exp-diffN/A
lower-/.f64N/A
+-commutativeN/A
fp-cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
exp-diffN/A
rem-exp-logN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-exp.f6472.3
Applied rewrites72.3%
Taylor expanded in y around 0
Applied rewrites85.4%
Taylor expanded in b around 0
Applied rewrites57.1%
Applied rewrites67.7%
if -2.3000000000000001e27 < b Initial program 98.7%
Taylor expanded in t around 0
exp-diffN/A
lower-/.f64N/A
+-commutativeN/A
fp-cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
exp-diffN/A
rem-exp-logN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-exp.f6472.1
Applied rewrites72.1%
Taylor expanded in y around 0
Applied rewrites53.7%
Taylor expanded in b around 0
Applied rewrites29.5%
Taylor expanded in b around 0
Applied rewrites32.6%
Final simplification40.0%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.9e+22) (* (/ (/ (fma -1.0 b 1.0) a) y) x) (/ (* x (/ 1.0 a)) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.9e+22) {
tmp = ((fma(-1.0, b, 1.0) / a) / y) * x;
} else {
tmp = (x * (1.0 / a)) / y;
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.9e+22) tmp = Float64(Float64(Float64(fma(-1.0, b, 1.0) / a) / y) * x); else tmp = Float64(Float64(x * Float64(1.0 / a)) / y); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.9e+22], N[(N[(N[(N[(-1.0 * b + 1.0), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision], N[(N[(x * N[(1.0 / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.9 \cdot 10^{+22}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(-1, b, 1\right)}{a}}{y} \cdot x\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \frac{1}{a}}{y}\\
\end{array}
\end{array}
if b < -1.9000000000000002e22Initial program 100.0%
Taylor expanded in t around 0
exp-diffN/A
lower-/.f64N/A
+-commutativeN/A
fp-cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
exp-diffN/A
rem-exp-logN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-exp.f6472.3
Applied rewrites72.3%
Taylor expanded in y around 0
Applied rewrites85.4%
Taylor expanded in b around 0
Applied rewrites57.1%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites58.9%
if -1.9000000000000002e22 < b Initial program 98.7%
Taylor expanded in t around 0
exp-diffN/A
lower-/.f64N/A
+-commutativeN/A
fp-cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
exp-diffN/A
rem-exp-logN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-exp.f6472.1
Applied rewrites72.1%
Taylor expanded in y around 0
Applied rewrites53.7%
Taylor expanded in b around 0
Applied rewrites29.5%
Taylor expanded in b around 0
Applied rewrites32.6%
(FPCore (x y z t a b) :precision binary64 (if (<= b -2.3e+27) (/ (* x (/ (- b) a)) y) (/ (* x (/ 1.0 a)) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.3e+27) {
tmp = (x * (-b / a)) / y;
} else {
tmp = (x * (1.0 / a)) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-2.3d+27)) then
tmp = (x * (-b / a)) / y
else
tmp = (x * (1.0d0 / a)) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.3e+27) {
tmp = (x * (-b / a)) / y;
} else {
tmp = (x * (1.0 / a)) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -2.3e+27: tmp = (x * (-b / a)) / y else: tmp = (x * (1.0 / a)) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -2.3e+27) tmp = Float64(Float64(x * Float64(Float64(-b) / a)) / y); else tmp = Float64(Float64(x * Float64(1.0 / a)) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -2.3e+27) tmp = (x * (-b / a)) / y; else tmp = (x * (1.0 / a)) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -2.3e+27], N[(N[(x * N[((-b) / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[(1.0 / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.3 \cdot 10^{+27}:\\
\;\;\;\;\frac{x \cdot \frac{-b}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \frac{1}{a}}{y}\\
\end{array}
\end{array}
if b < -2.3000000000000001e27Initial program 100.0%
Taylor expanded in t around 0
exp-diffN/A
lower-/.f64N/A
+-commutativeN/A
fp-cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
exp-diffN/A
rem-exp-logN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-exp.f6472.3
Applied rewrites72.3%
Taylor expanded in y around 0
Applied rewrites85.4%
Taylor expanded in b around 0
Applied rewrites57.1%
Taylor expanded in b around inf
Applied rewrites57.1%
if -2.3000000000000001e27 < b Initial program 98.7%
Taylor expanded in t around 0
exp-diffN/A
lower-/.f64N/A
+-commutativeN/A
fp-cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
exp-diffN/A
rem-exp-logN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-exp.f6472.1
Applied rewrites72.1%
Taylor expanded in y around 0
Applied rewrites53.7%
Taylor expanded in b around 0
Applied rewrites29.5%
Taylor expanded in b around 0
Applied rewrites32.6%
(FPCore (x y z t a b) :precision binary64 (/ (* x (/ 1.0 a)) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * (1.0 / a)) / 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 * (1.0d0 / a)) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x * (1.0 / a)) / y;
}
def code(x, y, z, t, a, b): return (x * (1.0 / a)) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * Float64(1.0 / a)) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * (1.0 / a)) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[(1.0 / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot \frac{1}{a}}{y}
\end{array}
Initial program 99.0%
Taylor expanded in t around 0
exp-diffN/A
lower-/.f64N/A
+-commutativeN/A
fp-cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
exp-diffN/A
rem-exp-logN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-exp.f6472.1
Applied rewrites72.1%
Taylor expanded in y around 0
Applied rewrites60.4%
Taylor expanded in b around 0
Applied rewrites35.3%
Taylor expanded in b around 0
Applied rewrites32.6%
(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 2024329
(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))