
(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 (/ (* (exp (- (+ (* (log a) (- t 1.0)) (* (log z) y)) b)) x) y))
double code(double x, double y, double z, double t, double a, double b) {
return (exp((((log(a) * (t - 1.0)) + (log(z) * y)) - b)) * x) / y;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (exp((((log(a) * (t - 1.0d0)) + (log(z) * y)) - b)) * x) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (Math.exp((((Math.log(a) * (t - 1.0)) + (Math.log(z) * y)) - b)) * x) / y;
}
def code(x, y, z, t, a, b): return (math.exp((((math.log(a) * (t - 1.0)) + (math.log(z) * y)) - b)) * x) / y
function code(x, y, z, t, a, b) return Float64(Float64(exp(Float64(Float64(Float64(log(a) * Float64(t - 1.0)) + Float64(log(z) * y)) - b)) * x) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (exp((((log(a) * (t - 1.0)) + (log(z) * y)) - b)) * x) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[Exp[N[(N[(N[(N[Log[a], $MachinePrecision] * N[(t - 1.0), $MachinePrecision]), $MachinePrecision] + N[(N[Log[z], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{e^{\left(\log a \cdot \left(t - 1\right) + \log z \cdot y\right) - b} \cdot x}{y}
\end{array}
Initial program 99.5%
Final simplification99.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* (exp (- (* (log a) (- t 1.0)) b)) x) y))
(t_2 (/ (/ (* (pow z y) x) a) y)))
(if (<= y -1.32e+228)
t_2
(if (<= y -3.2e+171)
t_1
(if (<= y -6.2e+141) t_2 (if (<= y 1.15e+132) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (exp(((log(a) * (t - 1.0)) - b)) * x) / y;
double t_2 = ((pow(z, y) * x) / a) / y;
double tmp;
if (y <= -1.32e+228) {
tmp = t_2;
} else if (y <= -3.2e+171) {
tmp = t_1;
} else if (y <= -6.2e+141) {
tmp = t_2;
} else if (y <= 1.15e+132) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (exp(((log(a) * (t - 1.0d0)) - b)) * x) / y
t_2 = (((z ** y) * x) / a) / y
if (y <= (-1.32d+228)) then
tmp = t_2
else if (y <= (-3.2d+171)) then
tmp = t_1
else if (y <= (-6.2d+141)) then
tmp = t_2
else if (y <= 1.15d+132) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (Math.exp(((Math.log(a) * (t - 1.0)) - b)) * x) / y;
double t_2 = ((Math.pow(z, y) * x) / a) / y;
double tmp;
if (y <= -1.32e+228) {
tmp = t_2;
} else if (y <= -3.2e+171) {
tmp = t_1;
} else if (y <= -6.2e+141) {
tmp = t_2;
} else if (y <= 1.15e+132) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (math.exp(((math.log(a) * (t - 1.0)) - b)) * x) / y t_2 = ((math.pow(z, y) * x) / a) / y tmp = 0 if y <= -1.32e+228: tmp = t_2 elif y <= -3.2e+171: tmp = t_1 elif y <= -6.2e+141: tmp = t_2 elif y <= 1.15e+132: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(exp(Float64(Float64(log(a) * Float64(t - 1.0)) - b)) * x) / y) t_2 = Float64(Float64(Float64((z ^ y) * x) / a) / y) tmp = 0.0 if (y <= -1.32e+228) tmp = t_2; elseif (y <= -3.2e+171) tmp = t_1; elseif (y <= -6.2e+141) tmp = t_2; elseif (y <= 1.15e+132) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (exp(((log(a) * (t - 1.0)) - b)) * x) / y; t_2 = (((z ^ y) * x) / a) / y; tmp = 0.0; if (y <= -1.32e+228) tmp = t_2; elseif (y <= -3.2e+171) tmp = t_1; elseif (y <= -6.2e+141) tmp = t_2; elseif (y <= 1.15e+132) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[Exp[N[(N[(N[Log[a], $MachinePrecision] * N[(t - 1.0), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[Power[z, y], $MachinePrecision] * x), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -1.32e+228], t$95$2, If[LessEqual[y, -3.2e+171], t$95$1, If[LessEqual[y, -6.2e+141], t$95$2, If[LessEqual[y, 1.15e+132], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{e^{\log a \cdot \left(t - 1\right) - b} \cdot x}{y}\\
t_2 := \frac{\frac{{z}^{y} \cdot x}{a}}{y}\\
\mathbf{if}\;y \leq -1.32 \cdot 10^{+228}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -3.2 \cdot 10^{+171}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -6.2 \cdot 10^{+141}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{+132}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -1.32e228 or -3.20000000000000011e171 < y < -6.20000000000000007e141 or 1.1500000000000001e132 < y 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--.f6458.6
Applied rewrites58.6%
Taylor expanded in t around 0
Applied rewrites94.4%
if -1.32e228 < y < -3.20000000000000011e171 or -6.20000000000000007e141 < y < 1.1500000000000001e132Initial program 99.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-log93.9
Applied rewrites93.9%
Final simplification94.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (/ (exp (- b)) y) x)))
(if (<= b -1.8e+125)
t_1
(if (<= b -2.5e-289)
(/ (* (pow a (- t 1.0)) (* (pow z y) x)) y)
(if (<= b 480.0) (* (- x (* b 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.8e+125) {
tmp = t_1;
} else if (b <= -2.5e-289) {
tmp = (pow(a, (t - 1.0)) * (pow(z, y) * x)) / y;
} else if (b <= 480.0) {
tmp = (x - (b * 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.8d+125)) then
tmp = t_1
else if (b <= (-2.5d-289)) then
tmp = ((a ** (t - 1.0d0)) * ((z ** y) * x)) / y
else if (b <= 480.0d0) then
tmp = (x - (b * 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.8e+125) {
tmp = t_1;
} else if (b <= -2.5e-289) {
tmp = (Math.pow(a, (t - 1.0)) * (Math.pow(z, y) * x)) / y;
} else if (b <= 480.0) {
tmp = (x - (b * 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.8e+125: tmp = t_1 elif b <= -2.5e-289: tmp = (math.pow(a, (t - 1.0)) * (math.pow(z, y) * x)) / y elif b <= 480.0: tmp = (x - (b * 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.8e+125) tmp = t_1; elseif (b <= -2.5e-289) tmp = Float64(Float64((a ^ Float64(t - 1.0)) * Float64((z ^ y) * x)) / y); elseif (b <= 480.0) tmp = Float64(Float64(x - Float64(b * x)) * Float64(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.8e+125) tmp = t_1; elseif (b <= -2.5e-289) tmp = ((a ^ (t - 1.0)) * ((z ^ y) * x)) / y; elseif (b <= 480.0) tmp = (x - (b * 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.8e+125], t$95$1, If[LessEqual[b, -2.5e-289], N[(N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] * N[(N[Power[z, y], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 480.0], N[(N[(x - N[(b * x), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{e^{-b}}{y} \cdot x\\
\mathbf{if}\;b \leq -1.8 \cdot 10^{+125}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -2.5 \cdot 10^{-289}:\\
\;\;\;\;\frac{{a}^{\left(t - 1\right)} \cdot \left({z}^{y} \cdot x\right)}{y}\\
\mathbf{elif}\;b \leq 480:\\
\;\;\;\;\left(x - b \cdot x\right) \cdot \frac{\frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.8000000000000002e125 or 480 < b Initial program 100.0%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f6485.4
Applied rewrites85.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6485.4
Applied rewrites85.4%
if -1.8000000000000002e125 < b < -2.50000000000000014e-289Initial program 99.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--.f6482.1
Applied rewrites82.1%
if -2.50000000000000014e-289 < b < 480Initial program 99.2%
Taylor expanded in b around 0
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
associate-/l*N/A
associate-*r*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
Applied rewrites73.4%
Taylor expanded in t around 0
Applied rewrites80.2%
Final simplification82.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (/ (exp (- b)) y) x)))
(if (<= b -1.95e+90)
t_1
(if (<= b -2.6e-289)
(/ (* (pow a (- t 1.0)) x) y)
(if (<= b 480.0) (* (- x (* b 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.95e+90) {
tmp = t_1;
} else if (b <= -2.6e-289) {
tmp = (pow(a, (t - 1.0)) * x) / y;
} else if (b <= 480.0) {
tmp = (x - (b * 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.95d+90)) then
tmp = t_1
else if (b <= (-2.6d-289)) then
tmp = ((a ** (t - 1.0d0)) * x) / y
else if (b <= 480.0d0) then
tmp = (x - (b * 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.95e+90) {
tmp = t_1;
} else if (b <= -2.6e-289) {
tmp = (Math.pow(a, (t - 1.0)) * x) / y;
} else if (b <= 480.0) {
tmp = (x - (b * 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.95e+90: tmp = t_1 elif b <= -2.6e-289: tmp = (math.pow(a, (t - 1.0)) * x) / y elif b <= 480.0: tmp = (x - (b * 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.95e+90) tmp = t_1; elseif (b <= -2.6e-289) tmp = Float64(Float64((a ^ Float64(t - 1.0)) * x) / y); elseif (b <= 480.0) tmp = Float64(Float64(x - Float64(b * x)) * Float64(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.95e+90) tmp = t_1; elseif (b <= -2.6e-289) tmp = ((a ^ (t - 1.0)) * x) / y; elseif (b <= 480.0) tmp = (x - (b * 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.95e+90], t$95$1, If[LessEqual[b, -2.6e-289], N[(N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 480.0], N[(N[(x - N[(b * x), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{e^{-b}}{y} \cdot x\\
\mathbf{if}\;b \leq -1.95 \cdot 10^{+90}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -2.6 \cdot 10^{-289}:\\
\;\;\;\;\frac{{a}^{\left(t - 1\right)} \cdot x}{y}\\
\mathbf{elif}\;b \leq 480:\\
\;\;\;\;\left(x - b \cdot x\right) \cdot \frac{\frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.9500000000000001e90 or 480 < b Initial program 100.0%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f6485.3
Applied rewrites85.3%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6485.3
Applied rewrites85.3%
if -1.9500000000000001e90 < b < -2.5999999999999999e-289Initial program 98.9%
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--.f6480.4
Applied rewrites80.4%
Taylor expanded in y around 0
Applied rewrites79.3%
if -2.5999999999999999e-289 < b < 480Initial program 99.2%
Taylor expanded in b around 0
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
associate-/l*N/A
associate-*r*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
Applied rewrites73.4%
Taylor expanded in t around 0
Applied rewrites80.2%
Final simplification82.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (/ (exp (- b)) y) x)))
(if (<= b -1.95e+90)
t_1
(if (<= b -8.8e-265)
(/ (* (pow a (- t 1.0)) x) y)
(if (<= b 150000.0) (/ (/ (* (pow z y) x) 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.95e+90) {
tmp = t_1;
} else if (b <= -8.8e-265) {
tmp = (pow(a, (t - 1.0)) * x) / y;
} else if (b <= 150000.0) {
tmp = ((pow(z, y) * x) / 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.95d+90)) then
tmp = t_1
else if (b <= (-8.8d-265)) then
tmp = ((a ** (t - 1.0d0)) * x) / y
else if (b <= 150000.0d0) then
tmp = (((z ** y) * x) / 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.95e+90) {
tmp = t_1;
} else if (b <= -8.8e-265) {
tmp = (Math.pow(a, (t - 1.0)) * x) / y;
} else if (b <= 150000.0) {
tmp = ((Math.pow(z, y) * x) / 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.95e+90: tmp = t_1 elif b <= -8.8e-265: tmp = (math.pow(a, (t - 1.0)) * x) / y elif b <= 150000.0: tmp = ((math.pow(z, y) * x) / 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.95e+90) tmp = t_1; elseif (b <= -8.8e-265) tmp = Float64(Float64((a ^ Float64(t - 1.0)) * x) / y); elseif (b <= 150000.0) tmp = Float64(Float64(Float64((z ^ y) * x) / 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.95e+90) tmp = t_1; elseif (b <= -8.8e-265) tmp = ((a ^ (t - 1.0)) * x) / y; elseif (b <= 150000.0) tmp = (((z ^ y) * x) / 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.95e+90], t$95$1, If[LessEqual[b, -8.8e-265], N[(N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 150000.0], N[(N[(N[(N[Power[z, y], $MachinePrecision] * x), $MachinePrecision] / a), $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.95 \cdot 10^{+90}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -8.8 \cdot 10^{-265}:\\
\;\;\;\;\frac{{a}^{\left(t - 1\right)} \cdot x}{y}\\
\mathbf{elif}\;b \leq 150000:\\
\;\;\;\;\frac{\frac{{z}^{y} \cdot x}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.9500000000000001e90 or 1.5e5 < b Initial program 100.0%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f6486.1
Applied rewrites86.1%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6486.1
Applied rewrites86.1%
if -1.9500000000000001e90 < b < -8.80000000000000042e-265Initial program 99.3%
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--.f6478.0
Applied rewrites78.0%
Taylor expanded in y around 0
Applied rewrites78.5%
if -8.80000000000000042e-265 < b < 1.5e5Initial program 98.9%
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--.f6475.8
Applied rewrites75.8%
Taylor expanded in t around 0
Applied rewrites79.7%
(FPCore (x y z t a b) :precision binary64 (if (<= (log a) 280.0) (* (/ (- 1.0 b) a) (/ x y)) (/ (/ x a) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (log(a) <= 280.0) {
tmp = ((1.0 - b) / a) * (x / y);
} 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 (log(a) <= 280.0d0) then
tmp = ((1.0d0 - b) / a) * (x / y)
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 (Math.log(a) <= 280.0) {
tmp = ((1.0 - b) / a) * (x / y);
} else {
tmp = (x / a) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if math.log(a) <= 280.0: tmp = ((1.0 - b) / a) * (x / y) else: tmp = (x / a) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (log(a) <= 280.0) tmp = Float64(Float64(Float64(1.0 - b) / a) * Float64(x / y)); 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 (log(a) <= 280.0) tmp = ((1.0 - b) / a) * (x / y); else tmp = (x / a) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[Log[a], $MachinePrecision], 280.0], N[(N[(N[(1.0 - b), $MachinePrecision] / a), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\log a \leq 280:\\
\;\;\;\;\frac{1 - b}{a} \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\end{array}
\end{array}
if (log.f64 a) < 280Initial program 99.5%
Taylor expanded in b around 0
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
associate-/l*N/A
associate-*r*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
Applied rewrites64.9%
Taylor expanded in y around 0
Applied rewrites53.5%
Taylor expanded in b around 0
Applied rewrites52.7%
Taylor expanded in t around 0
Applied rewrites31.9%
if 280 < (log.f64 a) Initial program 99.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--.f6466.4
Applied rewrites66.4%
Taylor expanded in t around 0
Applied rewrites59.3%
Taylor expanded in y around 0
Applied rewrites34.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (/ (exp (- b)) y) x)))
(if (<= b -1.95e+90)
t_1
(if (<= b 6300000.0) (/ (* (pow a (- t 1.0)) x) y) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (exp(-b) / y) * x;
double tmp;
if (b <= -1.95e+90) {
tmp = t_1;
} else if (b <= 6300000.0) {
tmp = (pow(a, (t - 1.0)) * x) / y;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (exp(-b) / y) * x
if (b <= (-1.95d+90)) then
tmp = t_1
else if (b <= 6300000.0d0) then
tmp = ((a ** (t - 1.0d0)) * x) / y
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (Math.exp(-b) / y) * x;
double tmp;
if (b <= -1.95e+90) {
tmp = t_1;
} else if (b <= 6300000.0) {
tmp = (Math.pow(a, (t - 1.0)) * x) / y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (math.exp(-b) / y) * x tmp = 0 if b <= -1.95e+90: tmp = t_1 elif b <= 6300000.0: tmp = (math.pow(a, (t - 1.0)) * x) / y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(exp(Float64(-b)) / y) * x) tmp = 0.0 if (b <= -1.95e+90) tmp = t_1; elseif (b <= 6300000.0) tmp = Float64(Float64((a ^ Float64(t - 1.0)) * x) / 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.95e+90) tmp = t_1; elseif (b <= 6300000.0) tmp = ((a ^ (t - 1.0)) * x) / y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[b, -1.95e+90], t$95$1, If[LessEqual[b, 6300000.0], N[(N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] * x), $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.95 \cdot 10^{+90}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 6300000:\\
\;\;\;\;\frac{{a}^{\left(t - 1\right)} \cdot x}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.9500000000000001e90 or 6.3e6 < b Initial program 100.0%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f6486.1
Applied rewrites86.1%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6486.1
Applied rewrites86.1%
if -1.9500000000000001e90 < b < 6.3e6Initial program 99.1%
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.7
Applied rewrites76.7%
Taylor expanded in y around 0
Applied rewrites68.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (/ (exp (- b)) y) x)))
(if (<= b -1.95e+90)
t_1
(if (<= b 6300000.0) (* (/ (pow a (- t 1.0)) y) x) 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.95e+90) {
tmp = t_1;
} else if (b <= 6300000.0) {
tmp = (pow(a, (t - 1.0)) / y) * x;
} 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.95d+90)) then
tmp = t_1
else if (b <= 6300000.0d0) then
tmp = ((a ** (t - 1.0d0)) / y) * x
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.95e+90) {
tmp = t_1;
} else if (b <= 6300000.0) {
tmp = (Math.pow(a, (t - 1.0)) / y) * x;
} 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.95e+90: tmp = t_1 elif b <= 6300000.0: tmp = (math.pow(a, (t - 1.0)) / y) * x 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.95e+90) tmp = t_1; elseif (b <= 6300000.0) tmp = Float64(Float64((a ^ Float64(t - 1.0)) / y) * x); 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.95e+90) tmp = t_1; elseif (b <= 6300000.0) tmp = ((a ^ (t - 1.0)) / y) * x; 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.95e+90], t$95$1, If[LessEqual[b, 6300000.0], N[(N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{e^{-b}}{y} \cdot x\\
\mathbf{if}\;b \leq -1.95 \cdot 10^{+90}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 6300000:\\
\;\;\;\;\frac{{a}^{\left(t - 1\right)}}{y} \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.9500000000000001e90 or 6.3e6 < b Initial program 100.0%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f6486.1
Applied rewrites86.1%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6486.1
Applied rewrites86.1%
if -1.9500000000000001e90 < b < 6.3e6Initial program 99.1%
Taylor expanded in y around 0
exp-diffN/A
lower-/.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f64N/A
lower-exp.f6466.0
Applied rewrites66.0%
Taylor expanded in b around 0
Applied rewrites68.6%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6468.0
Applied rewrites68.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (/ (exp (- b)) y) x)))
(if (<= b -1.95e+90)
t_1
(if (<= b 1820000.0) (* (/ x y) (pow a (- t 1.0))) 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.95e+90) {
tmp = t_1;
} else if (b <= 1820000.0) {
tmp = (x / y) * pow(a, (t - 1.0));
} 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.95d+90)) then
tmp = t_1
else if (b <= 1820000.0d0) then
tmp = (x / y) * (a ** (t - 1.0d0))
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.95e+90) {
tmp = t_1;
} else if (b <= 1820000.0) {
tmp = (x / y) * Math.pow(a, (t - 1.0));
} 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.95e+90: tmp = t_1 elif b <= 1820000.0: tmp = (x / y) * math.pow(a, (t - 1.0)) 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.95e+90) tmp = t_1; elseif (b <= 1820000.0) tmp = Float64(Float64(x / y) * (a ^ Float64(t - 1.0))); 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.95e+90) tmp = t_1; elseif (b <= 1820000.0) tmp = (x / y) * (a ^ (t - 1.0)); 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.95e+90], t$95$1, If[LessEqual[b, 1820000.0], N[(N[(x / y), $MachinePrecision] * N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{e^{-b}}{y} \cdot x\\
\mathbf{if}\;b \leq -1.95 \cdot 10^{+90}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1820000:\\
\;\;\;\;\frac{x}{y} \cdot {a}^{\left(t - 1\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.9500000000000001e90 or 1.82e6 < b Initial program 100.0%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f6486.1
Applied rewrites86.1%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6486.1
Applied rewrites86.1%
if -1.9500000000000001e90 < b < 1.82e6Initial program 99.1%
Taylor expanded in b around 0
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
associate-/l*N/A
associate-*r*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
Applied rewrites74.8%
Taylor expanded in y around 0
Applied rewrites61.2%
Taylor expanded in b around 0
Applied rewrites61.9%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* (/ (exp (- b)) y) x))) (if (<= b -6.8e+22) t_1 (if (<= b 2.9e-17) (/ 1.0 (/ y (/ x a))) 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 <= -6.8e+22) {
tmp = t_1;
} else if (b <= 2.9e-17) {
tmp = 1.0 / (y / (x / a));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (exp(-b) / y) * x
if (b <= (-6.8d+22)) then
tmp = t_1
else if (b <= 2.9d-17) then
tmp = 1.0d0 / (y / (x / a))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (Math.exp(-b) / y) * x;
double tmp;
if (b <= -6.8e+22) {
tmp = t_1;
} else if (b <= 2.9e-17) {
tmp = 1.0 / (y / (x / a));
} 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 <= -6.8e+22: tmp = t_1 elif b <= 2.9e-17: tmp = 1.0 / (y / (x / a)) 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 <= -6.8e+22) tmp = t_1; elseif (b <= 2.9e-17) tmp = Float64(1.0 / Float64(y / Float64(x / a))); 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 <= -6.8e+22) tmp = t_1; elseif (b <= 2.9e-17) tmp = 1.0 / (y / (x / a)); 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, -6.8e+22], t$95$1, If[LessEqual[b, 2.9e-17], N[(1.0 / N[(y / N[(x / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{e^{-b}}{y} \cdot x\\
\mathbf{if}\;b \leq -6.8 \cdot 10^{+22}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 2.9 \cdot 10^{-17}:\\
\;\;\;\;\frac{1}{\frac{y}{\frac{x}{a}}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -6.8e22 or 2.9000000000000003e-17 < b Initial program 100.0%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f6479.3
Applied rewrites79.3%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6479.3
Applied rewrites79.3%
if -6.8e22 < b < 2.9000000000000003e-17Initial program 99.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 t around 0
Applied rewrites74.7%
Taylor expanded in y around 0
Applied rewrites36.0%
lift-/.f64N/A
clear-numN/A
lower-/.f64N/A
lower-/.f6437.1
Applied rewrites37.1%
(FPCore (x y z t a b) :precision binary64 (if (<= b 4.35e-246) (/ (/ (fma (- x) b x) a) y) (* (pow a -1.0) (/ x y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 4.35e-246) {
tmp = (fma(-x, b, x) / a) / y;
} else {
tmp = pow(a, -1.0) * (x / y);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 4.35e-246) tmp = Float64(Float64(fma(Float64(-x), b, x) / a) / y); else tmp = Float64((a ^ -1.0) * Float64(x / y)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 4.35e-246], N[(N[(N[((-x) * b + x), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision], N[(N[Power[a, -1.0], $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 4.35 \cdot 10^{-246}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(-x, b, x\right)}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;{a}^{-1} \cdot \frac{x}{y}\\
\end{array}
\end{array}
if b < 4.3499999999999999e-246Initial program 99.3%
Taylor expanded in b around 0
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
associate-/l*N/A
associate-*r*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
Applied rewrites73.9%
Taylor expanded in y around 0
Applied rewrites62.9%
Taylor expanded in t around 0
Applied rewrites46.4%
if 4.3499999999999999e-246 < b Initial program 99.6%
Taylor expanded in b around 0
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
associate-/l*N/A
associate-*r*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
Applied rewrites51.1%
Taylor expanded in y around 0
Applied rewrites44.0%
Taylor expanded in t around 0
Applied rewrites23.4%
Taylor expanded in b around 0
Applied rewrites27.7%
Final simplification36.9%
(FPCore (x y z t a b) :precision binary64 (if (<= b 4.35e-246) (/ (/ (fma (- x) b x) a) y) (if (<= b 2.9e-5) (* (/ (- 1.0 b) a) (/ x y)) (/ (/ x a) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 4.35e-246) {
tmp = (fma(-x, b, x) / a) / y;
} else if (b <= 2.9e-5) {
tmp = ((1.0 - b) / a) * (x / y);
} else {
tmp = (x / a) / y;
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 4.35e-246) tmp = Float64(Float64(fma(Float64(-x), b, x) / a) / y); elseif (b <= 2.9e-5) tmp = Float64(Float64(Float64(1.0 - b) / a) * Float64(x / y)); else tmp = Float64(Float64(x / a) / y); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 4.35e-246], N[(N[(N[((-x) * b + x), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 2.9e-5], N[(N[(N[(1.0 - b), $MachinePrecision] / a), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 4.35 \cdot 10^{-246}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(-x, b, x\right)}{a}}{y}\\
\mathbf{elif}\;b \leq 2.9 \cdot 10^{-5}:\\
\;\;\;\;\frac{1 - b}{a} \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\end{array}
\end{array}
if b < 4.3499999999999999e-246Initial program 99.3%
Taylor expanded in b around 0
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
associate-/l*N/A
associate-*r*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
Applied rewrites73.9%
Taylor expanded in y around 0
Applied rewrites62.9%
Taylor expanded in t around 0
Applied rewrites46.4%
if 4.3499999999999999e-246 < b < 2.9e-5Initial program 99.2%
Taylor expanded in b around 0
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
associate-/l*N/A
associate-*r*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
Applied rewrites74.1%
Taylor expanded in y around 0
Applied rewrites63.8%
Taylor expanded in b around 0
Applied rewrites63.8%
Taylor expanded in t around 0
Applied rewrites40.6%
if 2.9e-5 < b 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--.f6450.7
Applied rewrites50.7%
Taylor expanded in t around 0
Applied rewrites36.8%
Taylor expanded in y around 0
Applied rewrites18.6%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1e-222) (/ (/ (fma (- x) b x) a) y) (/ 1.0 (/ y (/ x a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1e-222) {
tmp = (fma(-x, b, x) / a) / y;
} else {
tmp = 1.0 / (y / (x / a));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1e-222) tmp = Float64(Float64(fma(Float64(-x), b, x) / a) / y); else tmp = Float64(1.0 / Float64(y / Float64(x / a))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1e-222], N[(N[(N[((-x) * b + x), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision], N[(1.0 / N[(y / N[(x / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1 \cdot 10^{-222}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(-x, b, x\right)}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{y}{\frac{x}{a}}}\\
\end{array}
\end{array}
if b < -1.00000000000000005e-222Initial program 99.6%
Taylor expanded in b around 0
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
associate-/l*N/A
associate-*r*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
Applied rewrites74.3%
Taylor expanded in y around 0
Applied rewrites64.6%
Taylor expanded in t around 0
Applied rewrites50.0%
if -1.00000000000000005e-222 < b Initial program 99.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--.f6464.4
Applied rewrites64.4%
Taylor expanded in t around 0
Applied rewrites60.0%
Taylor expanded in y around 0
Applied rewrites27.4%
lift-/.f64N/A
clear-numN/A
lower-/.f64N/A
lower-/.f6428.2
Applied rewrites28.2%
(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 99.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--.f6465.9
Applied rewrites65.9%
Taylor expanded in t around 0
Applied rewrites60.0%
Taylor expanded in y around 0
Applied rewrites29.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (pow a (- t 1.0)))
(t_2 (/ (* x (/ t_1 y)) (- (+ b 1.0) (* y (log z))))))
(if (< t -0.8845848504127471)
t_2
(if (< t 852031.2288374073)
(/ (* (/ x y) t_1) (exp (- b (* (log z) y))))
t_2))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = pow(a, (t - 1.0));
double t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * log(z)));
double tmp;
if (t < -0.8845848504127471) {
tmp = t_2;
} else if (t < 852031.2288374073) {
tmp = ((x / y) * t_1) / exp((b - (log(z) * y)));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = a ** (t - 1.0d0)
t_2 = (x * (t_1 / y)) / ((b + 1.0d0) - (y * log(z)))
if (t < (-0.8845848504127471d0)) then
tmp = t_2
else if (t < 852031.2288374073d0) then
tmp = ((x / y) * t_1) / exp((b - (log(z) * y)))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = Math.pow(a, (t - 1.0));
double t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * Math.log(z)));
double tmp;
if (t < -0.8845848504127471) {
tmp = t_2;
} else if (t < 852031.2288374073) {
tmp = ((x / y) * t_1) / Math.exp((b - (Math.log(z) * y)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = math.pow(a, (t - 1.0)) t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * math.log(z))) tmp = 0 if t < -0.8845848504127471: tmp = t_2 elif t < 852031.2288374073: tmp = ((x / y) * t_1) / math.exp((b - (math.log(z) * y))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = a ^ Float64(t - 1.0) t_2 = Float64(Float64(x * Float64(t_1 / y)) / Float64(Float64(b + 1.0) - Float64(y * log(z)))) tmp = 0.0 if (t < -0.8845848504127471) tmp = t_2; elseif (t < 852031.2288374073) tmp = Float64(Float64(Float64(x / y) * t_1) / exp(Float64(b - Float64(log(z) * y)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a ^ (t - 1.0); t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * log(z))); tmp = 0.0; if (t < -0.8845848504127471) tmp = t_2; elseif (t < 852031.2288374073) tmp = ((x / y) * t_1) / exp((b - (log(z) * y))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision] / N[(N[(b + 1.0), $MachinePrecision] - N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -0.8845848504127471], t$95$2, If[Less[t, 852031.2288374073], N[(N[(N[(x / y), $MachinePrecision] * t$95$1), $MachinePrecision] / N[Exp[N[(b - N[(N[Log[z], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {a}^{\left(t - 1\right)}\\
t_2 := \frac{x \cdot \frac{t\_1}{y}}{\left(b + 1\right) - y \cdot \log z}\\
\mathbf{if}\;t < -0.8845848504127471:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t < 852031.2288374073:\\
\;\;\;\;\frac{\frac{x}{y} \cdot t\_1}{e^{b - \log z \cdot y}}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024259
(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))