
(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 18 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 98.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- t 1.0) (log a))))
(if (<= t_1 -5000000000000.0)
(* x (/ (pow a (- t 1.0)) y))
(if (<= t_1 580.0)
(/ x (* (* (exp b) y) a))
(/ (/ (* (pow a t) x) y) a)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - 1.0) * log(a);
double tmp;
if (t_1 <= -5000000000000.0) {
tmp = x * (pow(a, (t - 1.0)) / y);
} else if (t_1 <= 580.0) {
tmp = x / ((exp(b) * y) * a);
} else {
tmp = ((pow(a, t) * x) / y) / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (t - 1.0d0) * log(a)
if (t_1 <= (-5000000000000.0d0)) then
tmp = x * ((a ** (t - 1.0d0)) / y)
else if (t_1 <= 580.0d0) then
tmp = x / ((exp(b) * y) * a)
else
tmp = (((a ** t) * x) / y) / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - 1.0) * Math.log(a);
double tmp;
if (t_1 <= -5000000000000.0) {
tmp = x * (Math.pow(a, (t - 1.0)) / y);
} else if (t_1 <= 580.0) {
tmp = x / ((Math.exp(b) * y) * a);
} else {
tmp = ((Math.pow(a, t) * x) / y) / a;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - 1.0) * math.log(a) tmp = 0 if t_1 <= -5000000000000.0: tmp = x * (math.pow(a, (t - 1.0)) / y) elif t_1 <= 580.0: tmp = x / ((math.exp(b) * y) * a) else: tmp = ((math.pow(a, t) * x) / y) / a return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - 1.0) * log(a)) tmp = 0.0 if (t_1 <= -5000000000000.0) tmp = Float64(x * Float64((a ^ Float64(t - 1.0)) / y)); elseif (t_1 <= 580.0) tmp = Float64(x / Float64(Float64(exp(b) * y) * a)); else tmp = Float64(Float64(Float64((a ^ t) * x) / y) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - 1.0) * log(a); tmp = 0.0; if (t_1 <= -5000000000000.0) tmp = x * ((a ^ (t - 1.0)) / y); elseif (t_1 <= 580.0) tmp = x / ((exp(b) * y) * a); else tmp = (((a ^ t) * x) / y) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5000000000000.0], N[(x * N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 580.0], N[(x / N[(N[(N[Exp[b], $MachinePrecision] * y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[Power[a, t], $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision] / a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t - 1\right) \cdot \log a\\
\mathbf{if}\;t\_1 \leq -5000000000000:\\
\;\;\;\;x \cdot \frac{{a}^{\left(t - 1\right)}}{y}\\
\mathbf{elif}\;t\_1 \leq 580:\\
\;\;\;\;\frac{x}{\left(e^{b} \cdot y\right) \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{{a}^{t} \cdot x}{y}}{a}\\
\end{array}
\end{array}
if (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -5e12Initial program 100.0%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f64N/A
lower-/.f64N/A
lower-exp.f6471.8
Applied rewrites71.8%
Taylor expanded in b around 0
Applied rewrites85.3%
if -5e12 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 580Initial program 97.0%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f64N/A
lower-/.f64N/A
lower-exp.f6467.5
Applied rewrites67.5%
Applied rewrites69.1%
Taylor expanded in t around 0
Applied rewrites77.0%
if 580 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) Initial program 99.5%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f64N/A
lower-/.f64N/A
lower-exp.f6469.9
Applied rewrites69.9%
Applied rewrites73.4%
Taylor expanded in b around 0
Applied rewrites80.4%
Applied rewrites81.8%
Final simplification80.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- t 1.0) (log a))))
(if (<= t_1 -5000000000000.0)
(* x (/ (pow a (- t 1.0)) y))
(if (<= t_1 580.0)
(/ x (* (* (exp b) y) a))
(/ (/ (* (pow a t) x) a) y)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - 1.0) * log(a);
double tmp;
if (t_1 <= -5000000000000.0) {
tmp = x * (pow(a, (t - 1.0)) / y);
} else if (t_1 <= 580.0) {
tmp = x / ((exp(b) * y) * a);
} else {
tmp = ((pow(a, t) * x) / a) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (t - 1.0d0) * log(a)
if (t_1 <= (-5000000000000.0d0)) then
tmp = x * ((a ** (t - 1.0d0)) / y)
else if (t_1 <= 580.0d0) then
tmp = x / ((exp(b) * y) * a)
else
tmp = (((a ** t) * x) / a) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - 1.0) * Math.log(a);
double tmp;
if (t_1 <= -5000000000000.0) {
tmp = x * (Math.pow(a, (t - 1.0)) / y);
} else if (t_1 <= 580.0) {
tmp = x / ((Math.exp(b) * y) * a);
} else {
tmp = ((Math.pow(a, t) * x) / a) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - 1.0) * math.log(a) tmp = 0 if t_1 <= -5000000000000.0: tmp = x * (math.pow(a, (t - 1.0)) / y) elif t_1 <= 580.0: tmp = x / ((math.exp(b) * y) * a) else: tmp = ((math.pow(a, t) * x) / a) / y return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - 1.0) * log(a)) tmp = 0.0 if (t_1 <= -5000000000000.0) tmp = Float64(x * Float64((a ^ Float64(t - 1.0)) / y)); elseif (t_1 <= 580.0) tmp = Float64(x / Float64(Float64(exp(b) * y) * a)); else tmp = Float64(Float64(Float64((a ^ t) * x) / a) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - 1.0) * log(a); tmp = 0.0; if (t_1 <= -5000000000000.0) tmp = x * ((a ^ (t - 1.0)) / y); elseif (t_1 <= 580.0) tmp = x / ((exp(b) * y) * a); else tmp = (((a ^ t) * x) / a) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5000000000000.0], N[(x * N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 580.0], N[(x / N[(N[(N[Exp[b], $MachinePrecision] * y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[Power[a, t], $MachinePrecision] * x), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t - 1\right) \cdot \log a\\
\mathbf{if}\;t\_1 \leq -5000000000000:\\
\;\;\;\;x \cdot \frac{{a}^{\left(t - 1\right)}}{y}\\
\mathbf{elif}\;t\_1 \leq 580:\\
\;\;\;\;\frac{x}{\left(e^{b} \cdot y\right) \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{{a}^{t} \cdot x}{a}}{y}\\
\end{array}
\end{array}
if (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -5e12Initial program 100.0%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f64N/A
lower-/.f64N/A
lower-exp.f6471.8
Applied rewrites71.8%
Taylor expanded in b around 0
Applied rewrites85.3%
if -5e12 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 580Initial program 97.0%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f64N/A
lower-/.f64N/A
lower-exp.f6467.5
Applied rewrites67.5%
Applied rewrites69.1%
Taylor expanded in t around 0
Applied rewrites77.0%
if 580 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) Initial program 99.5%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f64N/A
lower-/.f64N/A
lower-exp.f6469.9
Applied rewrites69.9%
Applied rewrites73.4%
Taylor expanded in b around 0
Applied rewrites80.4%
Final simplification80.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (pow a (- t 1.0))) (t_2 (* (- t 1.0) (log a))))
(if (<= t_2 -5000000000000.0)
(* x (/ t_1 y))
(if (<= t_2 580.0) (/ x (* (* (exp b) y) a)) (/ (* x t_1) y)))))
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 = (t - 1.0) * log(a);
double tmp;
if (t_2 <= -5000000000000.0) {
tmp = x * (t_1 / y);
} else if (t_2 <= 580.0) {
tmp = x / ((exp(b) * y) * a);
} else {
tmp = (x * t_1) / 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = a ** (t - 1.0d0)
t_2 = (t - 1.0d0) * log(a)
if (t_2 <= (-5000000000000.0d0)) then
tmp = x * (t_1 / y)
else if (t_2 <= 580.0d0) then
tmp = x / ((exp(b) * y) * a)
else
tmp = (x * t_1) / y
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 = (t - 1.0) * Math.log(a);
double tmp;
if (t_2 <= -5000000000000.0) {
tmp = x * (t_1 / y);
} else if (t_2 <= 580.0) {
tmp = x / ((Math.exp(b) * y) * a);
} else {
tmp = (x * t_1) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = math.pow(a, (t - 1.0)) t_2 = (t - 1.0) * math.log(a) tmp = 0 if t_2 <= -5000000000000.0: tmp = x * (t_1 / y) elif t_2 <= 580.0: tmp = x / ((math.exp(b) * y) * a) else: tmp = (x * t_1) / y return tmp
function code(x, y, z, t, a, b) t_1 = a ^ Float64(t - 1.0) t_2 = Float64(Float64(t - 1.0) * log(a)) tmp = 0.0 if (t_2 <= -5000000000000.0) tmp = Float64(x * Float64(t_1 / y)); elseif (t_2 <= 580.0) tmp = Float64(x / Float64(Float64(exp(b) * y) * a)); else tmp = Float64(Float64(x * t_1) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a ^ (t - 1.0); t_2 = (t - 1.0) * log(a); tmp = 0.0; if (t_2 <= -5000000000000.0) tmp = x * (t_1 / y); elseif (t_2 <= 580.0) tmp = x / ((exp(b) * y) * a); else tmp = (x * t_1) / y; 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[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5000000000000.0], N[(x * N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 580.0], N[(x / N[(N[(N[Exp[b], $MachinePrecision] * y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(N[(x * t$95$1), $MachinePrecision] / y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {a}^{\left(t - 1\right)}\\
t_2 := \left(t - 1\right) \cdot \log a\\
\mathbf{if}\;t\_2 \leq -5000000000000:\\
\;\;\;\;x \cdot \frac{t\_1}{y}\\
\mathbf{elif}\;t\_2 \leq 580:\\
\;\;\;\;\frac{x}{\left(e^{b} \cdot y\right) \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot t\_1}{y}\\
\end{array}
\end{array}
if (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -5e12Initial program 100.0%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f64N/A
lower-/.f64N/A
lower-exp.f6471.8
Applied rewrites71.8%
Taylor expanded in b around 0
Applied rewrites85.3%
if -5e12 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 580Initial program 97.0%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f64N/A
lower-/.f64N/A
lower-exp.f6467.5
Applied rewrites67.5%
Applied rewrites69.1%
Taylor expanded in t around 0
Applied rewrites77.0%
if 580 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) Initial program 99.5%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log85.6
Applied rewrites85.6%
Taylor expanded in b around 0
exp-sumN/A
*-commutativeN/A
exp-to-powN/A
lower-*.f64N/A
lower-pow.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f6480.6
Applied rewrites80.6%
Taylor expanded in y around 0
Applied rewrites80.4%
Final simplification80.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (pow a (- t 1.0))) (t_2 (* (- t 1.0) (log a))))
(if (<= t_2 -5000000000000.0)
(* x (/ t_1 y))
(if (<= t_2 580.0) (/ x (* (* (exp b) a) y)) (/ (* x t_1) y)))))
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 = (t - 1.0) * log(a);
double tmp;
if (t_2 <= -5000000000000.0) {
tmp = x * (t_1 / y);
} else if (t_2 <= 580.0) {
tmp = x / ((exp(b) * a) * y);
} else {
tmp = (x * t_1) / 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = a ** (t - 1.0d0)
t_2 = (t - 1.0d0) * log(a)
if (t_2 <= (-5000000000000.0d0)) then
tmp = x * (t_1 / y)
else if (t_2 <= 580.0d0) then
tmp = x / ((exp(b) * a) * y)
else
tmp = (x * t_1) / y
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 = (t - 1.0) * Math.log(a);
double tmp;
if (t_2 <= -5000000000000.0) {
tmp = x * (t_1 / y);
} else if (t_2 <= 580.0) {
tmp = x / ((Math.exp(b) * a) * y);
} else {
tmp = (x * t_1) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = math.pow(a, (t - 1.0)) t_2 = (t - 1.0) * math.log(a) tmp = 0 if t_2 <= -5000000000000.0: tmp = x * (t_1 / y) elif t_2 <= 580.0: tmp = x / ((math.exp(b) * a) * y) else: tmp = (x * t_1) / y return tmp
function code(x, y, z, t, a, b) t_1 = a ^ Float64(t - 1.0) t_2 = Float64(Float64(t - 1.0) * log(a)) tmp = 0.0 if (t_2 <= -5000000000000.0) tmp = Float64(x * Float64(t_1 / y)); elseif (t_2 <= 580.0) tmp = Float64(x / Float64(Float64(exp(b) * a) * y)); else tmp = Float64(Float64(x * t_1) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a ^ (t - 1.0); t_2 = (t - 1.0) * log(a); tmp = 0.0; if (t_2 <= -5000000000000.0) tmp = x * (t_1 / y); elseif (t_2 <= 580.0) tmp = x / ((exp(b) * a) * y); else tmp = (x * t_1) / y; 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[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5000000000000.0], N[(x * N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 580.0], N[(x / N[(N[(N[Exp[b], $MachinePrecision] * a), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], N[(N[(x * t$95$1), $MachinePrecision] / y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {a}^{\left(t - 1\right)}\\
t_2 := \left(t - 1\right) \cdot \log a\\
\mathbf{if}\;t\_2 \leq -5000000000000:\\
\;\;\;\;x \cdot \frac{t\_1}{y}\\
\mathbf{elif}\;t\_2 \leq 580:\\
\;\;\;\;\frac{x}{\left(e^{b} \cdot a\right) \cdot y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot t\_1}{y}\\
\end{array}
\end{array}
if (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -5e12Initial program 100.0%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f64N/A
lower-/.f64N/A
lower-exp.f6471.8
Applied rewrites71.8%
Taylor expanded in b around 0
Applied rewrites85.3%
if -5e12 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 580Initial program 97.0%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f64N/A
lower-/.f64N/A
lower-exp.f6467.5
Applied rewrites67.5%
Taylor expanded in t around 0
Applied rewrites76.9%
if 580 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) Initial program 99.5%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log85.6
Applied rewrites85.6%
Taylor expanded in b around 0
exp-sumN/A
*-commutativeN/A
exp-to-powN/A
lower-*.f64N/A
lower-pow.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f6480.6
Applied rewrites80.6%
Taylor expanded in y around 0
Applied rewrites80.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.5e+37) (not (<= y 3.7e+21))) (/ (* x (exp (- (fma (log z) y (- (log a))) b))) y) (/ (* x (exp (- (* (- t 1.0) (log a)) b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.5e+37) || !(y <= 3.7e+21)) {
tmp = (x * exp((fma(log(z), y, -log(a)) - b))) / y;
} else {
tmp = (x * exp((((t - 1.0) * log(a)) - b))) / y;
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.5e+37) || !(y <= 3.7e+21)) tmp = Float64(Float64(x * exp(Float64(fma(log(z), y, Float64(-log(a))) - b))) / y); else tmp = Float64(Float64(x * exp(Float64(Float64(Float64(t - 1.0) * log(a)) - b))) / y); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.5e+37], N[Not[LessEqual[y, 3.7e+21]], $MachinePrecision]], 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[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.5 \cdot 10^{+37} \lor \neg \left(y \leq 3.7 \cdot 10^{+21}\right):\\
\;\;\;\;\frac{x \cdot e^{\mathsf{fma}\left(\log z, y, -\log a\right) - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\left(t - 1\right) \cdot \log a - b}}{y}\\
\end{array}
\end{array}
if y < -1.50000000000000011e37 or 3.7e21 < y Initial program 100.0%
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
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log95.5
Applied rewrites95.5%
if -1.50000000000000011e37 < y < 3.7e21Initial program 97.4%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log96.2
Applied rewrites96.2%
Final simplification95.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (exp (- (* (log a) t) b))) y)))
(if (<= b -5.1e+19)
t_1
(if (<= b -3.1e-171)
(/ (* x (pow a (- t 1.0))) y)
(if (<= b 1.16e-43) (/ (* x (* (pow z y) (pow a -1.0))) y) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * exp(((log(a) * t) - b))) / y;
double tmp;
if (b <= -5.1e+19) {
tmp = t_1;
} else if (b <= -3.1e-171) {
tmp = (x * pow(a, (t - 1.0))) / y;
} else if (b <= 1.16e-43) {
tmp = (x * (pow(z, y) * pow(a, -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(((log(a) * t) - b))) / y
if (b <= (-5.1d+19)) then
tmp = t_1
else if (b <= (-3.1d-171)) then
tmp = (x * (a ** (t - 1.0d0))) / y
else if (b <= 1.16d-43) then
tmp = (x * ((z ** y) * (a ** (-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(((Math.log(a) * t) - b))) / y;
double tmp;
if (b <= -5.1e+19) {
tmp = t_1;
} else if (b <= -3.1e-171) {
tmp = (x * Math.pow(a, (t - 1.0))) / y;
} else if (b <= 1.16e-43) {
tmp = (x * (Math.pow(z, y) * Math.pow(a, -1.0))) / y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x * math.exp(((math.log(a) * t) - b))) / y tmp = 0 if b <= -5.1e+19: tmp = t_1 elif b <= -3.1e-171: tmp = (x * math.pow(a, (t - 1.0))) / y elif b <= 1.16e-43: tmp = (x * (math.pow(z, y) * math.pow(a, -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(log(a) * t) - b))) / y) tmp = 0.0 if (b <= -5.1e+19) tmp = t_1; elseif (b <= -3.1e-171) tmp = Float64(Float64(x * (a ^ Float64(t - 1.0))) / y); elseif (b <= 1.16e-43) tmp = Float64(Float64(x * Float64((z ^ y) * (a ^ -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(((log(a) * t) - b))) / y; tmp = 0.0; if (b <= -5.1e+19) tmp = t_1; elseif (b <= -3.1e-171) tmp = (x * (a ^ (t - 1.0))) / y; elseif (b <= 1.16e-43) tmp = (x * ((z ^ y) * (a ^ -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[(N[Log[a], $MachinePrecision] * t), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[b, -5.1e+19], t$95$1, If[LessEqual[b, -3.1e-171], N[(N[(x * N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 1.16e-43], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] * N[Power[a, -1.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot e^{\log a \cdot t - b}}{y}\\
\mathbf{if}\;b \leq -5.1 \cdot 10^{+19}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -3.1 \cdot 10^{-171}:\\
\;\;\;\;\frac{x \cdot {a}^{\left(t - 1\right)}}{y}\\
\mathbf{elif}\;b \leq 1.16 \cdot 10^{-43}:\\
\;\;\;\;\frac{x \cdot \left({z}^{y} \cdot {a}^{-1}\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -5.1e19 or 1.1600000000000001e-43 < b Initial program 99.7%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log92.1
Applied rewrites92.1%
if -5.1e19 < b < -3.1e-171Initial program 96.2%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log84.5
Applied rewrites84.5%
Taylor expanded in b around 0
exp-sumN/A
*-commutativeN/A
exp-to-powN/A
lower-*.f64N/A
lower-pow.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f6489.5
Applied rewrites89.5%
Taylor expanded in y around 0
Applied rewrites88.2%
if -3.1e-171 < b < 1.1600000000000001e-43Initial program 97.6%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log63.3
Applied rewrites63.3%
Taylor expanded in b around 0
exp-sumN/A
*-commutativeN/A
exp-to-powN/A
lower-*.f64N/A
lower-pow.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f6489.1
Applied rewrites89.1%
Taylor expanded in t around 0
Applied rewrites78.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (exp (- b))))
(if (<= b -1.15e+20)
(* (/ t_1 y) x)
(if (<= b -3.1e-171)
(/ (* x (pow a (- t 1.0))) y)
(if (<= b 7.5e+30)
(/ (* x (* (pow z y) (pow a -1.0))) y)
(/ (* x (/ t_1 a)) y))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = exp(-b);
double tmp;
if (b <= -1.15e+20) {
tmp = (t_1 / y) * x;
} else if (b <= -3.1e-171) {
tmp = (x * pow(a, (t - 1.0))) / y;
} else if (b <= 7.5e+30) {
tmp = (x * (pow(z, y) * pow(a, -1.0))) / y;
} else {
tmp = (x * (t_1 / 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) :: t_1
real(8) :: tmp
t_1 = exp(-b)
if (b <= (-1.15d+20)) then
tmp = (t_1 / y) * x
else if (b <= (-3.1d-171)) then
tmp = (x * (a ** (t - 1.0d0))) / y
else if (b <= 7.5d+30) then
tmp = (x * ((z ** y) * (a ** (-1.0d0)))) / y
else
tmp = (x * (t_1 / 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 t_1 = Math.exp(-b);
double tmp;
if (b <= -1.15e+20) {
tmp = (t_1 / y) * x;
} else if (b <= -3.1e-171) {
tmp = (x * Math.pow(a, (t - 1.0))) / y;
} else if (b <= 7.5e+30) {
tmp = (x * (Math.pow(z, y) * Math.pow(a, -1.0))) / y;
} else {
tmp = (x * (t_1 / a)) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = math.exp(-b) tmp = 0 if b <= -1.15e+20: tmp = (t_1 / y) * x elif b <= -3.1e-171: tmp = (x * math.pow(a, (t - 1.0))) / y elif b <= 7.5e+30: tmp = (x * (math.pow(z, y) * math.pow(a, -1.0))) / y else: tmp = (x * (t_1 / a)) / y return tmp
function code(x, y, z, t, a, b) t_1 = exp(Float64(-b)) tmp = 0.0 if (b <= -1.15e+20) tmp = Float64(Float64(t_1 / y) * x); elseif (b <= -3.1e-171) tmp = Float64(Float64(x * (a ^ Float64(t - 1.0))) / y); elseif (b <= 7.5e+30) tmp = Float64(Float64(x * Float64((z ^ y) * (a ^ -1.0))) / y); else tmp = Float64(Float64(x * Float64(t_1 / a)) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = exp(-b); tmp = 0.0; if (b <= -1.15e+20) tmp = (t_1 / y) * x; elseif (b <= -3.1e-171) tmp = (x * (a ^ (t - 1.0))) / y; elseif (b <= 7.5e+30) tmp = (x * ((z ^ y) * (a ^ -1.0))) / y; else tmp = (x * (t_1 / a)) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[Exp[(-b)], $MachinePrecision]}, If[LessEqual[b, -1.15e+20], N[(N[(t$95$1 / y), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[b, -3.1e-171], N[(N[(x * N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 7.5e+30], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] * N[Power[a, -1.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[(t$95$1 / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := e^{-b}\\
\mathbf{if}\;b \leq -1.15 \cdot 10^{+20}:\\
\;\;\;\;\frac{t\_1}{y} \cdot x\\
\mathbf{elif}\;b \leq -3.1 \cdot 10^{-171}:\\
\;\;\;\;\frac{x \cdot {a}^{\left(t - 1\right)}}{y}\\
\mathbf{elif}\;b \leq 7.5 \cdot 10^{+30}:\\
\;\;\;\;\frac{x \cdot \left({z}^{y} \cdot {a}^{-1}\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \frac{t\_1}{a}}{y}\\
\end{array}
\end{array}
if b < -1.15e20Initial program 100.0%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log95.0
Applied rewrites95.0%
Taylor expanded in b around inf
neg-mul-1N/A
lower-neg.f6480.0
Applied rewrites80.0%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6480.0
Applied rewrites80.0%
if -1.15e20 < b < -3.1e-171Initial program 96.2%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log84.5
Applied rewrites84.5%
Taylor expanded in b around 0
exp-sumN/A
*-commutativeN/A
exp-to-powN/A
lower-*.f64N/A
lower-pow.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f6489.5
Applied rewrites89.5%
Taylor expanded in y around 0
Applied rewrites88.2%
if -3.1e-171 < b < 7.49999999999999973e30Initial program 97.7%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log67.8
Applied rewrites67.8%
Taylor expanded in b around 0
exp-sumN/A
*-commutativeN/A
exp-to-powN/A
lower-*.f64N/A
lower-pow.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f6489.7
Applied rewrites89.7%
Taylor expanded in t around 0
Applied rewrites76.9%
if 7.49999999999999973e30 < b Initial program 100.0%
Taylor expanded in t around 0
exp-diffN/A
lower-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
rem-exp-logN/A
lower-exp.f6479.0
Applied rewrites79.0%
Taylor expanded in y around 0
Applied rewrites91.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -2.35e+101)
(/ (* x (/ (pow z y) a)) y)
(if (<= y 1.12e+35)
(/ (* x (exp (- (* (- t 1.0) (log a)) b))) y)
(/ (* x (exp (* (log z) y))) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.35e+101) {
tmp = (x * (pow(z, y) / a)) / y;
} else if (y <= 1.12e+35) {
tmp = (x * exp((((t - 1.0) * log(a)) - b))) / y;
} else {
tmp = (x * exp((log(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 (y <= (-2.35d+101)) then
tmp = (x * ((z ** y) / a)) / y
else if (y <= 1.12d+35) then
tmp = (x * exp((((t - 1.0d0) * log(a)) - b))) / y
else
tmp = (x * exp((log(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 (y <= -2.35e+101) {
tmp = (x * (Math.pow(z, y) / a)) / y;
} else if (y <= 1.12e+35) {
tmp = (x * Math.exp((((t - 1.0) * Math.log(a)) - b))) / y;
} else {
tmp = (x * Math.exp((Math.log(z) * y))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2.35e+101: tmp = (x * (math.pow(z, y) / a)) / y elif y <= 1.12e+35: tmp = (x * math.exp((((t - 1.0) * math.log(a)) - b))) / y else: tmp = (x * math.exp((math.log(z) * y))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2.35e+101) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y); elseif (y <= 1.12e+35) tmp = Float64(Float64(x * exp(Float64(Float64(Float64(t - 1.0) * log(a)) - b))) / y); else tmp = Float64(Float64(x * exp(Float64(log(z) * y))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -2.35e+101) tmp = (x * ((z ^ y) / a)) / y; elseif (y <= 1.12e+35) tmp = (x * exp((((t - 1.0) * log(a)) - b))) / y; else tmp = (x * exp((log(z) * y))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.35e+101], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 1.12e+35], N[(N[(x * N[Exp[N[(N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[Exp[N[(N[Log[z], $MachinePrecision] * y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.35 \cdot 10^{+101}:\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{elif}\;y \leq 1.12 \cdot 10^{+35}:\\
\;\;\;\;\frac{x \cdot e^{\left(t - 1\right) \cdot \log a - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\log z \cdot y}}{y}\\
\end{array}
\end{array}
if y < -2.34999999999999985e101Initial program 100.0%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log56.7
Applied rewrites56.7%
Taylor expanded in b around 0
exp-sumN/A
*-commutativeN/A
exp-to-powN/A
lower-*.f64N/A
lower-pow.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f6480.6
Applied rewrites80.6%
Taylor expanded in t around 0
Applied rewrites91.8%
if -2.34999999999999985e101 < y < 1.12000000000000003e35Initial program 97.6%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log94.1
Applied rewrites94.1%
if 1.12000000000000003e35 < y Initial program 100.0%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log67.4
Applied rewrites67.4%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6488.5
Applied rewrites88.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -8.5e+19) (not (<= b 7.5e+30))) (/ (* x (exp (- (* (log a) t) b))) y) (/ (* (* x (pow z y)) (pow a (- t 1.0))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -8.5e+19) || !(b <= 7.5e+30)) {
tmp = (x * exp(((log(a) * t) - b))) / y;
} else {
tmp = ((x * pow(z, y)) * 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 <= (-8.5d+19)) .or. (.not. (b <= 7.5d+30))) then
tmp = (x * exp(((log(a) * t) - b))) / y
else
tmp = ((x * (z ** y)) * (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 <= -8.5e+19) || !(b <= 7.5e+30)) {
tmp = (x * Math.exp(((Math.log(a) * t) - b))) / y;
} else {
tmp = ((x * Math.pow(z, y)) * Math.pow(a, (t - 1.0))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -8.5e+19) or not (b <= 7.5e+30): tmp = (x * math.exp(((math.log(a) * t) - b))) / y else: tmp = ((x * math.pow(z, y)) * math.pow(a, (t - 1.0))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -8.5e+19) || !(b <= 7.5e+30)) tmp = Float64(Float64(x * exp(Float64(Float64(log(a) * t) - b))) / y); else tmp = Float64(Float64(Float64(x * (z ^ y)) * (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 <= -8.5e+19) || ~((b <= 7.5e+30))) tmp = (x * exp(((log(a) * t) - b))) / y; else tmp = ((x * (z ^ y)) * (a ^ (t - 1.0))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -8.5e+19], N[Not[LessEqual[b, 7.5e+30]], $MachinePrecision]], N[(N[(x * N[Exp[N[(N[(N[Log[a], $MachinePrecision] * t), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] * N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -8.5 \cdot 10^{+19} \lor \neg \left(b \leq 7.5 \cdot 10^{+30}\right):\\
\;\;\;\;\frac{x \cdot e^{\log a \cdot t - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(x \cdot {z}^{y}\right) \cdot {a}^{\left(t - 1\right)}}{y}\\
\end{array}
\end{array}
if b < -8.5e19 or 7.49999999999999973e30 < b Initial program 100.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log94.9
Applied rewrites94.9%
if -8.5e19 < b < 7.49999999999999973e30Initial program 97.3%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log72.3
Applied rewrites72.3%
Taylor expanded in b around inf
neg-mul-1N/A
lower-neg.f6422.3
Applied rewrites22.3%
Taylor expanded in b around 0
exp-sumN/A
*-commutativeN/A
exp-to-powN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f6489.7
Applied rewrites89.7%
Final simplification92.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -8.5e+19) (not (<= b 4.7e+27))) (/ (* x (exp (- (* (log a) t) b))) y) (* (* x (pow z y)) (/ (pow a (- t 1.0)) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -8.5e+19) || !(b <= 4.7e+27)) {
tmp = (x * exp(((log(a) * t) - b))) / y;
} else {
tmp = (x * pow(z, y)) * (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 <= (-8.5d+19)) .or. (.not. (b <= 4.7d+27))) then
tmp = (x * exp(((log(a) * t) - b))) / y
else
tmp = (x * (z ** y)) * ((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 <= -8.5e+19) || !(b <= 4.7e+27)) {
tmp = (x * Math.exp(((Math.log(a) * t) - b))) / y;
} else {
tmp = (x * Math.pow(z, y)) * (Math.pow(a, (t - 1.0)) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -8.5e+19) or not (b <= 4.7e+27): tmp = (x * math.exp(((math.log(a) * t) - b))) / y else: tmp = (x * math.pow(z, y)) * (math.pow(a, (t - 1.0)) / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -8.5e+19) || !(b <= 4.7e+27)) tmp = Float64(Float64(x * exp(Float64(Float64(log(a) * t) - b))) / y); else tmp = Float64(Float64(x * (z ^ y)) * Float64((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 <= -8.5e+19) || ~((b <= 4.7e+27))) tmp = (x * exp(((log(a) * t) - b))) / y; else tmp = (x * (z ^ y)) * ((a ^ (t - 1.0)) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -8.5e+19], N[Not[LessEqual[b, 4.7e+27]], $MachinePrecision]], N[(N[(x * N[Exp[N[(N[(N[Log[a], $MachinePrecision] * t), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] * N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -8.5 \cdot 10^{+19} \lor \neg \left(b \leq 4.7 \cdot 10^{+27}\right):\\
\;\;\;\;\frac{x \cdot e^{\log a \cdot t - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot {z}^{y}\right) \cdot \frac{{a}^{\left(t - 1\right)}}{y}\\
\end{array}
\end{array}
if b < -8.5e19 or 4.69999999999999976e27 < b Initial program 100.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log94.2
Applied rewrites94.2%
if -8.5e19 < b < 4.69999999999999976e27Initial program 97.2%
Taylor expanded in b around 0
exp-sumN/A
associate-*r*N/A
associate-/l*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-/.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f6484.6
Applied rewrites84.6%
Final simplification89.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (exp (- b))))
(if (<= b -1.15e+20)
(* (/ t_1 y) x)
(if (<= b -3.1e-171)
(/ (* x (pow a (- t 1.0))) y)
(if (<= b 7.5e+30)
(/ (* x (/ (pow z y) a)) y)
(/ (* x (/ t_1 a)) y))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = exp(-b);
double tmp;
if (b <= -1.15e+20) {
tmp = (t_1 / y) * x;
} else if (b <= -3.1e-171) {
tmp = (x * pow(a, (t - 1.0))) / y;
} else if (b <= 7.5e+30) {
tmp = (x * (pow(z, y) / a)) / y;
} else {
tmp = (x * (t_1 / 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) :: t_1
real(8) :: tmp
t_1 = exp(-b)
if (b <= (-1.15d+20)) then
tmp = (t_1 / y) * x
else if (b <= (-3.1d-171)) then
tmp = (x * (a ** (t - 1.0d0))) / y
else if (b <= 7.5d+30) then
tmp = (x * ((z ** y) / a)) / y
else
tmp = (x * (t_1 / 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 t_1 = Math.exp(-b);
double tmp;
if (b <= -1.15e+20) {
tmp = (t_1 / y) * x;
} else if (b <= -3.1e-171) {
tmp = (x * Math.pow(a, (t - 1.0))) / y;
} else if (b <= 7.5e+30) {
tmp = (x * (Math.pow(z, y) / a)) / y;
} else {
tmp = (x * (t_1 / a)) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = math.exp(-b) tmp = 0 if b <= -1.15e+20: tmp = (t_1 / y) * x elif b <= -3.1e-171: tmp = (x * math.pow(a, (t - 1.0))) / y elif b <= 7.5e+30: tmp = (x * (math.pow(z, y) / a)) / y else: tmp = (x * (t_1 / a)) / y return tmp
function code(x, y, z, t, a, b) t_1 = exp(Float64(-b)) tmp = 0.0 if (b <= -1.15e+20) tmp = Float64(Float64(t_1 / y) * x); elseif (b <= -3.1e-171) tmp = Float64(Float64(x * (a ^ Float64(t - 1.0))) / y); elseif (b <= 7.5e+30) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y); else tmp = Float64(Float64(x * Float64(t_1 / a)) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = exp(-b); tmp = 0.0; if (b <= -1.15e+20) tmp = (t_1 / y) * x; elseif (b <= -3.1e-171) tmp = (x * (a ^ (t - 1.0))) / y; elseif (b <= 7.5e+30) tmp = (x * ((z ^ y) / a)) / y; else tmp = (x * (t_1 / a)) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[Exp[(-b)], $MachinePrecision]}, If[LessEqual[b, -1.15e+20], N[(N[(t$95$1 / y), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[b, -3.1e-171], N[(N[(x * N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 7.5e+30], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[(t$95$1 / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := e^{-b}\\
\mathbf{if}\;b \leq -1.15 \cdot 10^{+20}:\\
\;\;\;\;\frac{t\_1}{y} \cdot x\\
\mathbf{elif}\;b \leq -3.1 \cdot 10^{-171}:\\
\;\;\;\;\frac{x \cdot {a}^{\left(t - 1\right)}}{y}\\
\mathbf{elif}\;b \leq 7.5 \cdot 10^{+30}:\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \frac{t\_1}{a}}{y}\\
\end{array}
\end{array}
if b < -1.15e20Initial program 100.0%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log95.0
Applied rewrites95.0%
Taylor expanded in b around inf
neg-mul-1N/A
lower-neg.f6480.0
Applied rewrites80.0%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6480.0
Applied rewrites80.0%
if -1.15e20 < b < -3.1e-171Initial program 96.2%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log84.5
Applied rewrites84.5%
Taylor expanded in b around 0
exp-sumN/A
*-commutativeN/A
exp-to-powN/A
lower-*.f64N/A
lower-pow.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f6489.5
Applied rewrites89.5%
Taylor expanded in y around 0
Applied rewrites88.2%
if -3.1e-171 < b < 7.49999999999999973e30Initial program 97.7%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log67.8
Applied rewrites67.8%
Taylor expanded in b around 0
exp-sumN/A
*-commutativeN/A
exp-to-powN/A
lower-*.f64N/A
lower-pow.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f6489.7
Applied rewrites89.7%
Taylor expanded in t around 0
Applied rewrites76.9%
if 7.49999999999999973e30 < b Initial program 100.0%
Taylor expanded in t around 0
exp-diffN/A
lower-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
rem-exp-logN/A
lower-exp.f6479.0
Applied rewrites79.0%
Taylor expanded in y around 0
Applied rewrites91.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (/ (exp (- b)) y) x)))
(if (<= b -1.15e+20)
t_1
(if (<= b -3.1e-171)
(/ (* x (pow a (- t 1.0))) y)
(if (<= b 7.5e+30) (/ (* x (/ (pow z y) a)) 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 <= -1.15e+20) {
tmp = t_1;
} else if (b <= -3.1e-171) {
tmp = (x * pow(a, (t - 1.0))) / y;
} else if (b <= 7.5e+30) {
tmp = (x * (pow(z, y) / a)) / y;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (exp(-b) / y) * x
if (b <= (-1.15d+20)) then
tmp = t_1
else if (b <= (-3.1d-171)) then
tmp = (x * (a ** (t - 1.0d0))) / y
else if (b <= 7.5d+30) then
tmp = (x * ((z ** y) / a)) / y
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (Math.exp(-b) / y) * x;
double tmp;
if (b <= -1.15e+20) {
tmp = t_1;
} else if (b <= -3.1e-171) {
tmp = (x * Math.pow(a, (t - 1.0))) / y;
} else if (b <= 7.5e+30) {
tmp = (x * (Math.pow(z, y) / a)) / 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 <= -1.15e+20: tmp = t_1 elif b <= -3.1e-171: tmp = (x * math.pow(a, (t - 1.0))) / y elif b <= 7.5e+30: tmp = (x * (math.pow(z, y) / a)) / 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 <= -1.15e+20) tmp = t_1; elseif (b <= -3.1e-171) tmp = Float64(Float64(x * (a ^ Float64(t - 1.0))) / y); elseif (b <= 7.5e+30) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / 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 <= -1.15e+20) tmp = t_1; elseif (b <= -3.1e-171) tmp = (x * (a ^ (t - 1.0))) / y; elseif (b <= 7.5e+30) tmp = (x * ((z ^ y) / a)) / 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, -1.15e+20], t$95$1, If[LessEqual[b, -3.1e-171], N[(N[(x * N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 7.5e+30], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $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 -1.15 \cdot 10^{+20}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -3.1 \cdot 10^{-171}:\\
\;\;\;\;\frac{x \cdot {a}^{\left(t - 1\right)}}{y}\\
\mathbf{elif}\;b \leq 7.5 \cdot 10^{+30}:\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.15e20 or 7.49999999999999973e30 < b Initial program 100.0%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log94.9
Applied rewrites94.9%
Taylor expanded in b around inf
neg-mul-1N/A
lower-neg.f6485.6
Applied rewrites85.6%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6485.6
Applied rewrites85.6%
if -1.15e20 < b < -3.1e-171Initial program 96.2%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log84.5
Applied rewrites84.5%
Taylor expanded in b around 0
exp-sumN/A
*-commutativeN/A
exp-to-powN/A
lower-*.f64N/A
lower-pow.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f6489.5
Applied rewrites89.5%
Taylor expanded in y around 0
Applied rewrites88.2%
if -3.1e-171 < b < 7.49999999999999973e30Initial program 97.7%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log67.8
Applied rewrites67.8%
Taylor expanded in b around 0
exp-sumN/A
*-commutativeN/A
exp-to-powN/A
lower-*.f64N/A
lower-pow.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f6489.7
Applied rewrites89.7%
Taylor expanded in t around 0
Applied rewrites76.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -1.15e+20) (not (<= b 115000.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 <= -1.15e+20) || !(b <= 115000.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 <= (-1.15d+20)) .or. (.not. (b <= 115000.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 <= -1.15e+20) || !(b <= 115000.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 <= -1.15e+20) or not (b <= 115000.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 <= -1.15e+20) || !(b <= 115000.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 <= -1.15e+20) || ~((b <= 115000.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, -1.15e+20], N[Not[LessEqual[b, 115000.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 -1.15 \cdot 10^{+20} \lor \neg \left(b \leq 115000\right):\\
\;\;\;\;\frac{e^{-b}}{y} \cdot x\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot {a}^{\left(t - 1\right)}}{y}\\
\end{array}
\end{array}
if b < -1.15e20 or 115000 < b Initial program 100.0%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log93.5
Applied rewrites93.5%
Taylor expanded in b around inf
neg-mul-1N/A
lower-neg.f6484.7
Applied rewrites84.7%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6484.7
Applied rewrites84.7%
if -1.15e20 < b < 115000Initial program 97.1%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log72.6
Applied rewrites72.6%
Taylor expanded in b around 0
exp-sumN/A
*-commutativeN/A
exp-to-powN/A
lower-*.f64N/A
lower-pow.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f6489.2
Applied rewrites89.2%
Taylor expanded in y around 0
Applied rewrites74.2%
Final simplification79.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -5.5e+114) (not (<= b 300000.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.5e+114) || !(b <= 300000.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.5d+114)) .or. (.not. (b <= 300000.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.5e+114) || !(b <= 300000.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.5e+114) or not (b <= 300000.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.5e+114) || !(b <= 300000.0)) tmp = Float64(Float64(exp(Float64(-b)) / y) * x); else tmp = Float64(x * Float64((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.5e+114) || ~((b <= 300000.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.5e+114], N[Not[LessEqual[b, 300000.0]], $MachinePrecision]], N[(N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision], N[(x * N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.5 \cdot 10^{+114} \lor \neg \left(b \leq 300000\right):\\
\;\;\;\;\frac{e^{-b}}{y} \cdot x\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{{a}^{\left(t - 1\right)}}{y}\\
\end{array}
\end{array}
if b < -5.5000000000000001e114 or 3e5 < b Initial program 100.0%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log94.3
Applied rewrites94.3%
Taylor expanded in b around inf
neg-mul-1N/A
lower-neg.f6488.5
Applied rewrites88.5%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6488.5
Applied rewrites88.5%
if -5.5000000000000001e114 < b < 3e5Initial program 97.5%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f64N/A
lower-/.f64N/A
lower-exp.f6469.5
Applied rewrites69.5%
Taylor expanded in b around 0
Applied rewrites71.4%
Final simplification78.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -5.1e+19) (not (<= b 1.72e-6))) (* (/ (exp (- b)) y) x) (/ (/ x a) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -5.1e+19) || !(b <= 1.72e-6)) {
tmp = (exp(-b) / y) * x;
} else {
tmp = (x / a) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-5.1d+19)) .or. (.not. (b <= 1.72d-6))) then
tmp = (exp(-b) / y) * x
else
tmp = (x / a) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -5.1e+19) || !(b <= 1.72e-6)) {
tmp = (Math.exp(-b) / y) * x;
} else {
tmp = (x / a) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -5.1e+19) or not (b <= 1.72e-6): tmp = (math.exp(-b) / y) * x else: tmp = (x / a) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -5.1e+19) || !(b <= 1.72e-6)) tmp = Float64(Float64(exp(Float64(-b)) / y) * x); else tmp = Float64(Float64(x / a) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -5.1e+19) || ~((b <= 1.72e-6))) tmp = (exp(-b) / y) * x; else tmp = (x / a) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -5.1e+19], N[Not[LessEqual[b, 1.72e-6]], $MachinePrecision]], N[(N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.1 \cdot 10^{+19} \lor \neg \left(b \leq 1.72 \cdot 10^{-6}\right):\\
\;\;\;\;\frac{e^{-b}}{y} \cdot x\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\end{array}
\end{array}
if b < -5.1e19 or 1.72e-6 < b Initial program 99.9%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log93.6
Applied rewrites93.6%
Taylor expanded in b around inf
neg-mul-1N/A
lower-neg.f6483.6
Applied rewrites83.6%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6483.6
Applied rewrites83.6%
if -5.1e19 < b < 1.72e-6Initial program 97.2%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f64N/A
lower-/.f64N/A
lower-exp.f6471.0
Applied rewrites71.0%
Applied rewrites73.0%
Taylor expanded in b around 0
Applied rewrites73.6%
Taylor expanded in t around 0
Applied rewrites37.4%
Final simplification60.1%
(FPCore (x y z t a b) :precision binary64 (if (<= (log a) -130.0) (/ (/ x a) y) (/ x (* y a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (log(a) <= -130.0) {
tmp = (x / a) / y;
} else {
tmp = x / (y * a);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (log(a) <= (-130.0d0)) then
tmp = (x / a) / y
else
tmp = x / (y * a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (Math.log(a) <= -130.0) {
tmp = (x / a) / y;
} else {
tmp = x / (y * a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if math.log(a) <= -130.0: tmp = (x / a) / y else: tmp = x / (y * a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (log(a) <= -130.0) tmp = Float64(Float64(x / a) / y); else tmp = Float64(x / Float64(y * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (log(a) <= -130.0) tmp = (x / a) / y; else tmp = x / (y * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[Log[a], $MachinePrecision], -130.0], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\log a \leq -130:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\end{array}
\end{array}
if (log.f64 a) < -130Initial program 99.3%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f64N/A
lower-/.f64N/A
lower-exp.f6461.5
Applied rewrites61.5%
Applied rewrites68.6%
Taylor expanded in b around 0
Applied rewrites61.3%
Taylor expanded in t around 0
Applied rewrites34.0%
if -130 < (log.f64 a) Initial program 98.0%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f64N/A
lower-/.f64N/A
lower-exp.f6474.5
Applied rewrites74.5%
Applied rewrites72.6%
Taylor expanded in b around 0
Applied rewrites59.1%
Taylor expanded in t around 0
Applied rewrites30.3%
Final simplification31.8%
(FPCore (x y z t a b) :precision binary64 (/ x (* y a)))
double code(double x, double y, double z, double t, double a, double b) {
return x / (y * a);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x / (y * a)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x / (y * a);
}
def code(x, y, z, t, a, b): return x / (y * a)
function code(x, y, z, t, a, b) return Float64(x / Float64(y * a)) end
function tmp = code(x, y, z, t, a, b) tmp = x / (y * a); end
code[x_, y_, z_, t_, a_, b_] := N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y \cdot a}
\end{array}
Initial program 98.5%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f64N/A
lower-/.f64N/A
lower-exp.f6469.3
Applied rewrites69.3%
Applied rewrites71.0%
Taylor expanded in b around 0
Applied rewrites60.0%
Taylor expanded in t around 0
Applied rewrites28.0%
Final simplification28.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (pow a (- t 1.0)))
(t_2 (/ (* x (/ t_1 y)) (- (+ b 1.0) (* y (log z))))))
(if (< t -0.8845848504127471)
t_2
(if (< t 852031.2288374073)
(/ (* (/ x y) t_1) (exp (- b (* (log z) y))))
t_2))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = pow(a, (t - 1.0));
double t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * log(z)));
double tmp;
if (t < -0.8845848504127471) {
tmp = t_2;
} else if (t < 852031.2288374073) {
tmp = ((x / y) * t_1) / exp((b - (log(z) * y)));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = a ** (t - 1.0d0)
t_2 = (x * (t_1 / y)) / ((b + 1.0d0) - (y * log(z)))
if (t < (-0.8845848504127471d0)) then
tmp = t_2
else if (t < 852031.2288374073d0) then
tmp = ((x / y) * t_1) / exp((b - (log(z) * y)))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = Math.pow(a, (t - 1.0));
double t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * Math.log(z)));
double tmp;
if (t < -0.8845848504127471) {
tmp = t_2;
} else if (t < 852031.2288374073) {
tmp = ((x / y) * t_1) / Math.exp((b - (Math.log(z) * y)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = math.pow(a, (t - 1.0)) t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * math.log(z))) tmp = 0 if t < -0.8845848504127471: tmp = t_2 elif t < 852031.2288374073: tmp = ((x / y) * t_1) / math.exp((b - (math.log(z) * y))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = a ^ Float64(t - 1.0) t_2 = Float64(Float64(x * Float64(t_1 / y)) / Float64(Float64(b + 1.0) - Float64(y * log(z)))) tmp = 0.0 if (t < -0.8845848504127471) tmp = t_2; elseif (t < 852031.2288374073) tmp = Float64(Float64(Float64(x / y) * t_1) / exp(Float64(b - Float64(log(z) * y)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a ^ (t - 1.0); t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * log(z))); tmp = 0.0; if (t < -0.8845848504127471) tmp = t_2; elseif (t < 852031.2288374073) tmp = ((x / y) * t_1) / exp((b - (log(z) * y))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision] / N[(N[(b + 1.0), $MachinePrecision] - N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -0.8845848504127471], t$95$2, If[Less[t, 852031.2288374073], N[(N[(N[(x / y), $MachinePrecision] * t$95$1), $MachinePrecision] / N[Exp[N[(b - N[(N[Log[z], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {a}^{\left(t - 1\right)}\\
t_2 := \frac{x \cdot \frac{t\_1}{y}}{\left(b + 1\right) - y \cdot \log z}\\
\mathbf{if}\;t < -0.8845848504127471:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t < 852031.2288374073:\\
\;\;\;\;\frac{\frac{x}{y} \cdot t\_1}{e^{b - \log z \cdot y}}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024324
(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))