
(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 10 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 98.9%
Final simplification98.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (pow a (- t 1.0)) x)))
(if (<= t -1.3e+172)
(/ t_1 y)
(if (<= t -6.4e-156)
(* (/ (- -1.0) y) (/ (* (pow z y) x) a))
(if (<= t 3.8e-258)
(/ (* (exp (- (- (log a)) b)) x) y)
(if (<= t 8e+58)
(* (/ (pow z y) a) (/ (- x (* b x)) y))
(* (/ 1.0 y) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = pow(a, (t - 1.0)) * x;
double tmp;
if (t <= -1.3e+172) {
tmp = t_1 / y;
} else if (t <= -6.4e-156) {
tmp = (-(-1.0) / y) * ((pow(z, y) * x) / a);
} else if (t <= 3.8e-258) {
tmp = (exp((-log(a) - b)) * x) / y;
} else if (t <= 8e+58) {
tmp = (pow(z, y) / a) * ((x - (b * x)) / y);
} else {
tmp = (1.0 / y) * 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 = (a ** (t - 1.0d0)) * x
if (t <= (-1.3d+172)) then
tmp = t_1 / y
else if (t <= (-6.4d-156)) then
tmp = (-(-1.0d0) / y) * (((z ** y) * x) / a)
else if (t <= 3.8d-258) then
tmp = (exp((-log(a) - b)) * x) / y
else if (t <= 8d+58) then
tmp = ((z ** y) / a) * ((x - (b * x)) / y)
else
tmp = (1.0d0 / y) * 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.pow(a, (t - 1.0)) * x;
double tmp;
if (t <= -1.3e+172) {
tmp = t_1 / y;
} else if (t <= -6.4e-156) {
tmp = (-(-1.0) / y) * ((Math.pow(z, y) * x) / a);
} else if (t <= 3.8e-258) {
tmp = (Math.exp((-Math.log(a) - b)) * x) / y;
} else if (t <= 8e+58) {
tmp = (Math.pow(z, y) / a) * ((x - (b * x)) / y);
} else {
tmp = (1.0 / y) * t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = math.pow(a, (t - 1.0)) * x tmp = 0 if t <= -1.3e+172: tmp = t_1 / y elif t <= -6.4e-156: tmp = (-(-1.0) / y) * ((math.pow(z, y) * x) / a) elif t <= 3.8e-258: tmp = (math.exp((-math.log(a) - b)) * x) / y elif t <= 8e+58: tmp = (math.pow(z, y) / a) * ((x - (b * x)) / y) else: tmp = (1.0 / y) * t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64((a ^ Float64(t - 1.0)) * x) tmp = 0.0 if (t <= -1.3e+172) tmp = Float64(t_1 / y); elseif (t <= -6.4e-156) tmp = Float64(Float64(Float64(-(-1.0)) / y) * Float64(Float64((z ^ y) * x) / a)); elseif (t <= 3.8e-258) tmp = Float64(Float64(exp(Float64(Float64(-log(a)) - b)) * x) / y); elseif (t <= 8e+58) tmp = Float64(Float64((z ^ y) / a) * Float64(Float64(x - Float64(b * x)) / y)); else tmp = Float64(Float64(1.0 / y) * t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a ^ (t - 1.0)) * x; tmp = 0.0; if (t <= -1.3e+172) tmp = t_1 / y; elseif (t <= -6.4e-156) tmp = (-(-1.0) / y) * (((z ^ y) * x) / a); elseif (t <= 3.8e-258) tmp = (exp((-log(a) - b)) * x) / y; elseif (t <= 8e+58) tmp = ((z ^ y) / a) * ((x - (b * x)) / y); else tmp = (1.0 / y) * t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[t, -1.3e+172], N[(t$95$1 / y), $MachinePrecision], If[LessEqual[t, -6.4e-156], N[(N[((--1.0) / y), $MachinePrecision] * N[(N[(N[Power[z, y], $MachinePrecision] * x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.8e-258], N[(N[(N[Exp[N[((-N[Log[a], $MachinePrecision]) - b), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 8e+58], N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] * N[(N[(x - N[(b * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / y), $MachinePrecision] * t$95$1), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {a}^{\left(t - 1\right)} \cdot x\\
\mathbf{if}\;t \leq -1.3 \cdot 10^{+172}:\\
\;\;\;\;\frac{t\_1}{y}\\
\mathbf{elif}\;t \leq -6.4 \cdot 10^{-156}:\\
\;\;\;\;\frac{--1}{y} \cdot \frac{{z}^{y} \cdot x}{a}\\
\mathbf{elif}\;t \leq 3.8 \cdot 10^{-258}:\\
\;\;\;\;\frac{e^{\left(-\log a\right) - b} \cdot x}{y}\\
\mathbf{elif}\;t \leq 8 \cdot 10^{+58}:\\
\;\;\;\;\frac{{z}^{y}}{a} \cdot \frac{x - b \cdot x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{y} \cdot t\_1\\
\end{array}
\end{array}
if t < -1.3e172Initial 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--.f6471.6
Applied rewrites71.6%
Taylor expanded in y around 0
Applied rewrites88.8%
if -1.3e172 < t < -6.39999999999999964e-156Initial 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--.f6471.5
Applied rewrites71.5%
Taylor expanded in t around 0
Applied rewrites77.7%
lift-/.f64N/A
frac-2negN/A
div-invN/A
lower-*.f64N/A
Applied rewrites77.7%
if -6.39999999999999964e-156 < t < 3.7999999999999998e-258Initial program 98.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-log81.2
Applied rewrites81.2%
Taylor expanded in t around 0
Applied rewrites81.2%
if 3.7999999999999998e-258 < t < 7.99999999999999955e58Initial program 97.0%
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 rewrites75.9%
Taylor expanded in t around 0
Applied rewrites82.4%
if 7.99999999999999955e58 < t 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-log89.8
Applied rewrites89.8%
Taylor expanded in b around 0
+-commutativeN/A
exp-sumN/A
*-commutativeN/A
exp-to-powN/A
associate-*r*N/A
associate-/l*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower-pow.f6467.3
Applied rewrites67.3%
Taylor expanded in y around 0
Applied rewrites84.7%
Final simplification82.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (/ (* (pow z y) x) a) y)))
(if (<= y -3.9e+112)
t_1
(if (<= y 2.2e+48) (/ (* (exp (- (* (log a) (- t 1.0)) b)) x) y) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((pow(z, y) * x) / a) / y;
double tmp;
if (y <= -3.9e+112) {
tmp = t_1;
} else if (y <= 2.2e+48) {
tmp = (exp(((log(a) * (t - 1.0)) - b)) * 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 = (((z ** y) * x) / a) / y
if (y <= (-3.9d+112)) then
tmp = t_1
else if (y <= 2.2d+48) then
tmp = (exp(((log(a) * (t - 1.0d0)) - b)) * 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.pow(z, y) * x) / a) / y;
double tmp;
if (y <= -3.9e+112) {
tmp = t_1;
} else if (y <= 2.2e+48) {
tmp = (Math.exp(((Math.log(a) * (t - 1.0)) - b)) * x) / y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((math.pow(z, y) * x) / a) / y tmp = 0 if y <= -3.9e+112: tmp = t_1 elif y <= 2.2e+48: tmp = (math.exp(((math.log(a) * (t - 1.0)) - b)) * x) / y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64((z ^ y) * x) / a) / y) tmp = 0.0 if (y <= -3.9e+112) tmp = t_1; elseif (y <= 2.2e+48) tmp = Float64(Float64(exp(Float64(Float64(log(a) * Float64(t - 1.0)) - b)) * x) / y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (((z ^ y) * x) / a) / y; tmp = 0.0; if (y <= -3.9e+112) tmp = t_1; elseif (y <= 2.2e+48) tmp = (exp(((log(a) * (t - 1.0)) - b)) * 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[(N[Power[z, y], $MachinePrecision] * x), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -3.9e+112], t$95$1, If[LessEqual[y, 2.2e+48], N[(N[(N[Exp[N[(N[(N[Log[a], $MachinePrecision] * N[(t - 1.0), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{{z}^{y} \cdot x}{a}}{y}\\
\mathbf{if}\;y \leq -3.9 \cdot 10^{+112}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{+48}:\\
\;\;\;\;\frac{e^{\log a \cdot \left(t - 1\right) - b} \cdot x}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -3.89999999999999968e112 or 2.1999999999999999e48 < 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--.f6466.3
Applied rewrites66.3%
Taylor expanded in t around 0
Applied rewrites85.5%
if -3.89999999999999968e112 < y < 2.1999999999999999e48Initial program 98.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-log92.3
Applied rewrites92.3%
Final simplification89.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (/ (* (pow z y) x) a) y)))
(if (<= y -92.0)
t_1
(if (<= y 190000000.0) (* (/ (pow a (- t 1.0)) (* (exp b) y)) x) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((pow(z, y) * x) / a) / y;
double tmp;
if (y <= -92.0) {
tmp = t_1;
} else if (y <= 190000000.0) {
tmp = (pow(a, (t - 1.0)) / (exp(b) * 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 = (((z ** y) * x) / a) / y
if (y <= (-92.0d0)) then
tmp = t_1
else if (y <= 190000000.0d0) then
tmp = ((a ** (t - 1.0d0)) / (exp(b) * 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.pow(z, y) * x) / a) / y;
double tmp;
if (y <= -92.0) {
tmp = t_1;
} else if (y <= 190000000.0) {
tmp = (Math.pow(a, (t - 1.0)) / (Math.exp(b) * y)) * x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((math.pow(z, y) * x) / a) / y tmp = 0 if y <= -92.0: tmp = t_1 elif y <= 190000000.0: tmp = (math.pow(a, (t - 1.0)) / (math.exp(b) * y)) * x else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64((z ^ y) * x) / a) / y) tmp = 0.0 if (y <= -92.0) tmp = t_1; elseif (y <= 190000000.0) tmp = Float64(Float64((a ^ Float64(t - 1.0)) / Float64(exp(b) * y)) * x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (((z ^ y) * x) / a) / y; tmp = 0.0; if (y <= -92.0) tmp = t_1; elseif (y <= 190000000.0) tmp = ((a ^ (t - 1.0)) / (exp(b) * 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[(N[Power[z, y], $MachinePrecision] * x), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -92.0], t$95$1, If[LessEqual[y, 190000000.0], N[(N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] / N[(N[Exp[b], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{{z}^{y} \cdot x}{a}}{y}\\
\mathbf{if}\;y \leq -92:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 190000000:\\
\;\;\;\;\frac{{a}^{\left(t - 1\right)}}{e^{b} \cdot y} \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -92 or 1.9e8 < 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--.f6467.5
Applied rewrites67.5%
Taylor expanded in t around 0
Applied rewrites81.7%
if -92 < y < 1.9e8Initial program 97.7%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f6455.7
Applied rewrites55.7%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6455.7
Applied rewrites55.7%
Taylor expanded in y around 0
exp-diffN/A
associate-/l/N/A
lower-/.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-exp.f6483.4
Applied rewrites83.4%
Final simplification82.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (pow a (- t 1.0)) x)))
(if (<= t -1.3e+172)
(/ t_1 y)
(if (<= t -1.65e-301)
(/ (/ (* (pow z y) x) a) y)
(if (<= t 8e+58)
(* (/ (pow z y) a) (/ (- x (* b x)) y))
(* (/ 1.0 y) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = pow(a, (t - 1.0)) * x;
double tmp;
if (t <= -1.3e+172) {
tmp = t_1 / y;
} else if (t <= -1.65e-301) {
tmp = ((pow(z, y) * x) / a) / y;
} else if (t <= 8e+58) {
tmp = (pow(z, y) / a) * ((x - (b * x)) / y);
} else {
tmp = (1.0 / y) * 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 = (a ** (t - 1.0d0)) * x
if (t <= (-1.3d+172)) then
tmp = t_1 / y
else if (t <= (-1.65d-301)) then
tmp = (((z ** y) * x) / a) / y
else if (t <= 8d+58) then
tmp = ((z ** y) / a) * ((x - (b * x)) / y)
else
tmp = (1.0d0 / y) * 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.pow(a, (t - 1.0)) * x;
double tmp;
if (t <= -1.3e+172) {
tmp = t_1 / y;
} else if (t <= -1.65e-301) {
tmp = ((Math.pow(z, y) * x) / a) / y;
} else if (t <= 8e+58) {
tmp = (Math.pow(z, y) / a) * ((x - (b * x)) / y);
} else {
tmp = (1.0 / y) * t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = math.pow(a, (t - 1.0)) * x tmp = 0 if t <= -1.3e+172: tmp = t_1 / y elif t <= -1.65e-301: tmp = ((math.pow(z, y) * x) / a) / y elif t <= 8e+58: tmp = (math.pow(z, y) / a) * ((x - (b * x)) / y) else: tmp = (1.0 / y) * t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64((a ^ Float64(t - 1.0)) * x) tmp = 0.0 if (t <= -1.3e+172) tmp = Float64(t_1 / y); elseif (t <= -1.65e-301) tmp = Float64(Float64(Float64((z ^ y) * x) / a) / y); elseif (t <= 8e+58) tmp = Float64(Float64((z ^ y) / a) * Float64(Float64(x - Float64(b * x)) / y)); else tmp = Float64(Float64(1.0 / y) * t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a ^ (t - 1.0)) * x; tmp = 0.0; if (t <= -1.3e+172) tmp = t_1 / y; elseif (t <= -1.65e-301) tmp = (((z ^ y) * x) / a) / y; elseif (t <= 8e+58) tmp = ((z ^ y) / a) * ((x - (b * x)) / y); else tmp = (1.0 / y) * t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[t, -1.3e+172], N[(t$95$1 / y), $MachinePrecision], If[LessEqual[t, -1.65e-301], N[(N[(N[(N[Power[z, y], $MachinePrecision] * x), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 8e+58], N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] * N[(N[(x - N[(b * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / y), $MachinePrecision] * t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {a}^{\left(t - 1\right)} \cdot x\\
\mathbf{if}\;t \leq -1.3 \cdot 10^{+172}:\\
\;\;\;\;\frac{t\_1}{y}\\
\mathbf{elif}\;t \leq -1.65 \cdot 10^{-301}:\\
\;\;\;\;\frac{\frac{{z}^{y} \cdot x}{a}}{y}\\
\mathbf{elif}\;t \leq 8 \cdot 10^{+58}:\\
\;\;\;\;\frac{{z}^{y}}{a} \cdot \frac{x - b \cdot x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{y} \cdot t\_1\\
\end{array}
\end{array}
if t < -1.3e172Initial 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--.f6471.6
Applied rewrites71.6%
Taylor expanded in y around 0
Applied rewrites88.8%
if -1.3e172 < t < -1.65e-301Initial 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--.f6468.5
Applied rewrites68.5%
Taylor expanded in t around 0
Applied rewrites72.8%
if -1.65e-301 < t < 7.99999999999999955e58Initial program 97.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.5%
Taylor expanded in t around 0
Applied rewrites81.2%
if 7.99999999999999955e58 < t 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-log89.8
Applied rewrites89.8%
Taylor expanded in b around 0
+-commutativeN/A
exp-sumN/A
*-commutativeN/A
exp-to-powN/A
associate-*r*N/A
associate-/l*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower-pow.f6467.3
Applied rewrites67.3%
Taylor expanded in y around 0
Applied rewrites84.7%
Final simplification80.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (pow a (- t 1.0)) x)))
(if (<= (- t 1.0) -1.0000002)
(* (/ 1.0 y) t_1)
(if (<= (- t 1.0) 5e+29) (/ (* (/ x a) (pow z y)) y) (/ 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)) * x;
double tmp;
if ((t - 1.0) <= -1.0000002) {
tmp = (1.0 / y) * t_1;
} else if ((t - 1.0) <= 5e+29) {
tmp = ((x / a) * pow(z, y)) / y;
} else {
tmp = 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) :: tmp
t_1 = (a ** (t - 1.0d0)) * x
if ((t - 1.0d0) <= (-1.0000002d0)) then
tmp = (1.0d0 / y) * t_1
else if ((t - 1.0d0) <= 5d+29) then
tmp = ((x / a) * (z ** y)) / y
else
tmp = 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)) * x;
double tmp;
if ((t - 1.0) <= -1.0000002) {
tmp = (1.0 / y) * t_1;
} else if ((t - 1.0) <= 5e+29) {
tmp = ((x / a) * Math.pow(z, y)) / y;
} else {
tmp = t_1 / y;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = math.pow(a, (t - 1.0)) * x tmp = 0 if (t - 1.0) <= -1.0000002: tmp = (1.0 / y) * t_1 elif (t - 1.0) <= 5e+29: tmp = ((x / a) * math.pow(z, y)) / y else: tmp = t_1 / y return tmp
function code(x, y, z, t, a, b) t_1 = Float64((a ^ Float64(t - 1.0)) * x) tmp = 0.0 if (Float64(t - 1.0) <= -1.0000002) tmp = Float64(Float64(1.0 / y) * t_1); elseif (Float64(t - 1.0) <= 5e+29) tmp = Float64(Float64(Float64(x / a) * (z ^ y)) / y); else tmp = Float64(t_1 / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a ^ (t - 1.0)) * x; tmp = 0.0; if ((t - 1.0) <= -1.0000002) tmp = (1.0 / y) * t_1; elseif ((t - 1.0) <= 5e+29) tmp = ((x / a) * (z ^ y)) / y; else tmp = t_1 / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[N[(t - 1.0), $MachinePrecision], -1.0000002], N[(N[(1.0 / y), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[N[(t - 1.0), $MachinePrecision], 5e+29], N[(N[(N[(x / a), $MachinePrecision] * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(t$95$1 / y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {a}^{\left(t - 1\right)} \cdot x\\
\mathbf{if}\;t - 1 \leq -1.0000002:\\
\;\;\;\;\frac{1}{y} \cdot t\_1\\
\mathbf{elif}\;t - 1 \leq 5 \cdot 10^{+29}:\\
\;\;\;\;\frac{\frac{x}{a} \cdot {z}^{y}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_1}{y}\\
\end{array}
\end{array}
if (-.f64 t #s(literal 1 binary64)) < -1.00000019999999989Initial 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-log88.6
Applied rewrites88.6%
Taylor expanded in b around 0
+-commutativeN/A
exp-sumN/A
*-commutativeN/A
exp-to-powN/A
associate-*r*N/A
associate-/l*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower-pow.f6464.3
Applied rewrites64.3%
Taylor expanded in y around 0
Applied rewrites76.0%
if -1.00000019999999989 < (-.f64 t #s(literal 1 binary64)) < 5.0000000000000001e29Initial program 97.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--.f6474.2
Applied rewrites74.2%
Taylor expanded in t around 0
Applied rewrites75.5%
Applied rewrites70.6%
if 5.0000000000000001e29 < (-.f64 t #s(literal 1 binary64)) 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--.f6466.2
Applied rewrites66.2%
Taylor expanded in y around 0
Applied rewrites82.5%
Final simplification75.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* (pow a (- t 1.0)) x) y)))
(if (<= t -1.3e+172)
t_1
(if (<= t 3.5e+30) (/ (/ (* (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 = (pow(a, (t - 1.0)) * x) / y;
double tmp;
if (t <= -1.3e+172) {
tmp = t_1;
} else if (t <= 3.5e+30) {
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 = ((a ** (t - 1.0d0)) * x) / y
if (t <= (-1.3d+172)) then
tmp = t_1
else if (t <= 3.5d+30) 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.pow(a, (t - 1.0)) * x) / y;
double tmp;
if (t <= -1.3e+172) {
tmp = t_1;
} else if (t <= 3.5e+30) {
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.pow(a, (t - 1.0)) * x) / y tmp = 0 if t <= -1.3e+172: tmp = t_1 elif t <= 3.5e+30: 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((a ^ Float64(t - 1.0)) * x) / y) tmp = 0.0 if (t <= -1.3e+172) tmp = t_1; elseif (t <= 3.5e+30) 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 = ((a ^ (t - 1.0)) * x) / y; tmp = 0.0; if (t <= -1.3e+172) tmp = t_1; elseif (t <= 3.5e+30) 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[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t, -1.3e+172], t$95$1, If[LessEqual[t, 3.5e+30], 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{{a}^{\left(t - 1\right)} \cdot x}{y}\\
\mathbf{if}\;t \leq -1.3 \cdot 10^{+172}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.5 \cdot 10^{+30}:\\
\;\;\;\;\frac{\frac{{z}^{y} \cdot x}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.3e172 or 3.50000000000000021e30 < 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--.f6468.2
Applied rewrites68.2%
Taylor expanded in y around 0
Applied rewrites84.8%
if -1.3e172 < t < 3.50000000000000021e30Initial program 98.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--.f6470.5
Applied rewrites70.5%
Taylor expanded in t around 0
Applied rewrites73.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (/ (exp (- b)) y) x)))
(if (<= b -7.2e+19)
t_1
(if (<= b 4.2e+250) (/ (* (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 <= -7.2e+19) {
tmp = t_1;
} else if (b <= 4.2e+250) {
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 <= (-7.2d+19)) then
tmp = t_1
else if (b <= 4.2d+250) 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 <= -7.2e+19) {
tmp = t_1;
} else if (b <= 4.2e+250) {
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 <= -7.2e+19: tmp = t_1 elif b <= 4.2e+250: 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 <= -7.2e+19) tmp = t_1; elseif (b <= 4.2e+250) 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 <= -7.2e+19) tmp = t_1; elseif (b <= 4.2e+250) 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, -7.2e+19], t$95$1, If[LessEqual[b, 4.2e+250], 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 -7.2 \cdot 10^{+19}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 4.2 \cdot 10^{+250}:\\
\;\;\;\;\frac{{a}^{\left(t - 1\right)} \cdot x}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -7.2e19 or 4.2000000000000003e250 < b Initial program 100.0%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f6480.8
Applied rewrites80.8%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6480.8
Applied rewrites80.8%
if -7.2e19 < b < 4.2000000000000003e250Initial program 98.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.9
Applied rewrites78.9%
Taylor expanded in y around 0
Applied rewrites69.9%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* (/ (exp (- b)) y) x))) (if (<= b -1160000000.0) t_1 (if (<= b 84000000000.0) (/ (/ 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 <= -1160000000.0) {
tmp = t_1;
} else if (b <= 84000000000.0) {
tmp = (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 <= (-1160000000.0d0)) then
tmp = t_1
else if (b <= 84000000000.0d0) then
tmp = (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 <= -1160000000.0) {
tmp = t_1;
} else if (b <= 84000000000.0) {
tmp = (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 <= -1160000000.0: tmp = t_1 elif b <= 84000000000.0: tmp = (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 <= -1160000000.0) tmp = t_1; elseif (b <= 84000000000.0) tmp = Float64(Float64(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 <= -1160000000.0) tmp = t_1; elseif (b <= 84000000000.0) tmp = (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, -1160000000.0], t$95$1, If[LessEqual[b, 84000000000.0], N[(N[(x / 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 -1160000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 84000000000:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.16e9 or 8.4e10 < b Initial program 100.0%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f6475.4
Applied rewrites75.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6475.4
Applied rewrites75.4%
if -1.16e9 < b < 8.4e10Initial 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--.f6483.3
Applied rewrites83.3%
Taylor expanded in t around 0
Applied rewrites75.6%
Taylor expanded in y around 0
Applied rewrites40.6%
(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.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--.f6469.6
Applied rewrites69.6%
Taylor expanded in t around 0
Applied rewrites62.5%
Taylor expanded in y around 0
Applied rewrites31.7%
(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 2024277
(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))