
(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 14 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 (if (or (<= (- t 1.0) -1e+103) (not (<= (- t 1.0) 20000000000.0))) (/ (* x (exp (- (* (log a) t) b))) y) (/ (* x (exp (- (fma (log z) y (- (log a))) b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((t - 1.0) <= -1e+103) || !((t - 1.0) <= 20000000000.0)) {
tmp = (x * exp(((log(a) * t) - b))) / y;
} else {
tmp = (x * exp((fma(log(z), y, -log(a)) - b))) / y;
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if ((Float64(t - 1.0) <= -1e+103) || !(Float64(t - 1.0) <= 20000000000.0)) tmp = Float64(Float64(x * exp(Float64(Float64(log(a) * t) - b))) / y); else tmp = Float64(Float64(x * exp(Float64(fma(log(z), y, Float64(-log(a))) - b))) / y); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[N[(t - 1.0), $MachinePrecision], -1e+103], N[Not[LessEqual[N[(t - 1.0), $MachinePrecision], 20000000000.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[Exp[N[(N[(N[Log[z], $MachinePrecision] * y + (-N[Log[a], $MachinePrecision])), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t - 1 \leq -1 \cdot 10^{+103} \lor \neg \left(t - 1 \leq 20000000000\right):\\
\;\;\;\;\frac{x \cdot e^{\log a \cdot t - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\mathsf{fma}\left(\log z, y, -\log a\right) - b}}{y}\\
\end{array}
\end{array}
if (-.f64 t #s(literal 1 binary64)) < -1e103 or 2e10 < (-.f64 t #s(literal 1 binary64)) 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-log96.6
Applied rewrites96.6%
if -1e103 < (-.f64 t #s(literal 1 binary64)) < 2e10Initial program 97.2%
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.4
Applied rewrites95.4%
Final simplification96.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= (- t 1.0) -5000000000.0) (not (<= (- t 1.0) 20000000000.0))) (/ (* x (exp (- (* (log a) t) b))) y) (/ (* x (/ (/ (pow z y) a) (exp b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((t - 1.0) <= -5000000000.0) || !((t - 1.0) <= 20000000000.0)) {
tmp = (x * exp(((log(a) * t) - b))) / y;
} else {
tmp = (x * ((pow(z, y) / a) / exp(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 (((t - 1.0d0) <= (-5000000000.0d0)) .or. (.not. ((t - 1.0d0) <= 20000000000.0d0))) then
tmp = (x * exp(((log(a) * t) - b))) / y
else
tmp = (x * (((z ** y) / a) / exp(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 (((t - 1.0) <= -5000000000.0) || !((t - 1.0) <= 20000000000.0)) {
tmp = (x * Math.exp(((Math.log(a) * t) - b))) / y;
} else {
tmp = (x * ((Math.pow(z, y) / a) / Math.exp(b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if ((t - 1.0) <= -5000000000.0) or not ((t - 1.0) <= 20000000000.0): tmp = (x * math.exp(((math.log(a) * t) - b))) / y else: tmp = (x * ((math.pow(z, y) / a) / math.exp(b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((Float64(t - 1.0) <= -5000000000.0) || !(Float64(t - 1.0) <= 20000000000.0)) tmp = Float64(Float64(x * exp(Float64(Float64(log(a) * t) - b))) / y); else tmp = Float64(Float64(x * Float64(Float64((z ^ y) / a) / exp(b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (((t - 1.0) <= -5000000000.0) || ~(((t - 1.0) <= 20000000000.0))) tmp = (x * exp(((log(a) * t) - b))) / y; else tmp = (x * (((z ^ y) / a) / exp(b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[N[(t - 1.0), $MachinePrecision], -5000000000.0], N[Not[LessEqual[N[(t - 1.0), $MachinePrecision], 20000000000.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[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] / N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t - 1 \leq -5000000000 \lor \neg \left(t - 1 \leq 20000000000\right):\\
\;\;\;\;\frac{x \cdot e^{\log a \cdot t - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \frac{\frac{{z}^{y}}{a}}{e^{b}}}{y}\\
\end{array}
\end{array}
if (-.f64 t #s(literal 1 binary64)) < -5e9 or 2e10 < (-.f64 t #s(literal 1 binary64)) 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.3
Applied rewrites94.3%
if -5e9 < (-.f64 t #s(literal 1 binary64)) < 2e10Initial program 96.7%
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.f6486.4
Applied rewrites86.4%
Final simplification90.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -5.4e+46) (not (<= b 1.26e-38))) (/ (* x (exp (- (* (log a) t) b))) y) (/ (* x (* (pow a t) (/ (pow z y) a))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -5.4e+46) || !(b <= 1.26e-38)) {
tmp = (x * exp(((log(a) * t) - b))) / y;
} else {
tmp = (x * (pow(a, t) * (pow(z, y) / 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+46)) .or. (.not. (b <= 1.26d-38))) then
tmp = (x * exp(((log(a) * t) - b))) / y
else
tmp = (x * ((a ** t) * ((z ** y) / 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+46) || !(b <= 1.26e-38)) {
tmp = (x * Math.exp(((Math.log(a) * t) - b))) / y;
} else {
tmp = (x * (Math.pow(a, t) * (Math.pow(z, y) / a))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -5.4e+46) or not (b <= 1.26e-38): tmp = (x * math.exp(((math.log(a) * t) - b))) / y else: tmp = (x * (math.pow(a, t) * (math.pow(z, y) / a))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -5.4e+46) || !(b <= 1.26e-38)) tmp = Float64(Float64(x * exp(Float64(Float64(log(a) * t) - b))) / y); else tmp = Float64(Float64(x * Float64((a ^ t) * Float64((z ^ y) / a))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -5.4e+46) || ~((b <= 1.26e-38))) tmp = (x * exp(((log(a) * t) - b))) / y; else tmp = (x * ((a ^ t) * ((z ^ y) / a))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -5.4e+46], N[Not[LessEqual[b, 1.26e-38]], $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, t], $MachinePrecision] * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.4 \cdot 10^{+46} \lor \neg \left(b \leq 1.26 \cdot 10^{-38}\right):\\
\;\;\;\;\frac{x \cdot e^{\log a \cdot t - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \left({a}^{t} \cdot \frac{{z}^{y}}{a}\right)}{y}\\
\end{array}
\end{array}
if b < -5.4000000000000003e46 or 1.26e-38 < b Initial program 99.9%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log91.2
Applied rewrites91.2%
if -5.4000000000000003e46 < b < 1.26e-38Initial program 97.4%
Taylor expanded in b around 0
sub-negN/A
metadata-evalN/A
distribute-rgt-inN/A
associate-+l+N/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
*-commutativeN/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
+-commutativeN/A
mul-1-negN/A
Applied rewrites88.6%
Final simplification89.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -5.4e+46) (not (<= b 1.26e-38))) (/ (* 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 <= -5.4e+46) || !(b <= 1.26e-38)) {
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 <= (-5.4d+46)) .or. (.not. (b <= 1.26d-38))) 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 <= -5.4e+46) || !(b <= 1.26e-38)) {
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 <= -5.4e+46) or not (b <= 1.26e-38): 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 <= -5.4e+46) || !(b <= 1.26e-38)) 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 <= -5.4e+46) || ~((b <= 1.26e-38))) 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, -5.4e+46], N[Not[LessEqual[b, 1.26e-38]], $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 -5.4 \cdot 10^{+46} \lor \neg \left(b \leq 1.26 \cdot 10^{-38}\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 < -5.4000000000000003e46 or 1.26e-38 < b Initial program 99.9%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log91.2
Applied rewrites91.2%
if -5.4000000000000003e46 < b < 1.26e-38Initial program 97.4%
Taylor expanded in b around 0
exp-sumN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f6488.5
Applied rewrites88.5%
Final simplification89.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -4.3e+47) (not (<= b 1.26e-38))) (/ (* 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 <= -4.3e+47) || !(b <= 1.26e-38)) {
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 <= (-4.3d+47)) .or. (.not. (b <= 1.26d-38))) 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 <= -4.3e+47) || !(b <= 1.26e-38)) {
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 <= -4.3e+47) or not (b <= 1.26e-38): 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 <= -4.3e+47) || !(b <= 1.26e-38)) 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 <= -4.3e+47) || ~((b <= 1.26e-38))) 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, -4.3e+47], N[Not[LessEqual[b, 1.26e-38]], $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 -4.3 \cdot 10^{+47} \lor \neg \left(b \leq 1.26 \cdot 10^{-38}\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 < -4.29999999999999995e47 or 1.26e-38 < b Initial program 99.9%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log91.2
Applied rewrites91.2%
if -4.29999999999999995e47 < b < 1.26e-38Initial program 97.4%
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--.f6486.1
Applied rewrites86.1%
Final simplification88.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -4.6e-50) (not (<= t 16500000000.0))) (/ (* x (exp (- (* (log a) t) b))) y) (/ (/ (* (pow z y) x) a) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -4.6e-50) || !(t <= 16500000000.0)) {
tmp = (x * exp(((log(a) * t) - b))) / y;
} else {
tmp = ((pow(z, y) * 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 ((t <= (-4.6d-50)) .or. (.not. (t <= 16500000000.0d0))) then
tmp = (x * exp(((log(a) * t) - b))) / y
else
tmp = (((z ** y) * 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 ((t <= -4.6e-50) || !(t <= 16500000000.0)) {
tmp = (x * Math.exp(((Math.log(a) * t) - b))) / y;
} else {
tmp = ((Math.pow(z, y) * x) / a) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -4.6e-50) or not (t <= 16500000000.0): tmp = (x * math.exp(((math.log(a) * t) - b))) / y else: tmp = ((math.pow(z, y) * x) / a) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -4.6e-50) || !(t <= 16500000000.0)) tmp = Float64(Float64(x * exp(Float64(Float64(log(a) * t) - b))) / y); else tmp = Float64(Float64(Float64((z ^ y) * x) / a) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -4.6e-50) || ~((t <= 16500000000.0))) tmp = (x * exp(((log(a) * t) - b))) / y; else tmp = (((z ^ y) * x) / a) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -4.6e-50], N[Not[LessEqual[t, 16500000000.0]], $MachinePrecision]], N[(N[(x * N[Exp[N[(N[(N[Log[a], $MachinePrecision] * t), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(N[(N[Power[z, y], $MachinePrecision] * x), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.6 \cdot 10^{-50} \lor \neg \left(t \leq 16500000000\right):\\
\;\;\;\;\frac{x \cdot e^{\log a \cdot t - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{{z}^{y} \cdot x}{a}}{y}\\
\end{array}
\end{array}
if t < -4.60000000000000039e-50 or 1.65e10 < t Initial program 99.8%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log93.2
Applied rewrites93.2%
if -4.60000000000000039e-50 < t < 1.65e10Initial program 96.7%
Taylor expanded in b around 0
exp-sumN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f6476.3
Applied rewrites76.3%
Taylor expanded in t around 0
Applied rewrites78.1%
Final simplification86.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -4.4e+102) (not (<= t 260000000000.0))) (/ (* (pow a (- t 1.0)) x) y) (/ (/ (* (pow z y) x) a) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -4.4e+102) || !(t <= 260000000000.0)) {
tmp = (pow(a, (t - 1.0)) * x) / y;
} else {
tmp = ((pow(z, y) * 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 ((t <= (-4.4d+102)) .or. (.not. (t <= 260000000000.0d0))) then
tmp = ((a ** (t - 1.0d0)) * x) / y
else
tmp = (((z ** y) * 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 ((t <= -4.4e+102) || !(t <= 260000000000.0)) {
tmp = (Math.pow(a, (t - 1.0)) * x) / y;
} else {
tmp = ((Math.pow(z, y) * x) / a) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -4.4e+102) or not (t <= 260000000000.0): tmp = (math.pow(a, (t - 1.0)) * x) / y else: tmp = ((math.pow(z, y) * x) / a) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -4.4e+102) || !(t <= 260000000000.0)) tmp = Float64(Float64((a ^ Float64(t - 1.0)) * x) / y); else tmp = Float64(Float64(Float64((z ^ y) * x) / a) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -4.4e+102) || ~((t <= 260000000000.0))) tmp = ((a ^ (t - 1.0)) * x) / y; else tmp = (((z ^ y) * x) / a) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -4.4e+102], N[Not[LessEqual[t, 260000000000.0]], $MachinePrecision]], N[(N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision], N[(N[(N[(N[Power[z, y], $MachinePrecision] * x), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.4 \cdot 10^{+102} \lor \neg \left(t \leq 260000000000\right):\\
\;\;\;\;\frac{{a}^{\left(t - 1\right)} \cdot x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{{z}^{y} \cdot x}{a}}{y}\\
\end{array}
\end{array}
if t < -4.40000000000000015e102 or 2.6e11 < t Initial program 100.0%
Taylor expanded in b around 0
exp-sumN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f6477.0
Applied rewrites77.0%
Taylor expanded in y around 0
Applied rewrites91.6%
if -4.40000000000000015e102 < t < 2.6e11Initial program 97.2%
Taylor expanded in b around 0
exp-sumN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f6472.8
Applied rewrites72.8%
Taylor expanded in t around 0
Applied rewrites77.5%
Final simplification83.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -5.6e+110) (not (<= b 2.65e+66))) (* (/ (exp (- b)) y) x) (* (* x 1.0) (/ (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.6e+110) || !(b <= 2.65e+66)) {
tmp = (exp(-b) / y) * x;
} else {
tmp = (x * 1.0) * (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.6d+110)) .or. (.not. (b <= 2.65d+66))) then
tmp = (exp(-b) / y) * x
else
tmp = (x * 1.0d0) * ((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.6e+110) || !(b <= 2.65e+66)) {
tmp = (Math.exp(-b) / y) * x;
} else {
tmp = (x * 1.0) * (Math.pow(a, (t - 1.0)) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -5.6e+110) or not (b <= 2.65e+66): tmp = (math.exp(-b) / y) * x else: tmp = (x * 1.0) * (math.pow(a, (t - 1.0)) / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -5.6e+110) || !(b <= 2.65e+66)) tmp = Float64(Float64(exp(Float64(-b)) / y) * x); else tmp = Float64(Float64(x * 1.0) * 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.6e+110) || ~((b <= 2.65e+66))) tmp = (exp(-b) / y) * x; else tmp = (x * 1.0) * ((a ^ (t - 1.0)) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -5.6e+110], N[Not[LessEqual[b, 2.65e+66]], $MachinePrecision]], N[(N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision], N[(N[(x * 1.0), $MachinePrecision] * N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.6 \cdot 10^{+110} \lor \neg \left(b \leq 2.65 \cdot 10^{+66}\right):\\
\;\;\;\;\frac{e^{-b}}{y} \cdot x\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot 1\right) \cdot \frac{{a}^{\left(t - 1\right)}}{y}\\
\end{array}
\end{array}
if b < -5.59999999999999973e110 or 2.6499999999999998e66 < b 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-log96.3
Applied rewrites96.3%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f6490.2
Applied rewrites90.2%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6490.2
Applied rewrites90.2%
if -5.59999999999999973e110 < b < 2.6499999999999998e66Initial program 97.8%
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--.f6483.5
Applied rewrites83.5%
Taylor expanded in y around 0
Applied rewrites71.8%
Final simplification77.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -6.2e+108) (not (<= b 2.65e+66))) (* (/ (exp (- b)) y) x) (/ (* (pow a (- t 1.0)) x) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -6.2e+108) || !(b <= 2.65e+66)) {
tmp = (exp(-b) / y) * x;
} else {
tmp = (pow(a, (t - 1.0)) * 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 <= (-6.2d+108)) .or. (.not. (b <= 2.65d+66))) then
tmp = (exp(-b) / y) * x
else
tmp = ((a ** (t - 1.0d0)) * 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 <= -6.2e+108) || !(b <= 2.65e+66)) {
tmp = (Math.exp(-b) / y) * x;
} else {
tmp = (Math.pow(a, (t - 1.0)) * x) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -6.2e+108) or not (b <= 2.65e+66): tmp = (math.exp(-b) / y) * x else: tmp = (math.pow(a, (t - 1.0)) * x) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -6.2e+108) || !(b <= 2.65e+66)) tmp = Float64(Float64(exp(Float64(-b)) / y) * x); else tmp = Float64(Float64((a ^ Float64(t - 1.0)) * x) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -6.2e+108) || ~((b <= 2.65e+66))) tmp = (exp(-b) / y) * x; else tmp = ((a ^ (t - 1.0)) * x) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -6.2e+108], N[Not[LessEqual[b, 2.65e+66]], $MachinePrecision]], N[(N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision], N[(N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -6.2 \cdot 10^{+108} \lor \neg \left(b \leq 2.65 \cdot 10^{+66}\right):\\
\;\;\;\;\frac{e^{-b}}{y} \cdot x\\
\mathbf{else}:\\
\;\;\;\;\frac{{a}^{\left(t - 1\right)} \cdot x}{y}\\
\end{array}
\end{array}
if b < -6.2000000000000003e108 or 2.6499999999999998e66 < b 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-log96.4
Applied rewrites96.4%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f6490.3
Applied rewrites90.3%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6490.3
Applied rewrites90.3%
if -6.2000000000000003e108 < b < 2.6499999999999998e66Initial program 97.8%
Taylor expanded in b around 0
exp-sumN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f6485.3
Applied rewrites85.3%
Taylor expanded in y around 0
Applied rewrites70.2%
Final simplification76.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -1.5e-19) (not (<= b 1.8e+14))) (* (/ (exp (- b)) y) x) (* (/ x a) (pow y -1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.5e-19) || !(b <= 1.8e+14)) {
tmp = (exp(-b) / y) * x;
} else {
tmp = (x / a) * pow(y, -1.0);
}
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.5d-19)) .or. (.not. (b <= 1.8d+14))) then
tmp = (exp(-b) / y) * x
else
tmp = (x / a) * (y ** (-1.0d0))
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.5e-19) || !(b <= 1.8e+14)) {
tmp = (Math.exp(-b) / y) * x;
} else {
tmp = (x / a) * Math.pow(y, -1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -1.5e-19) or not (b <= 1.8e+14): tmp = (math.exp(-b) / y) * x else: tmp = (x / a) * math.pow(y, -1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -1.5e-19) || !(b <= 1.8e+14)) tmp = Float64(Float64(exp(Float64(-b)) / y) * x); else tmp = Float64(Float64(x / a) * (y ^ -1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -1.5e-19) || ~((b <= 1.8e+14))) tmp = (exp(-b) / y) * x; else tmp = (x / a) * (y ^ -1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -1.5e-19], N[Not[LessEqual[b, 1.8e+14]], $MachinePrecision]], N[(N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision], N[(N[(x / a), $MachinePrecision] * N[Power[y, -1.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.5 \cdot 10^{-19} \lor \neg \left(b \leq 1.8 \cdot 10^{+14}\right):\\
\;\;\;\;\frac{e^{-b}}{y} \cdot x\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a} \cdot {y}^{-1}\\
\end{array}
\end{array}
if b < -1.49999999999999996e-19 or 1.8e14 < b 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-log89.6
Applied rewrites89.6%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f6478.1
Applied rewrites78.1%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6478.1
Applied rewrites78.1%
if -1.49999999999999996e-19 < b < 1.8e14Initial program 97.2%
Taylor expanded in b around 0
exp-sumN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f6486.1
Applied rewrites86.1%
Taylor expanded in t around 0
Applied rewrites71.1%
Taylor expanded in y around 0
Applied rewrites37.3%
lift-/.f64N/A
frac-2negN/A
div-invN/A
metadata-evalN/A
frac-2negN/A
lift-/.f64N/A
lower-*.f64N/A
Applied rewrites37.3%
Final simplification55.5%
(FPCore (x y z t a b) :precision binary64 (pow (/ y (/ x a)) -1.0))
double code(double x, double y, double z, double t, double a, double b) {
return pow((y / (x / a)), -1.0);
}
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 = (y / (x / a)) ** (-1.0d0)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return Math.pow((y / (x / a)), -1.0);
}
def code(x, y, z, t, a, b): return math.pow((y / (x / a)), -1.0)
function code(x, y, z, t, a, b) return Float64(y / Float64(x / a)) ^ -1.0 end
function tmp = code(x, y, z, t, a, b) tmp = (y / (x / a)) ^ -1.0; end
code[x_, y_, z_, t_, a_, b_] := N[Power[N[(y / N[(x / a), $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision]
\begin{array}{l}
\\
{\left(\frac{y}{\frac{x}{a}}\right)}^{-1}
\end{array}
Initial program 98.5%
Taylor expanded in b around 0
exp-sumN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f6474.7
Applied rewrites74.7%
Taylor expanded in t around 0
Applied rewrites60.1%
Taylor expanded in y around 0
Applied rewrites29.8%
lift-/.f64N/A
clear-numN/A
lower-/.f64N/A
lower-/.f6430.0
Applied rewrites30.0%
Final simplification30.0%
(FPCore (x y z t a b) :precision binary64 (* (/ x a) (pow y -1.0)))
double code(double x, double y, double z, double t, double a, double b) {
return (x / a) * pow(y, -1.0);
}
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 / a) * (y ** (-1.0d0))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x / a) * Math.pow(y, -1.0);
}
def code(x, y, z, t, a, b): return (x / a) * math.pow(y, -1.0)
function code(x, y, z, t, a, b) return Float64(Float64(x / a) * (y ^ -1.0)) end
function tmp = code(x, y, z, t, a, b) tmp = (x / a) * (y ^ -1.0); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x / a), $MachinePrecision] * N[Power[y, -1.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{a} \cdot {y}^{-1}
\end{array}
Initial program 98.5%
Taylor expanded in b around 0
exp-sumN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f6474.7
Applied rewrites74.7%
Taylor expanded in t around 0
Applied rewrites60.1%
Taylor expanded in y around 0
Applied rewrites29.8%
lift-/.f64N/A
frac-2negN/A
div-invN/A
metadata-evalN/A
frac-2negN/A
lift-/.f64N/A
lower-*.f64N/A
Applied rewrites29.8%
Final simplification29.8%
(FPCore (x y z t a b) :precision binary64 (/ (/ x a) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x / 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 / a) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x / a) / y;
}
def code(x, y, z, t, a, b): return (x / a) / y
function code(x, y, z, t, a, b) return Float64(Float64(x / a) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x / a) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{x}{a}}{y}
\end{array}
Initial program 98.5%
Taylor expanded in b around 0
exp-sumN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f6474.7
Applied rewrites74.7%
Taylor expanded in t around 0
Applied rewrites60.1%
Taylor expanded in y around 0
Applied rewrites29.8%
(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 2024318
(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))