
(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 21 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.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y)))
(if (or (<= t_1 -5e-117) (not (<= t_1 0.0)))
(/ (fma (- (* (* (/ x a) 0.5) b) (/ x a)) b (/ x a)) y)
(/
(/ x (fma (fma (fma (* b a) 0.16666666666666666 (* 0.5 a)) b a) b a))
y))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
double tmp;
if ((t_1 <= -5e-117) || !(t_1 <= 0.0)) {
tmp = fma(((((x / a) * 0.5) * b) - (x / a)), b, (x / a)) / y;
} else {
tmp = (x / fma(fma(fma((b * a), 0.16666666666666666, (0.5 * a)), b, a), b, a)) / y;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y) tmp = 0.0 if ((t_1 <= -5e-117) || !(t_1 <= 0.0)) tmp = Float64(fma(Float64(Float64(Float64(Float64(x / a) * 0.5) * b) - Float64(x / a)), b, Float64(x / a)) / y); else tmp = Float64(Float64(x / fma(fma(fma(Float64(b * a), 0.16666666666666666, Float64(0.5 * a)), b, a), b, a)) / y); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e-117], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(N[(N[(N[(N[(N[(x / a), $MachinePrecision] * 0.5), $MachinePrecision] * b), $MachinePrecision] - N[(x / a), $MachinePrecision]), $MachinePrecision] * b + N[(x / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x / N[(N[(N[(N[(b * a), $MachinePrecision] * 0.16666666666666666 + N[(0.5 * a), $MachinePrecision]), $MachinePrecision] * b + a), $MachinePrecision] * b + a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-117} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;\frac{\mathsf{fma}\left(\left(\frac{x}{a} \cdot 0.5\right) \cdot b - \frac{x}{a}, b, \frac{x}{a}\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(b \cdot a, 0.16666666666666666, 0.5 \cdot a\right), b, a\right), b, a\right)}}{y}\\
\end{array}
\end{array}
if (/.f64 (*.f64 x (exp.f64 (-.f64 (+.f64 (*.f64 y (log.f64 z)) (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a))) b))) y) < -5e-117 or 0.0 < (/.f64 (*.f64 x (exp.f64 (-.f64 (+.f64 (*.f64 y (log.f64 z)) (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a))) b))) y) Initial program 98.6%
Taylor expanded in y around 0
exp-diffN/A
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f64N/A
lower-exp.f6463.1
Applied rewrites63.1%
Applied rewrites68.8%
Taylor expanded in t around 0
Applied rewrites59.0%
Taylor expanded in b around 0
Applied rewrites46.4%
if -5e-117 < (/.f64 (*.f64 x (exp.f64 (-.f64 (+.f64 (*.f64 y (log.f64 z)) (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a))) b))) y) < 0.0Initial program 98.9%
Taylor expanded in y around 0
exp-diffN/A
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f64N/A
lower-exp.f6462.6
Applied rewrites62.6%
Applied rewrites66.5%
Taylor expanded in t around 0
Applied rewrites65.2%
Taylor expanded in b around 0
Applied rewrites63.1%
Final simplification54.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y)))
(if (or (<= t_1 (- INFINITY)) (not (<= t_1 0.0)))
(/ (/ (fma (- x) b x) a) y)
(/
(/ x (fma (fma (fma (* b a) 0.16666666666666666 (* 0.5 a)) b a) b a))
y))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
double tmp;
if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 0.0)) {
tmp = (fma(-x, b, x) / a) / y;
} else {
tmp = (x / fma(fma(fma((b * a), 0.16666666666666666, (0.5 * a)), b, a), b, a)) / y;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y) tmp = 0.0 if ((t_1 <= Float64(-Inf)) || !(t_1 <= 0.0)) tmp = Float64(Float64(fma(Float64(-x), b, x) / a) / y); else tmp = Float64(Float64(x / fma(fma(fma(Float64(b * a), 0.16666666666666666, Float64(0.5 * a)), b, a), b, a)) / y); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(N[(N[((-x) * b + x), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision], N[(N[(x / N[(N[(N[(N[(b * a), $MachinePrecision] * 0.16666666666666666 + N[(0.5 * a), $MachinePrecision]), $MachinePrecision] * b + a), $MachinePrecision] * b + a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\\
\mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(-x, b, x\right)}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(b \cdot a, 0.16666666666666666, 0.5 \cdot a\right), b, a\right), b, a\right)}}{y}\\
\end{array}
\end{array}
if (/.f64 (*.f64 x (exp.f64 (-.f64 (+.f64 (*.f64 y (log.f64 z)) (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a))) b))) y) < -inf.0 or 0.0 < (/.f64 (*.f64 x (exp.f64 (-.f64 (+.f64 (*.f64 y (log.f64 z)) (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a))) b))) y) Initial program 99.2%
Taylor expanded in y around 0
exp-diffN/A
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f64N/A
lower-exp.f6460.8
Applied rewrites60.8%
Applied rewrites66.7%
Taylor expanded in t around 0
Applied rewrites56.6%
Taylor expanded in b around 0
Applied rewrites34.6%
if -inf.0 < (/.f64 (*.f64 x (exp.f64 (-.f64 (+.f64 (*.f64 y (log.f64 z)) (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a))) b))) y) < 0.0Initial program 98.4%
Taylor expanded in y around 0
exp-diffN/A
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f64N/A
lower-exp.f6464.7
Applied rewrites64.7%
Applied rewrites68.5%
Taylor expanded in t around 0
Applied rewrites66.8%
Taylor expanded in b around 0
Applied rewrites64.9%
Final simplification50.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- t 1.0) (log a)))
(t_2 (/ (* x (exp (- (* (log a) t) b))) y)))
(if (<= t_1 -2e+31)
t_2
(if (<= t_1 -430.0)
(/ (/ x (* (exp b) a)) y)
(if (<= t_1 700.0) (/ (* x (/ (pow z y) a)) y) t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - 1.0) * log(a);
double t_2 = (x * exp(((log(a) * t) - b))) / y;
double tmp;
if (t_1 <= -2e+31) {
tmp = t_2;
} else if (t_1 <= -430.0) {
tmp = (x / (exp(b) * a)) / y;
} else if (t_1 <= 700.0) {
tmp = (x * (pow(z, y) / a)) / 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 = (t - 1.0d0) * log(a)
t_2 = (x * exp(((log(a) * t) - b))) / y
if (t_1 <= (-2d+31)) then
tmp = t_2
else if (t_1 <= (-430.0d0)) then
tmp = (x / (exp(b) * a)) / y
else if (t_1 <= 700.0d0) then
tmp = (x * ((z ** y) / a)) / 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 = (t - 1.0) * Math.log(a);
double t_2 = (x * Math.exp(((Math.log(a) * t) - b))) / y;
double tmp;
if (t_1 <= -2e+31) {
tmp = t_2;
} else if (t_1 <= -430.0) {
tmp = (x / (Math.exp(b) * a)) / y;
} else if (t_1 <= 700.0) {
tmp = (x * (Math.pow(z, y) / a)) / y;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - 1.0) * math.log(a) t_2 = (x * math.exp(((math.log(a) * t) - b))) / y tmp = 0 if t_1 <= -2e+31: tmp = t_2 elif t_1 <= -430.0: tmp = (x / (math.exp(b) * a)) / y elif t_1 <= 700.0: tmp = (x * (math.pow(z, y) / a)) / y else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - 1.0) * log(a)) t_2 = Float64(Float64(x * exp(Float64(Float64(log(a) * t) - b))) / y) tmp = 0.0 if (t_1 <= -2e+31) tmp = t_2; elseif (t_1 <= -430.0) tmp = Float64(Float64(x / Float64(exp(b) * a)) / y); elseif (t_1 <= 700.0) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - 1.0) * log(a); t_2 = (x * exp(((log(a) * t) - b))) / y; tmp = 0.0; if (t_1 <= -2e+31) tmp = t_2; elseif (t_1 <= -430.0) tmp = (x / (exp(b) * a)) / y; elseif (t_1 <= 700.0) tmp = (x * ((z ^ y) / a)) / y; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[Exp[N[(N[(N[Log[a], $MachinePrecision] * t), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+31], t$95$2, If[LessEqual[t$95$1, -430.0], N[(N[(x / N[(N[Exp[b], $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t$95$1, 700.0], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t - 1\right) \cdot \log a\\
t_2 := \frac{x \cdot e^{\log a \cdot t - b}}{y}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+31}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq -430:\\
\;\;\;\;\frac{\frac{x}{e^{b} \cdot a}}{y}\\
\mathbf{elif}\;t\_1 \leq 700:\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -1.9999999999999999e31 or 700 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) Initial program 100.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6494.0
Applied rewrites94.0%
if -1.9999999999999999e31 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -430Initial program 96.2%
Taylor expanded in y around 0
exp-diffN/A
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f64N/A
lower-exp.f6457.4
Applied rewrites57.4%
Taylor expanded in t around 0
Applied rewrites77.9%
if -430 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 700Initial program 98.5%
Taylor expanded in b around 0
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f6483.5
Applied rewrites83.5%
Taylor expanded in t around 0
Applied rewrites83.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- t 1.0) (log a))) (t_2 (* (/ (pow a (- t 1.0)) y) x)))
(if (<= t_1 -2e+31)
t_2
(if (<= t_1 -430.0)
(/ (/ x (* (exp b) a)) y)
(if (<= t_1 2e+84) (/ (* x (/ (pow z y) a)) y) t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - 1.0) * log(a);
double t_2 = (pow(a, (t - 1.0)) / y) * x;
double tmp;
if (t_1 <= -2e+31) {
tmp = t_2;
} else if (t_1 <= -430.0) {
tmp = (x / (exp(b) * a)) / y;
} else if (t_1 <= 2e+84) {
tmp = (x * (pow(z, y) / a)) / 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 = (t - 1.0d0) * log(a)
t_2 = ((a ** (t - 1.0d0)) / y) * x
if (t_1 <= (-2d+31)) then
tmp = t_2
else if (t_1 <= (-430.0d0)) then
tmp = (x / (exp(b) * a)) / y
else if (t_1 <= 2d+84) then
tmp = (x * ((z ** y) / a)) / 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 = (t - 1.0) * Math.log(a);
double t_2 = (Math.pow(a, (t - 1.0)) / y) * x;
double tmp;
if (t_1 <= -2e+31) {
tmp = t_2;
} else if (t_1 <= -430.0) {
tmp = (x / (Math.exp(b) * a)) / y;
} else if (t_1 <= 2e+84) {
tmp = (x * (Math.pow(z, y) / a)) / y;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - 1.0) * math.log(a) t_2 = (math.pow(a, (t - 1.0)) / y) * x tmp = 0 if t_1 <= -2e+31: tmp = t_2 elif t_1 <= -430.0: tmp = (x / (math.exp(b) * a)) / y elif t_1 <= 2e+84: tmp = (x * (math.pow(z, y) / a)) / y else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - 1.0) * log(a)) t_2 = Float64(Float64((a ^ Float64(t - 1.0)) / y) * x) tmp = 0.0 if (t_1 <= -2e+31) tmp = t_2; elseif (t_1 <= -430.0) tmp = Float64(Float64(x / Float64(exp(b) * a)) / y); elseif (t_1 <= 2e+84) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - 1.0) * log(a); t_2 = ((a ^ (t - 1.0)) / y) * x; tmp = 0.0; if (t_1 <= -2e+31) tmp = t_2; elseif (t_1 <= -430.0) tmp = (x / (exp(b) * a)) / y; elseif (t_1 <= 2e+84) tmp = (x * ((z ^ y) / a)) / y; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+31], t$95$2, If[LessEqual[t$95$1, -430.0], N[(N[(x / N[(N[Exp[b], $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t$95$1, 2e+84], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t - 1\right) \cdot \log a\\
t_2 := \frac{{a}^{\left(t - 1\right)}}{y} \cdot x\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+31}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq -430:\\
\;\;\;\;\frac{\frac{x}{e^{b} \cdot a}}{y}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+84}:\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -1.9999999999999999e31 or 2.00000000000000012e84 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) Initial program 100.0%
Taylor expanded in b around 0
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f6474.4
Applied rewrites74.4%
Taylor expanded in y around 0
Applied rewrites86.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6486.4
Applied rewrites86.4%
if -1.9999999999999999e31 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -430Initial program 96.2%
Taylor expanded in y around 0
exp-diffN/A
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f64N/A
lower-exp.f6457.4
Applied rewrites57.4%
Taylor expanded in t around 0
Applied rewrites77.9%
if -430 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 2.00000000000000012e84Initial program 98.7%
Taylor expanded in b around 0
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f6480.3
Applied rewrites80.3%
Taylor expanded in t around 0
Applied rewrites80.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- t 1.0) (log a))) (t_2 (* (/ (pow a (- t 1.0)) y) x)))
(if (<= t_1 -2e+31)
t_2
(if (<= t_1 -430.0)
(/ (/ x (* (exp b) a)) y)
(if (<= t_1 2e+84) (* (/ (pow z y) a) (/ x y)) t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - 1.0) * log(a);
double t_2 = (pow(a, (t - 1.0)) / y) * x;
double tmp;
if (t_1 <= -2e+31) {
tmp = t_2;
} else if (t_1 <= -430.0) {
tmp = (x / (exp(b) * a)) / y;
} else if (t_1 <= 2e+84) {
tmp = (pow(z, y) / a) * (x / 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 = (t - 1.0d0) * log(a)
t_2 = ((a ** (t - 1.0d0)) / y) * x
if (t_1 <= (-2d+31)) then
tmp = t_2
else if (t_1 <= (-430.0d0)) then
tmp = (x / (exp(b) * a)) / y
else if (t_1 <= 2d+84) then
tmp = ((z ** y) / a) * (x / 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 = (t - 1.0) * Math.log(a);
double t_2 = (Math.pow(a, (t - 1.0)) / y) * x;
double tmp;
if (t_1 <= -2e+31) {
tmp = t_2;
} else if (t_1 <= -430.0) {
tmp = (x / (Math.exp(b) * a)) / y;
} else if (t_1 <= 2e+84) {
tmp = (Math.pow(z, y) / a) * (x / y);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - 1.0) * math.log(a) t_2 = (math.pow(a, (t - 1.0)) / y) * x tmp = 0 if t_1 <= -2e+31: tmp = t_2 elif t_1 <= -430.0: tmp = (x / (math.exp(b) * a)) / y elif t_1 <= 2e+84: tmp = (math.pow(z, y) / a) * (x / y) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - 1.0) * log(a)) t_2 = Float64(Float64((a ^ Float64(t - 1.0)) / y) * x) tmp = 0.0 if (t_1 <= -2e+31) tmp = t_2; elseif (t_1 <= -430.0) tmp = Float64(Float64(x / Float64(exp(b) * a)) / y); elseif (t_1 <= 2e+84) tmp = Float64(Float64((z ^ y) / a) * Float64(x / y)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - 1.0) * log(a); t_2 = ((a ^ (t - 1.0)) / y) * x; tmp = 0.0; if (t_1 <= -2e+31) tmp = t_2; elseif (t_1 <= -430.0) tmp = (x / (exp(b) * a)) / y; elseif (t_1 <= 2e+84) tmp = ((z ^ y) / a) * (x / y); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+31], t$95$2, If[LessEqual[t$95$1, -430.0], N[(N[(x / N[(N[Exp[b], $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t$95$1, 2e+84], N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t - 1\right) \cdot \log a\\
t_2 := \frac{{a}^{\left(t - 1\right)}}{y} \cdot x\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+31}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq -430:\\
\;\;\;\;\frac{\frac{x}{e^{b} \cdot a}}{y}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+84}:\\
\;\;\;\;\frac{{z}^{y}}{a} \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -1.9999999999999999e31 or 2.00000000000000012e84 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) Initial program 100.0%
Taylor expanded in b around 0
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f6474.4
Applied rewrites74.4%
Taylor expanded in y around 0
Applied rewrites86.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6486.4
Applied rewrites86.4%
if -1.9999999999999999e31 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -430Initial program 96.2%
Taylor expanded in y around 0
exp-diffN/A
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f64N/A
lower-exp.f6457.4
Applied rewrites57.4%
Taylor expanded in t around 0
Applied rewrites77.9%
if -430 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 2.00000000000000012e84Initial program 98.7%
Taylor expanded in b around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-/.f6478.5
Applied rewrites78.5%
Taylor expanded in t around 0
Applied rewrites79.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- t 1.0) (log a))) (t_2 (* (/ (pow a (- t 1.0)) y) x)))
(if (<= t_1 -2e+31)
t_2
(if (<= t_1 -200.0)
(/ (/ x (* (exp b) a)) y)
(if (<= t_1 1000.0) (/ (* 1.0 (* (pow z y) x)) (* a y)) t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - 1.0) * log(a);
double t_2 = (pow(a, (t - 1.0)) / y) * x;
double tmp;
if (t_1 <= -2e+31) {
tmp = t_2;
} else if (t_1 <= -200.0) {
tmp = (x / (exp(b) * a)) / y;
} else if (t_1 <= 1000.0) {
tmp = (1.0 * (pow(z, y) * x)) / (a * 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 = (t - 1.0d0) * log(a)
t_2 = ((a ** (t - 1.0d0)) / y) * x
if (t_1 <= (-2d+31)) then
tmp = t_2
else if (t_1 <= (-200.0d0)) then
tmp = (x / (exp(b) * a)) / y
else if (t_1 <= 1000.0d0) then
tmp = (1.0d0 * ((z ** y) * x)) / (a * 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 = (t - 1.0) * Math.log(a);
double t_2 = (Math.pow(a, (t - 1.0)) / y) * x;
double tmp;
if (t_1 <= -2e+31) {
tmp = t_2;
} else if (t_1 <= -200.0) {
tmp = (x / (Math.exp(b) * a)) / y;
} else if (t_1 <= 1000.0) {
tmp = (1.0 * (Math.pow(z, y) * x)) / (a * y);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - 1.0) * math.log(a) t_2 = (math.pow(a, (t - 1.0)) / y) * x tmp = 0 if t_1 <= -2e+31: tmp = t_2 elif t_1 <= -200.0: tmp = (x / (math.exp(b) * a)) / y elif t_1 <= 1000.0: tmp = (1.0 * (math.pow(z, y) * x)) / (a * y) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - 1.0) * log(a)) t_2 = Float64(Float64((a ^ Float64(t - 1.0)) / y) * x) tmp = 0.0 if (t_1 <= -2e+31) tmp = t_2; elseif (t_1 <= -200.0) tmp = Float64(Float64(x / Float64(exp(b) * a)) / y); elseif (t_1 <= 1000.0) tmp = Float64(Float64(1.0 * Float64((z ^ y) * x)) / Float64(a * y)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - 1.0) * log(a); t_2 = ((a ^ (t - 1.0)) / y) * x; tmp = 0.0; if (t_1 <= -2e+31) tmp = t_2; elseif (t_1 <= -200.0) tmp = (x / (exp(b) * a)) / y; elseif (t_1 <= 1000.0) tmp = (1.0 * ((z ^ y) * x)) / (a * y); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+31], t$95$2, If[LessEqual[t$95$1, -200.0], N[(N[(x / N[(N[Exp[b], $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t$95$1, 1000.0], N[(N[(1.0 * N[(N[Power[z, y], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] / N[(a * y), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t - 1\right) \cdot \log a\\
t_2 := \frac{{a}^{\left(t - 1\right)}}{y} \cdot x\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+31}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq -200:\\
\;\;\;\;\frac{\frac{x}{e^{b} \cdot a}}{y}\\
\mathbf{elif}\;t\_1 \leq 1000:\\
\;\;\;\;\frac{1 \cdot \left({z}^{y} \cdot x\right)}{a \cdot y}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -1.9999999999999999e31 or 1e3 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) Initial program 100.0%
Taylor expanded in b around 0
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f6472.1
Applied rewrites72.1%
Taylor expanded in y around 0
Applied rewrites82.7%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6482.7
Applied rewrites82.7%
if -1.9999999999999999e31 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -200Initial program 96.7%
Taylor expanded in y around 0
exp-diffN/A
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f64N/A
lower-exp.f6461.5
Applied rewrites61.5%
Taylor expanded in t around 0
Applied rewrites76.8%
if -200 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 1e3Initial program 98.7%
Taylor expanded in b around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-/.f6483.3
Applied rewrites83.3%
Applied rewrites81.3%
Taylor expanded in t around 0
Applied rewrites81.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- t 1.0) (log a))) (t_2 (* (/ (pow a (- t 1.0)) y) x)))
(if (<= t_1 -4e+41)
t_2
(if (<= t_1 -430.0)
(* (/ (exp (- b)) y) x)
(if (<= t_1 1000.0) (/ (* 1.0 (* (pow z y) x)) (* a y)) t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - 1.0) * log(a);
double t_2 = (pow(a, (t - 1.0)) / y) * x;
double tmp;
if (t_1 <= -4e+41) {
tmp = t_2;
} else if (t_1 <= -430.0) {
tmp = (exp(-b) / y) * x;
} else if (t_1 <= 1000.0) {
tmp = (1.0 * (pow(z, y) * x)) / (a * 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 = (t - 1.0d0) * log(a)
t_2 = ((a ** (t - 1.0d0)) / y) * x
if (t_1 <= (-4d+41)) then
tmp = t_2
else if (t_1 <= (-430.0d0)) then
tmp = (exp(-b) / y) * x
else if (t_1 <= 1000.0d0) then
tmp = (1.0d0 * ((z ** y) * x)) / (a * 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 = (t - 1.0) * Math.log(a);
double t_2 = (Math.pow(a, (t - 1.0)) / y) * x;
double tmp;
if (t_1 <= -4e+41) {
tmp = t_2;
} else if (t_1 <= -430.0) {
tmp = (Math.exp(-b) / y) * x;
} else if (t_1 <= 1000.0) {
tmp = (1.0 * (Math.pow(z, y) * x)) / (a * y);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - 1.0) * math.log(a) t_2 = (math.pow(a, (t - 1.0)) / y) * x tmp = 0 if t_1 <= -4e+41: tmp = t_2 elif t_1 <= -430.0: tmp = (math.exp(-b) / y) * x elif t_1 <= 1000.0: tmp = (1.0 * (math.pow(z, y) * x)) / (a * y) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - 1.0) * log(a)) t_2 = Float64(Float64((a ^ Float64(t - 1.0)) / y) * x) tmp = 0.0 if (t_1 <= -4e+41) tmp = t_2; elseif (t_1 <= -430.0) tmp = Float64(Float64(exp(Float64(-b)) / y) * x); elseif (t_1 <= 1000.0) tmp = Float64(Float64(1.0 * Float64((z ^ y) * x)) / Float64(a * y)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - 1.0) * log(a); t_2 = ((a ^ (t - 1.0)) / y) * x; tmp = 0.0; if (t_1 <= -4e+41) tmp = t_2; elseif (t_1 <= -430.0) tmp = (exp(-b) / y) * x; elseif (t_1 <= 1000.0) tmp = (1.0 * ((z ^ y) * x)) / (a * y); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+41], t$95$2, If[LessEqual[t$95$1, -430.0], N[(N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[t$95$1, 1000.0], N[(N[(1.0 * N[(N[Power[z, y], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] / N[(a * y), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t - 1\right) \cdot \log a\\
t_2 := \frac{{a}^{\left(t - 1\right)}}{y} \cdot x\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+41}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq -430:\\
\;\;\;\;\frac{e^{-b}}{y} \cdot x\\
\mathbf{elif}\;t\_1 \leq 1000:\\
\;\;\;\;\frac{1 \cdot \left({z}^{y} \cdot x\right)}{a \cdot y}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -4.00000000000000002e41 or 1e3 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) Initial program 100.0%
Taylor expanded in b around 0
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f6471.8
Applied rewrites71.8%
Taylor expanded in y around 0
Applied rewrites82.6%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6482.6
Applied rewrites82.6%
if -4.00000000000000002e41 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -430Initial program 96.3%
Taylor expanded in y around 0
distribute-rgt-out--N/A
metadata-evalN/A
fp-cancel-sign-sub-invN/A
distribute-rgt-outN/A
+-commutativeN/A
*-commutativeN/A
metadata-evalN/A
remove-double-negN/A
distribute-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
distribute-neg-inN/A
metadata-evalN/A
remove-double-negN/A
lower-+.f64N/A
lower-log.f6476.7
Applied rewrites76.7%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f6461.2
Applied rewrites61.2%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6461.2
Applied rewrites61.2%
if -430 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 1e3Initial program 98.5%
Taylor expanded in b around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-/.f6481.7
Applied rewrites81.7%
Applied rewrites79.3%
Taylor expanded in t around 0
Applied rewrites79.1%
(FPCore (x y z t a b) :precision binary64 (if (<= (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y) 2e+55) (/ (/ x (fma (fma (* b a) 0.5 a) b a)) y) (/ (/ (fma (- x) b x) a) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y) <= 2e+55) {
tmp = (x / fma(fma((b * a), 0.5, a), b, a)) / y;
} else {
tmp = (fma(-x, b, x) / a) / y;
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y) <= 2e+55) tmp = Float64(Float64(x / fma(fma(Float64(b * a), 0.5, a), b, a)) / y); else tmp = Float64(Float64(fma(Float64(-x), b, x) / a) / y); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[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], 2e+55], N[(N[(x / N[(N[(N[(b * a), $MachinePrecision] * 0.5 + a), $MachinePrecision] * b + a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(N[((-x) * b + x), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \leq 2 \cdot 10^{+55}:\\
\;\;\;\;\frac{\frac{x}{\mathsf{fma}\left(\mathsf{fma}\left(b \cdot a, 0.5, a\right), b, a\right)}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(-x, b, x\right)}{a}}{y}\\
\end{array}
\end{array}
if (/.f64 (*.f64 x (exp.f64 (-.f64 (+.f64 (*.f64 y (log.f64 z)) (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a))) b))) y) < 2.00000000000000002e55Initial program 98.5%
Taylor expanded in y around 0
exp-diffN/A
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f64N/A
lower-exp.f6463.1
Applied rewrites63.1%
Applied rewrites67.3%
Taylor expanded in t around 0
Applied rewrites62.8%
Taylor expanded in b around 0
Applied rewrites48.1%
if 2.00000000000000002e55 < (/.f64 (*.f64 x (exp.f64 (-.f64 (+.f64 (*.f64 y (log.f64 z)) (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a))) b))) y) Initial program 99.5%
Taylor expanded in y around 0
exp-diffN/A
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f64N/A
lower-exp.f6462.0
Applied rewrites62.0%
Applied rewrites68.8%
Taylor expanded in t around 0
Applied rewrites59.5%
Taylor expanded in b around 0
Applied rewrites32.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.02e+43) (not (<= y 6e+135))) (/ (* x (/ (pow z y) a)) y) (/ (* x (exp (- (* (+ -1.0 t) (log a)) b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.02e+43) || !(y <= 6e+135)) {
tmp = (x * (pow(z, y) / a)) / y;
} else {
tmp = (x * exp((((-1.0 + t) * log(a)) - b))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-1.02d+43)) .or. (.not. (y <= 6d+135))) then
tmp = (x * ((z ** y) / a)) / y
else
tmp = (x * exp(((((-1.0d0) + t) * log(a)) - b))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.02e+43) || !(y <= 6e+135)) {
tmp = (x * (Math.pow(z, y) / a)) / y;
} else {
tmp = (x * Math.exp((((-1.0 + t) * Math.log(a)) - b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.02e+43) or not (y <= 6e+135): tmp = (x * (math.pow(z, y) / a)) / y else: tmp = (x * math.exp((((-1.0 + t) * math.log(a)) - b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.02e+43) || !(y <= 6e+135)) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y); else tmp = Float64(Float64(x * exp(Float64(Float64(Float64(-1.0 + t) * log(a)) - b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.02e+43) || ~((y <= 6e+135))) tmp = (x * ((z ^ y) / a)) / y; else tmp = (x * exp((((-1.0 + t) * log(a)) - b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.02e+43], N[Not[LessEqual[y, 6e+135]], $MachinePrecision]], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[Exp[N[(N[(N[(-1.0 + t), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.02 \cdot 10^{+43} \lor \neg \left(y \leq 6 \cdot 10^{+135}\right):\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\left(-1 + t\right) \cdot \log a - b}}{y}\\
\end{array}
\end{array}
if y < -1.02e43 or 6.0000000000000001e135 < y Initial program 100.0%
Taylor expanded in b around 0
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f6478.3
Applied rewrites78.3%
Taylor expanded in t around 0
Applied rewrites89.3%
if -1.02e43 < y < 6.0000000000000001e135Initial program 98.0%
Taylor expanded in y around 0
distribute-rgt-out--N/A
metadata-evalN/A
fp-cancel-sign-sub-invN/A
distribute-rgt-outN/A
+-commutativeN/A
*-commutativeN/A
metadata-evalN/A
remove-double-negN/A
distribute-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
distribute-neg-inN/A
metadata-evalN/A
remove-double-negN/A
lower-+.f64N/A
lower-log.f6495.0
Applied rewrites95.0%
Final simplification92.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -8.2e+52) (not (<= b 7500000000000.0))) (/ (* x (exp (- (* (log a) t) b))) y) (/ (* x (* (pow a (- t 1.0)) (pow z y))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -8.2e+52) || !(b <= 7500000000000.0)) {
tmp = (x * exp(((log(a) * t) - b))) / y;
} else {
tmp = (x * (pow(a, (t - 1.0)) * pow(z, y))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-8.2d+52)) .or. (.not. (b <= 7500000000000.0d0))) then
tmp = (x * exp(((log(a) * t) - b))) / y
else
tmp = (x * ((a ** (t - 1.0d0)) * (z ** y))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -8.2e+52) || !(b <= 7500000000000.0)) {
tmp = (x * Math.exp(((Math.log(a) * t) - b))) / y;
} else {
tmp = (x * (Math.pow(a, (t - 1.0)) * Math.pow(z, y))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -8.2e+52) or not (b <= 7500000000000.0): tmp = (x * math.exp(((math.log(a) * t) - b))) / y else: tmp = (x * (math.pow(a, (t - 1.0)) * math.pow(z, y))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -8.2e+52) || !(b <= 7500000000000.0)) tmp = Float64(Float64(x * exp(Float64(Float64(log(a) * t) - b))) / y); else tmp = Float64(Float64(x * Float64((a ^ Float64(t - 1.0)) * (z ^ y))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -8.2e+52) || ~((b <= 7500000000000.0))) tmp = (x * exp(((log(a) * t) - b))) / y; else tmp = (x * ((a ^ (t - 1.0)) * (z ^ y))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -8.2e+52], N[Not[LessEqual[b, 7500000000000.0]], $MachinePrecision]], N[(N[(x * N[Exp[N[(N[(N[Log[a], $MachinePrecision] * t), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] * N[Power[z, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -8.2 \cdot 10^{+52} \lor \neg \left(b \leq 7500000000000\right):\\
\;\;\;\;\frac{x \cdot e^{\log a \cdot t - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \left({a}^{\left(t - 1\right)} \cdot {z}^{y}\right)}{y}\\
\end{array}
\end{array}
if b < -8.1999999999999999e52 or 7.5e12 < b Initial program 100.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6491.3
Applied rewrites91.3%
if -8.1999999999999999e52 < b < 7.5e12Initial program 97.6%
Taylor expanded in b around 0
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f6486.6
Applied rewrites86.6%
Final simplification88.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -2.35e+52) (not (<= b 800000000000.0))) (/ (* x (exp (- (* (log a) t) b))) y) (* (* (pow a (- t 1.0)) (pow z y)) (/ x y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -2.35e+52) || !(b <= 800000000000.0)) {
tmp = (x * exp(((log(a) * t) - b))) / y;
} else {
tmp = (pow(a, (t - 1.0)) * pow(z, y)) * (x / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-2.35d+52)) .or. (.not. (b <= 800000000000.0d0))) then
tmp = (x * exp(((log(a) * t) - b))) / y
else
tmp = ((a ** (t - 1.0d0)) * (z ** y)) * (x / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -2.35e+52) || !(b <= 800000000000.0)) {
tmp = (x * Math.exp(((Math.log(a) * t) - b))) / y;
} else {
tmp = (Math.pow(a, (t - 1.0)) * Math.pow(z, y)) * (x / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -2.35e+52) or not (b <= 800000000000.0): tmp = (x * math.exp(((math.log(a) * t) - b))) / y else: tmp = (math.pow(a, (t - 1.0)) * math.pow(z, y)) * (x / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -2.35e+52) || !(b <= 800000000000.0)) tmp = Float64(Float64(x * exp(Float64(Float64(log(a) * t) - b))) / y); else tmp = Float64(Float64((a ^ Float64(t - 1.0)) * (z ^ y)) * Float64(x / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -2.35e+52) || ~((b <= 800000000000.0))) tmp = (x * exp(((log(a) * t) - b))) / y; else tmp = ((a ^ (t - 1.0)) * (z ^ y)) * (x / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -2.35e+52], N[Not[LessEqual[b, 800000000000.0]], $MachinePrecision]], N[(N[(x * N[Exp[N[(N[(N[Log[a], $MachinePrecision] * t), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] * N[Power[z, y], $MachinePrecision]), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.35 \cdot 10^{+52} \lor \neg \left(b \leq 800000000000\right):\\
\;\;\;\;\frac{x \cdot e^{\log a \cdot t - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\left({a}^{\left(t - 1\right)} \cdot {z}^{y}\right) \cdot \frac{x}{y}\\
\end{array}
\end{array}
if b < -2.35e52 or 8e11 < b Initial program 100.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6491.3
Applied rewrites91.3%
if -2.35e52 < b < 8e11Initial program 97.6%
Taylor expanded in b around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-/.f6482.1
Applied rewrites82.1%
Final simplification86.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -1.3e+37) (not (<= b 1.55e+38))) (* (/ (exp (- b)) y) x) (/ (* x (pow a (- t 1.0))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.3e+37) || !(b <= 1.55e+38)) {
tmp = (exp(-b) / y) * x;
} else {
tmp = (x * pow(a, (t - 1.0))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-1.3d+37)) .or. (.not. (b <= 1.55d+38))) then
tmp = (exp(-b) / y) * x
else
tmp = (x * (a ** (t - 1.0d0))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.3e+37) || !(b <= 1.55e+38)) {
tmp = (Math.exp(-b) / y) * x;
} else {
tmp = (x * Math.pow(a, (t - 1.0))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -1.3e+37) or not (b <= 1.55e+38): tmp = (math.exp(-b) / y) * x else: tmp = (x * math.pow(a, (t - 1.0))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -1.3e+37) || !(b <= 1.55e+38)) tmp = Float64(Float64(exp(Float64(-b)) / y) * x); else tmp = Float64(Float64(x * (a ^ Float64(t - 1.0))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -1.3e+37) || ~((b <= 1.55e+38))) tmp = (exp(-b) / y) * x; else tmp = (x * (a ^ (t - 1.0))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -1.3e+37], N[Not[LessEqual[b, 1.55e+38]], $MachinePrecision]], N[(N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision], N[(N[(x * N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.3 \cdot 10^{+37} \lor \neg \left(b \leq 1.55 \cdot 10^{+38}\right):\\
\;\;\;\;\frac{e^{-b}}{y} \cdot x\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot {a}^{\left(t - 1\right)}}{y}\\
\end{array}
\end{array}
if b < -1.3e37 or 1.55000000000000009e38 < b Initial program 100.0%
Taylor expanded in y around 0
distribute-rgt-out--N/A
metadata-evalN/A
fp-cancel-sign-sub-invN/A
distribute-rgt-outN/A
+-commutativeN/A
*-commutativeN/A
metadata-evalN/A
remove-double-negN/A
distribute-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
distribute-neg-inN/A
metadata-evalN/A
remove-double-negN/A
lower-+.f64N/A
lower-log.f6488.8
Applied rewrites88.8%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f6478.4
Applied rewrites78.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6478.4
Applied rewrites78.4%
if -1.3e37 < b < 1.55000000000000009e38Initial program 97.6%
Taylor expanded in b around 0
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f6487.5
Applied rewrites87.5%
Taylor expanded in y around 0
Applied rewrites73.2%
Final simplification75.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -1.1e+37) (not (<= b 1.55e+38))) (* (/ (exp (- b)) y) x) (* (/ (pow a (- t 1.0)) y) x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.1e+37) || !(b <= 1.55e+38)) {
tmp = (exp(-b) / y) * x;
} else {
tmp = (pow(a, (t - 1.0)) / y) * x;
}
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.1d+37)) .or. (.not. (b <= 1.55d+38))) then
tmp = (exp(-b) / y) * x
else
tmp = ((a ** (t - 1.0d0)) / y) * x
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.1e+37) || !(b <= 1.55e+38)) {
tmp = (Math.exp(-b) / y) * x;
} else {
tmp = (Math.pow(a, (t - 1.0)) / y) * x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -1.1e+37) or not (b <= 1.55e+38): tmp = (math.exp(-b) / y) * x else: tmp = (math.pow(a, (t - 1.0)) / y) * x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -1.1e+37) || !(b <= 1.55e+38)) tmp = Float64(Float64(exp(Float64(-b)) / y) * x); else tmp = Float64(Float64((a ^ Float64(t - 1.0)) / y) * x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -1.1e+37) || ~((b <= 1.55e+38))) tmp = (exp(-b) / y) * x; else tmp = ((a ^ (t - 1.0)) / y) * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -1.1e+37], N[Not[LessEqual[b, 1.55e+38]], $MachinePrecision]], N[(N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision], N[(N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.1 \cdot 10^{+37} \lor \neg \left(b \leq 1.55 \cdot 10^{+38}\right):\\
\;\;\;\;\frac{e^{-b}}{y} \cdot x\\
\mathbf{else}:\\
\;\;\;\;\frac{{a}^{\left(t - 1\right)}}{y} \cdot x\\
\end{array}
\end{array}
if b < -1.1e37 or 1.55000000000000009e38 < b Initial program 100.0%
Taylor expanded in y around 0
distribute-rgt-out--N/A
metadata-evalN/A
fp-cancel-sign-sub-invN/A
distribute-rgt-outN/A
+-commutativeN/A
*-commutativeN/A
metadata-evalN/A
remove-double-negN/A
distribute-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
distribute-neg-inN/A
metadata-evalN/A
remove-double-negN/A
lower-+.f64N/A
lower-log.f6488.8
Applied rewrites88.8%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f6478.4
Applied rewrites78.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6478.4
Applied rewrites78.4%
if -1.1e37 < b < 1.55000000000000009e38Initial program 97.6%
Taylor expanded in b around 0
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f6487.5
Applied rewrites87.5%
Taylor expanded in y around 0
Applied rewrites73.2%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6470.4
Applied rewrites70.4%
Final simplification74.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -1.05e+17) (not (<= b 1.55e+38))) (* (/ (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 <= -1.05e+17) || !(b <= 1.55e+38)) {
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 <= (-1.05d+17)) .or. (.not. (b <= 1.55d+38))) 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 <= -1.05e+17) || !(b <= 1.55e+38)) {
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 <= -1.05e+17) or not (b <= 1.55e+38): 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 <= -1.05e+17) || !(b <= 1.55e+38)) tmp = Float64(Float64(exp(Float64(-b)) / y) * x); else tmp = Float64((a ^ Float64(t - 1.0)) * Float64(x / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -1.05e+17) || ~((b <= 1.55e+38))) 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, -1.05e+17], N[Not[LessEqual[b, 1.55e+38]], $MachinePrecision]], N[(N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision], N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.05 \cdot 10^{+17} \lor \neg \left(b \leq 1.55 \cdot 10^{+38}\right):\\
\;\;\;\;\frac{e^{-b}}{y} \cdot x\\
\mathbf{else}:\\
\;\;\;\;{a}^{\left(t - 1\right)} \cdot \frac{x}{y}\\
\end{array}
\end{array}
if b < -1.05e17 or 1.55000000000000009e38 < b Initial program 100.0%
Taylor expanded in y around 0
distribute-rgt-out--N/A
metadata-evalN/A
fp-cancel-sign-sub-invN/A
distribute-rgt-outN/A
+-commutativeN/A
*-commutativeN/A
metadata-evalN/A
remove-double-negN/A
distribute-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
distribute-neg-inN/A
metadata-evalN/A
remove-double-negN/A
lower-+.f64N/A
lower-log.f6488.6
Applied rewrites88.6%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f6478.6
Applied rewrites78.6%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6478.6
Applied rewrites78.6%
if -1.05e17 < b < 1.55000000000000009e38Initial program 97.5%
Taylor expanded in b around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-/.f6482.2
Applied rewrites82.2%
Taylor expanded in y around 0
Applied rewrites69.5%
Final simplification74.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -4.5e-5) (not (<= b 2e+29))) (* (/ (exp (- b)) y) x) (/ (/ x (fma (fma (* b a) 0.5 a) b a)) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -4.5e-5) || !(b <= 2e+29)) {
tmp = (exp(-b) / y) * x;
} else {
tmp = (x / fma(fma((b * a), 0.5, a), b, a)) / y;
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -4.5e-5) || !(b <= 2e+29)) tmp = Float64(Float64(exp(Float64(-b)) / y) * x); else tmp = Float64(Float64(x / fma(fma(Float64(b * a), 0.5, a), b, a)) / y); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -4.5e-5], N[Not[LessEqual[b, 2e+29]], $MachinePrecision]], N[(N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision], N[(N[(x / N[(N[(N[(b * a), $MachinePrecision] * 0.5 + a), $MachinePrecision] * b + a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.5 \cdot 10^{-5} \lor \neg \left(b \leq 2 \cdot 10^{+29}\right):\\
\;\;\;\;\frac{e^{-b}}{y} \cdot x\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{\mathsf{fma}\left(\mathsf{fma}\left(b \cdot a, 0.5, a\right), b, a\right)}}{y}\\
\end{array}
\end{array}
if b < -4.50000000000000028e-5 or 1.99999999999999983e29 < b Initial program 100.0%
Taylor expanded in y around 0
distribute-rgt-out--N/A
metadata-evalN/A
fp-cancel-sign-sub-invN/A
distribute-rgt-outN/A
+-commutativeN/A
*-commutativeN/A
metadata-evalN/A
remove-double-negN/A
distribute-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
distribute-neg-inN/A
metadata-evalN/A
remove-double-negN/A
lower-+.f64N/A
lower-log.f6488.0
Applied rewrites88.0%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f6476.7
Applied rewrites76.7%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6476.7
Applied rewrites76.7%
if -4.50000000000000028e-5 < b < 1.99999999999999983e29Initial program 97.3%
Taylor expanded in y around 0
exp-diffN/A
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f64N/A
lower-exp.f6472.4
Applied rewrites72.4%
Applied rewrites72.6%
Taylor expanded in t around 0
Applied rewrites47.1%
Taylor expanded in b around 0
Applied rewrites47.1%
Final simplification63.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (exp (- b))))
(if (<= b -4.5e-5)
(* (/ t_1 y) x)
(if (<= b 2e+29)
(/ (/ x (fma (fma (* b a) 0.5 a) b a)) y)
(/ (* x t_1) y)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = exp(-b);
double tmp;
if (b <= -4.5e-5) {
tmp = (t_1 / y) * x;
} else if (b <= 2e+29) {
tmp = (x / fma(fma((b * a), 0.5, a), b, a)) / y;
} else {
tmp = (x * t_1) / y;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = exp(Float64(-b)) tmp = 0.0 if (b <= -4.5e-5) tmp = Float64(Float64(t_1 / y) * x); elseif (b <= 2e+29) tmp = Float64(Float64(x / fma(fma(Float64(b * a), 0.5, a), b, a)) / y); else tmp = Float64(Float64(x * t_1) / y); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[Exp[(-b)], $MachinePrecision]}, If[LessEqual[b, -4.5e-5], N[(N[(t$95$1 / y), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[b, 2e+29], N[(N[(x / N[(N[(N[(b * a), $MachinePrecision] * 0.5 + a), $MachinePrecision] * b + a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * t$95$1), $MachinePrecision] / y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := e^{-b}\\
\mathbf{if}\;b \leq -4.5 \cdot 10^{-5}:\\
\;\;\;\;\frac{t\_1}{y} \cdot x\\
\mathbf{elif}\;b \leq 2 \cdot 10^{+29}:\\
\;\;\;\;\frac{\frac{x}{\mathsf{fma}\left(\mathsf{fma}\left(b \cdot a, 0.5, a\right), b, a\right)}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot t\_1}{y}\\
\end{array}
\end{array}
if b < -4.50000000000000028e-5Initial program 100.0%
Taylor expanded in y around 0
distribute-rgt-out--N/A
metadata-evalN/A
fp-cancel-sign-sub-invN/A
distribute-rgt-outN/A
+-commutativeN/A
*-commutativeN/A
metadata-evalN/A
remove-double-negN/A
distribute-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
distribute-neg-inN/A
metadata-evalN/A
remove-double-negN/A
lower-+.f64N/A
lower-log.f6485.6
Applied rewrites85.6%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f6474.2
Applied rewrites74.2%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6474.2
Applied rewrites74.2%
if -4.50000000000000028e-5 < b < 1.99999999999999983e29Initial program 97.3%
Taylor expanded in y around 0
exp-diffN/A
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f64N/A
lower-exp.f6472.4
Applied rewrites72.4%
Applied rewrites72.6%
Taylor expanded in t around 0
Applied rewrites47.1%
Taylor expanded in b around 0
Applied rewrites47.1%
if 1.99999999999999983e29 < b Initial program 100.0%
Taylor expanded in y around 0
distribute-rgt-out--N/A
metadata-evalN/A
fp-cancel-sign-sub-invN/A
distribute-rgt-outN/A
+-commutativeN/A
*-commutativeN/A
metadata-evalN/A
remove-double-negN/A
distribute-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
distribute-neg-inN/A
metadata-evalN/A
remove-double-negN/A
lower-+.f64N/A
lower-log.f6489.9
Applied rewrites89.9%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f6478.5
Applied rewrites78.5%
(FPCore (x y z t a b) :precision binary64 (if (<= b -3.2e+31) (/ (/ (fma (- x) b x) a) y) (if (<= b 3.2e-144) (* (pow a -1.0) (/ x y)) (/ (/ x (fma b a a)) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -3.2e+31) {
tmp = (fma(-x, b, x) / a) / y;
} else if (b <= 3.2e-144) {
tmp = pow(a, -1.0) * (x / y);
} else {
tmp = (x / fma(b, a, a)) / y;
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -3.2e+31) tmp = Float64(Float64(fma(Float64(-x), b, x) / a) / y); elseif (b <= 3.2e-144) tmp = Float64((a ^ -1.0) * Float64(x / y)); else tmp = Float64(Float64(x / fma(b, a, a)) / y); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -3.2e+31], N[(N[(N[((-x) * b + x), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 3.2e-144], N[(N[Power[a, -1.0], $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(b * a + a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.2 \cdot 10^{+31}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(-x, b, x\right)}{a}}{y}\\
\mathbf{elif}\;b \leq 3.2 \cdot 10^{-144}:\\
\;\;\;\;{a}^{-1} \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{\mathsf{fma}\left(b, a, a\right)}}{y}\\
\end{array}
\end{array}
if b < -3.2000000000000001e31Initial program 100.0%
Taylor expanded in y around 0
exp-diffN/A
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f64N/A
lower-exp.f6450.1
Applied rewrites50.1%
Applied rewrites64.2%
Taylor expanded in t around 0
Applied rewrites76.4%
Taylor expanded in b around 0
Applied rewrites29.4%
if -3.2000000000000001e31 < b < 3.19999999999999973e-144Initial program 97.5%
Taylor expanded in b around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-/.f6483.6
Applied rewrites83.6%
Taylor expanded in t around 0
Applied rewrites77.7%
Taylor expanded in y around 0
Applied rewrites50.2%
if 3.19999999999999973e-144 < b Initial program 99.4%
Taylor expanded in y around 0
exp-diffN/A
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f64N/A
lower-exp.f6462.1
Applied rewrites62.1%
Applied rewrites66.9%
Taylor expanded in t around 0
Applied rewrites69.9%
Taylor expanded in b around 0
Applied rewrites45.9%
Final simplification44.3%
(FPCore (x y z t a b) :precision binary64 (if (<= b 3.2e-144) (* (pow a -1.0) (/ x y)) (/ (/ x (fma b a a)) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 3.2e-144) {
tmp = pow(a, -1.0) * (x / y);
} else {
tmp = (x / fma(b, a, a)) / y;
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 3.2e-144) tmp = Float64((a ^ -1.0) * Float64(x / y)); else tmp = Float64(Float64(x / fma(b, a, a)) / y); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 3.2e-144], N[(N[Power[a, -1.0], $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(b * a + a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 3.2 \cdot 10^{-144}:\\
\;\;\;\;{a}^{-1} \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{\mathsf{fma}\left(b, a, a\right)}}{y}\\
\end{array}
\end{array}
if b < 3.19999999999999973e-144Initial program 98.3%
Taylor expanded in b around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-/.f6473.2
Applied rewrites73.2%
Taylor expanded in t around 0
Applied rewrites68.8%
Taylor expanded in y around 0
Applied rewrites37.9%
if 3.19999999999999973e-144 < b Initial program 99.4%
Taylor expanded in y around 0
exp-diffN/A
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f64N/A
lower-exp.f6462.1
Applied rewrites62.1%
Applied rewrites66.9%
Taylor expanded in t around 0
Applied rewrites69.9%
Taylor expanded in b around 0
Applied rewrites45.9%
Final simplification41.2%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1.16e-158) (* (pow a -1.0) (/ x y)) (/ (/ x a) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.16e-158) {
tmp = pow(a, -1.0) * (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 (y <= (-1.16d-158)) then
tmp = (a ** (-1.0d0)) * (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 (y <= -1.16e-158) {
tmp = Math.pow(a, -1.0) * (x / y);
} else {
tmp = (x / a) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.16e-158: tmp = math.pow(a, -1.0) * (x / y) else: tmp = (x / a) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.16e-158) tmp = Float64((a ^ -1.0) * 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 (y <= -1.16e-158) tmp = (a ^ -1.0) * (x / y); else tmp = (x / a) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.16e-158], N[(N[Power[a, -1.0], $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.16 \cdot 10^{-158}:\\
\;\;\;\;{a}^{-1} \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\end{array}
\end{array}
if y < -1.15999999999999996e-158Initial program 99.5%
Taylor expanded in b around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-/.f6467.1
Applied rewrites67.1%
Taylor expanded in t around 0
Applied rewrites61.8%
Taylor expanded in y around 0
Applied rewrites31.3%
if -1.15999999999999996e-158 < y Initial program 98.3%
Taylor expanded in y around 0
exp-diffN/A
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f64N/A
lower-exp.f6465.1
Applied rewrites65.1%
Applied rewrites69.8%
Taylor expanded in t around 0
Applied rewrites65.3%
Taylor expanded in b around 0
Applied rewrites37.9%
Final simplification35.3%
(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.8%
Taylor expanded in y around 0
exp-diffN/A
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f64N/A
lower-exp.f6462.9
Applied rewrites62.9%
Applied rewrites67.6%
Taylor expanded in t around 0
Applied rewrites62.0%
Taylor expanded in b around 0
Applied rewrites33.2%
(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 2024320
(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))