
(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 24 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 97.5%
Final simplification97.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* (exp (- (+ (* (log a) (- t 1.0)) (* (log z) y)) b)) x) y)))
(if (<= t_1 (- INFINITY))
(/ (fma (/ (* (- x) b) y) a (* (/ x y) a)) (* a a))
(if (<= t_1 1e+116)
(/ x (* (fma (fma (* (fma 0.16666666666666666 b 0.5) y) b y) b y) a))
(/ (- x (* b x)) (* a y))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (exp((((log(a) * (t - 1.0)) + (log(z) * y)) - b)) * x) / y;
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = fma(((-x * b) / y), a, ((x / y) * a)) / (a * a);
} else if (t_1 <= 1e+116) {
tmp = x / (fma(fma((fma(0.16666666666666666, b, 0.5) * y), b, y), b, y) * a);
} else {
tmp = (x - (b * x)) / (a * y);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(exp(Float64(Float64(Float64(log(a) * Float64(t - 1.0)) + Float64(log(z) * y)) - b)) * x) / y) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(fma(Float64(Float64(Float64(-x) * b) / y), a, Float64(Float64(x / y) * a)) / Float64(a * a)); elseif (t_1 <= 1e+116) tmp = Float64(x / Float64(fma(fma(Float64(fma(0.16666666666666666, b, 0.5) * y), b, y), b, y) * a)); else tmp = Float64(Float64(x - Float64(b * x)) / Float64(a * y)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = 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]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(N[(N[((-x) * b), $MachinePrecision] / y), $MachinePrecision] * a + N[(N[(x / y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] / N[(a * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+116], N[(x / N[(N[(N[(N[(N[(0.16666666666666666 * b + 0.5), $MachinePrecision] * y), $MachinePrecision] * b + y), $MachinePrecision] * b + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(N[(x - N[(b * x), $MachinePrecision]), $MachinePrecision] / N[(a * y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{e^{\left(\log a \cdot \left(t - 1\right) + \log z \cdot y\right) - b} \cdot x}{y}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\frac{\mathsf{fma}\left(\frac{\left(-x\right) \cdot b}{y}, a, \frac{x}{y} \cdot a\right)}{a \cdot a}\\
\mathbf{elif}\;t\_1 \leq 10^{+116}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(0.16666666666666666, b, 0.5\right) \cdot y, b, y\right), b, y\right) \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x - b \cdot x}{a \cdot 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.0Initial program 100.0%
Taylor expanded in t around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
Applied rewrites57.7%
Taylor expanded in y around 0
Applied rewrites54.1%
Taylor expanded in b around 0
Applied rewrites20.9%
Applied rewrites35.8%
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) < 1.00000000000000002e116Initial program 95.6%
Taylor expanded in t around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
Applied rewrites60.6%
Taylor expanded in y around 0
Applied rewrites54.4%
Taylor expanded in b around 0
Applied rewrites55.2%
if 1.00000000000000002e116 < (/.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.3%
Taylor expanded in t around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
Applied rewrites79.4%
Taylor expanded in y around 0
Applied rewrites67.6%
Taylor expanded in b around 0
Applied rewrites32.3%
Applied rewrites47.5%
Final simplification49.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* (exp (- (+ (* (log a) (- t 1.0)) (* (log z) y)) b)) x) y)))
(if (<= t_1 -2e+101)
(/ (* (- 1.0 b) (/ x y)) a)
(if (<= t_1 1e+116)
(/ x (* (fma (fma (* (fma 0.16666666666666666 b 0.5) y) b y) b y) a))
(/ (- x (* b x)) (* a y))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (exp((((log(a) * (t - 1.0)) + (log(z) * y)) - b)) * x) / y;
double tmp;
if (t_1 <= -2e+101) {
tmp = ((1.0 - b) * (x / y)) / a;
} else if (t_1 <= 1e+116) {
tmp = x / (fma(fma((fma(0.16666666666666666, b, 0.5) * y), b, y), b, y) * a);
} else {
tmp = (x - (b * x)) / (a * y);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(exp(Float64(Float64(Float64(log(a) * Float64(t - 1.0)) + Float64(log(z) * y)) - b)) * x) / y) tmp = 0.0 if (t_1 <= -2e+101) tmp = Float64(Float64(Float64(1.0 - b) * Float64(x / y)) / a); elseif (t_1 <= 1e+116) tmp = Float64(x / Float64(fma(fma(Float64(fma(0.16666666666666666, b, 0.5) * y), b, y), b, y) * a)); else tmp = Float64(Float64(x - Float64(b * x)) / Float64(a * y)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = 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]}, If[LessEqual[t$95$1, -2e+101], N[(N[(N[(1.0 - b), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[t$95$1, 1e+116], N[(x / N[(N[(N[(N[(N[(0.16666666666666666 * b + 0.5), $MachinePrecision] * y), $MachinePrecision] * b + y), $MachinePrecision] * b + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(N[(x - N[(b * x), $MachinePrecision]), $MachinePrecision] / N[(a * y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{e^{\left(\log a \cdot \left(t - 1\right) + \log z \cdot y\right) - b} \cdot x}{y}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+101}:\\
\;\;\;\;\frac{\left(1 - b\right) \cdot \frac{x}{y}}{a}\\
\mathbf{elif}\;t\_1 \leq 10^{+116}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(0.16666666666666666, b, 0.5\right) \cdot y, b, y\right), b, y\right) \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x - b \cdot x}{a \cdot 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) < -2e101Initial program 99.3%
Taylor expanded in t around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
Applied rewrites60.8%
Taylor expanded in y around 0
Applied rewrites57.5%
Taylor expanded in b around 0
Applied rewrites26.0%
Applied rewrites38.5%
if -2e101 < (/.f64 (*.f64 x (exp.f64 (-.f64 (+.f64 (*.f64 y (log.f64 z)) (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a))) b))) y) < 1.00000000000000002e116Initial program 95.8%
Taylor expanded in t around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
Applied rewrites59.4%
Taylor expanded in y around 0
Applied rewrites53.0%
Taylor expanded in b around 0
Applied rewrites54.0%
if 1.00000000000000002e116 < (/.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.3%
Taylor expanded in t around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
Applied rewrites79.4%
Taylor expanded in y around 0
Applied rewrites67.6%
Taylor expanded in b around 0
Applied rewrites32.3%
Applied rewrites47.5%
Final simplification49.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* (exp (- (+ (* (log a) (- t 1.0)) (* (log z) y)) b)) x) y))
(t_2 (/ (- x (* b x)) (* a y))))
(if (<= t_1 (- INFINITY))
t_2
(if (<= t_1 1e+116) (/ x (* (fma b y y) a)) t_2))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (exp((((log(a) * (t - 1.0)) + (log(z) * y)) - b)) * x) / y;
double t_2 = (x - (b * x)) / (a * y);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = t_2;
} else if (t_1 <= 1e+116) {
tmp = x / (fma(b, y, y) * a);
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(exp(Float64(Float64(Float64(log(a) * Float64(t - 1.0)) + Float64(log(z) * y)) - b)) * x) / y) t_2 = Float64(Float64(x - Float64(b * x)) / Float64(a * y)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = t_2; elseif (t_1 <= 1e+116) tmp = Float64(x / Float64(fma(b, y, y) * a)); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = 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]}, Block[{t$95$2 = N[(N[(x - N[(b * x), $MachinePrecision]), $MachinePrecision] / N[(a * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], t$95$2, If[LessEqual[t$95$1, 1e+116], N[(x / N[(N[(b * y + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{e^{\left(\log a \cdot \left(t - 1\right) + \log z \cdot y\right) - b} \cdot x}{y}\\
t_2 := \frac{x - b \cdot x}{a \cdot y}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 10^{+116}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(b, y, y\right) \cdot a}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\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 1.00000000000000002e116 < (/.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.6%
Taylor expanded in t around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
Applied rewrites70.6%
Taylor expanded in y around 0
Applied rewrites62.1%
Taylor expanded in b around 0
Applied rewrites27.7%
Applied rewrites42.2%
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) < 1.00000000000000002e116Initial program 95.6%
Taylor expanded in t around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
Applied rewrites60.6%
Taylor expanded in y around 0
Applied rewrites54.4%
Taylor expanded in b around 0
Applied rewrites45.5%
Final simplification43.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* (exp (- (+ (* (log a) (- t 1.0)) (* (log z) y)) b)) x) y)))
(if (<= t_1 -1e-229)
(/ x (* a y))
(if (<= t_1 5e+172) (/ x (* (fma b y y) a)) (* (/ 1.0 (* a y)) x)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (exp((((log(a) * (t - 1.0)) + (log(z) * y)) - b)) * x) / y;
double tmp;
if (t_1 <= -1e-229) {
tmp = x / (a * y);
} else if (t_1 <= 5e+172) {
tmp = x / (fma(b, y, y) * a);
} else {
tmp = (1.0 / (a * y)) * x;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(exp(Float64(Float64(Float64(log(a) * Float64(t - 1.0)) + Float64(log(z) * y)) - b)) * x) / y) tmp = 0.0 if (t_1 <= -1e-229) tmp = Float64(x / Float64(a * y)); elseif (t_1 <= 5e+172) tmp = Float64(x / Float64(fma(b, y, y) * a)); else tmp = Float64(Float64(1.0 / Float64(a * y)) * x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = 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]}, If[LessEqual[t$95$1, -1e-229], N[(x / N[(a * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+172], N[(x / N[(N[(b * y + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[(a * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{e^{\left(\log a \cdot \left(t - 1\right) + \log z \cdot y\right) - b} \cdot x}{y}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-229}:\\
\;\;\;\;\frac{x}{a \cdot y}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+172}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(b, y, y\right) \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{a \cdot y} \cdot x\\
\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) < -1.00000000000000007e-229Initial program 99.0%
Taylor expanded in t around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
Applied rewrites61.5%
Taylor expanded in y around 0
Applied rewrites58.3%
Taylor expanded in b around 0
Applied rewrites30.7%
if -1.00000000000000007e-229 < (/.f64 (*.f64 x (exp.f64 (-.f64 (+.f64 (*.f64 y (log.f64 z)) (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a))) b))) y) < 5.0000000000000001e172Initial program 95.8%
Taylor expanded in t around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
Applied rewrites59.4%
Taylor expanded in y around 0
Applied rewrites53.0%
Taylor expanded in b around 0
Applied rewrites44.2%
if 5.0000000000000001e172 < (/.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.4%
Taylor expanded in t around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
Applied rewrites79.2%
Taylor expanded in y around 0
Applied rewrites67.1%
Taylor expanded in b around 0
Applied rewrites41.4%
Applied rewrites41.3%
Final simplification40.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (log a) (- t 1.0)))
(t_2 (* (exp b) y))
(t_3 (/ (* (exp (- (* (log a) t) b)) x) y)))
(if (<= t_1 -5000000.0)
t_3
(if (<= t_1 -150.0)
(/ x (* t_2 a))
(if (<= t_1 5e+63) (/ (* (/ (pow z y) a) x) t_2) t_3)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = log(a) * (t - 1.0);
double t_2 = exp(b) * y;
double t_3 = (exp(((log(a) * t) - b)) * x) / y;
double tmp;
if (t_1 <= -5000000.0) {
tmp = t_3;
} else if (t_1 <= -150.0) {
tmp = x / (t_2 * a);
} else if (t_1 <= 5e+63) {
tmp = ((pow(z, y) / a) * x) / t_2;
} else {
tmp = t_3;
}
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) :: t_3
real(8) :: tmp
t_1 = log(a) * (t - 1.0d0)
t_2 = exp(b) * y
t_3 = (exp(((log(a) * t) - b)) * x) / y
if (t_1 <= (-5000000.0d0)) then
tmp = t_3
else if (t_1 <= (-150.0d0)) then
tmp = x / (t_2 * a)
else if (t_1 <= 5d+63) then
tmp = (((z ** y) / a) * x) / t_2
else
tmp = t_3
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.log(a) * (t - 1.0);
double t_2 = Math.exp(b) * y;
double t_3 = (Math.exp(((Math.log(a) * t) - b)) * x) / y;
double tmp;
if (t_1 <= -5000000.0) {
tmp = t_3;
} else if (t_1 <= -150.0) {
tmp = x / (t_2 * a);
} else if (t_1 <= 5e+63) {
tmp = ((Math.pow(z, y) / a) * x) / t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = math.log(a) * (t - 1.0) t_2 = math.exp(b) * y t_3 = (math.exp(((math.log(a) * t) - b)) * x) / y tmp = 0 if t_1 <= -5000000.0: tmp = t_3 elif t_1 <= -150.0: tmp = x / (t_2 * a) elif t_1 <= 5e+63: tmp = ((math.pow(z, y) / a) * x) / t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(log(a) * Float64(t - 1.0)) t_2 = Float64(exp(b) * y) t_3 = Float64(Float64(exp(Float64(Float64(log(a) * t) - b)) * x) / y) tmp = 0.0 if (t_1 <= -5000000.0) tmp = t_3; elseif (t_1 <= -150.0) tmp = Float64(x / Float64(t_2 * a)); elseif (t_1 <= 5e+63) tmp = Float64(Float64(Float64((z ^ y) / a) * x) / t_2); else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = log(a) * (t - 1.0); t_2 = exp(b) * y; t_3 = (exp(((log(a) * t) - b)) * x) / y; tmp = 0.0; if (t_1 <= -5000000.0) tmp = t_3; elseif (t_1 <= -150.0) tmp = x / (t_2 * a); elseif (t_1 <= 5e+63) tmp = (((z ^ y) / a) * x) / t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[Log[a], $MachinePrecision] * N[(t - 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Exp[b], $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[Exp[N[(N[(N[Log[a], $MachinePrecision] * t), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t$95$1, -5000000.0], t$95$3, If[LessEqual[t$95$1, -150.0], N[(x / N[(t$95$2 * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+63], N[(N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] * x), $MachinePrecision] / t$95$2), $MachinePrecision], t$95$3]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log a \cdot \left(t - 1\right)\\
t_2 := e^{b} \cdot y\\
t_3 := \frac{e^{\log a \cdot t - b} \cdot x}{y}\\
\mathbf{if}\;t\_1 \leq -5000000:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_1 \leq -150:\\
\;\;\;\;\frac{x}{t\_2 \cdot a}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+63}:\\
\;\;\;\;\frac{\frac{{z}^{y}}{a} \cdot x}{t\_2}\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -5e6 or 5.00000000000000011e63 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) Initial program 100.0%
Taylor expanded in t around inf
lower-*.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log91.6
Applied rewrites91.6%
if -5e6 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -150Initial program 87.7%
Taylor expanded in t around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
Applied rewrites69.5%
Taylor expanded in y around 0
Applied rewrites80.8%
if -150 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 5.00000000000000011e63Initial program 99.0%
Taylor expanded in t around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
Applied rewrites89.3%
Final simplification88.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (log a) (- t 1.0)))
(t_2 (/ (* (exp (- (* (log a) t) b)) x) y)))
(if (<= t_1 -5000000.0)
t_2
(if (<= t_1 48.0)
(/ x (* (* (exp b) y) a))
(if (<= t_1 677.45) (* (/ 1.0 (* a y)) (* (pow z y) x)) t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = log(a) * (t - 1.0);
double t_2 = (exp(((log(a) * t) - b)) * x) / y;
double tmp;
if (t_1 <= -5000000.0) {
tmp = t_2;
} else if (t_1 <= 48.0) {
tmp = x / ((exp(b) * y) * a);
} else if (t_1 <= 677.45) {
tmp = (1.0 / (a * y)) * (pow(z, y) * x);
} 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 = log(a) * (t - 1.0d0)
t_2 = (exp(((log(a) * t) - b)) * x) / y
if (t_1 <= (-5000000.0d0)) then
tmp = t_2
else if (t_1 <= 48.0d0) then
tmp = x / ((exp(b) * y) * a)
else if (t_1 <= 677.45d0) then
tmp = (1.0d0 / (a * y)) * ((z ** y) * x)
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.log(a) * (t - 1.0);
double t_2 = (Math.exp(((Math.log(a) * t) - b)) * x) / y;
double tmp;
if (t_1 <= -5000000.0) {
tmp = t_2;
} else if (t_1 <= 48.0) {
tmp = x / ((Math.exp(b) * y) * a);
} else if (t_1 <= 677.45) {
tmp = (1.0 / (a * y)) * (Math.pow(z, y) * x);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = math.log(a) * (t - 1.0) t_2 = (math.exp(((math.log(a) * t) - b)) * x) / y tmp = 0 if t_1 <= -5000000.0: tmp = t_2 elif t_1 <= 48.0: tmp = x / ((math.exp(b) * y) * a) elif t_1 <= 677.45: tmp = (1.0 / (a * y)) * (math.pow(z, y) * x) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(log(a) * Float64(t - 1.0)) t_2 = Float64(Float64(exp(Float64(Float64(log(a) * t) - b)) * x) / y) tmp = 0.0 if (t_1 <= -5000000.0) tmp = t_2; elseif (t_1 <= 48.0) tmp = Float64(x / Float64(Float64(exp(b) * y) * a)); elseif (t_1 <= 677.45) tmp = Float64(Float64(1.0 / Float64(a * y)) * Float64((z ^ y) * x)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = log(a) * (t - 1.0); t_2 = (exp(((log(a) * t) - b)) * x) / y; tmp = 0.0; if (t_1 <= -5000000.0) tmp = t_2; elseif (t_1 <= 48.0) tmp = x / ((exp(b) * y) * a); elseif (t_1 <= 677.45) tmp = (1.0 / (a * y)) * ((z ^ y) * x); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[Log[a], $MachinePrecision] * N[(t - 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[Exp[N[(N[(N[Log[a], $MachinePrecision] * t), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t$95$1, -5000000.0], t$95$2, If[LessEqual[t$95$1, 48.0], N[(x / N[(N[(N[Exp[b], $MachinePrecision] * y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 677.45], N[(N[(1.0 / N[(a * y), $MachinePrecision]), $MachinePrecision] * N[(N[Power[z, y], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log a \cdot \left(t - 1\right)\\
t_2 := \frac{e^{\log a \cdot t - b} \cdot x}{y}\\
\mathbf{if}\;t\_1 \leq -5000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 48:\\
\;\;\;\;\frac{x}{\left(e^{b} \cdot y\right) \cdot a}\\
\mathbf{elif}\;t\_1 \leq 677.45:\\
\;\;\;\;\frac{1}{a \cdot y} \cdot \left({z}^{y} \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -5e6 or 677.45000000000005 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) Initial program 100.0%
Taylor expanded in t around inf
lower-*.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log90.4
Applied rewrites90.4%
if -5e6 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 48Initial program 90.5%
Taylor expanded in t around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
Applied rewrites77.0%
Taylor expanded in y around 0
Applied rewrites80.8%
if 48 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 677.45000000000005Initial program 98.8%
Taylor expanded in b around 0
exp-sumN/A
associate-*r*N/A
associate-/l*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-/.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f6487.5
Applied rewrites87.5%
Taylor expanded in t around 0
Applied rewrites87.5%
Final simplification87.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (log a) (- t 1.0))) (t_2 (* (/ (pow a (- t 1.0)) y) x)))
(if (<= t_1 -5000000.0)
t_2
(if (<= t_1 48.0)
(/ x (* (* (exp b) y) a))
(if (<= t_1 5e+63) (* (/ 1.0 (* a y)) (* (pow z y) x)) t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = log(a) * (t - 1.0);
double t_2 = (pow(a, (t - 1.0)) / y) * x;
double tmp;
if (t_1 <= -5000000.0) {
tmp = t_2;
} else if (t_1 <= 48.0) {
tmp = x / ((exp(b) * y) * a);
} else if (t_1 <= 5e+63) {
tmp = (1.0 / (a * y)) * (pow(z, y) * x);
} 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 = log(a) * (t - 1.0d0)
t_2 = ((a ** (t - 1.0d0)) / y) * x
if (t_1 <= (-5000000.0d0)) then
tmp = t_2
else if (t_1 <= 48.0d0) then
tmp = x / ((exp(b) * y) * a)
else if (t_1 <= 5d+63) then
tmp = (1.0d0 / (a * y)) * ((z ** y) * x)
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.log(a) * (t - 1.0);
double t_2 = (Math.pow(a, (t - 1.0)) / y) * x;
double tmp;
if (t_1 <= -5000000.0) {
tmp = t_2;
} else if (t_1 <= 48.0) {
tmp = x / ((Math.exp(b) * y) * a);
} else if (t_1 <= 5e+63) {
tmp = (1.0 / (a * y)) * (Math.pow(z, y) * x);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = math.log(a) * (t - 1.0) t_2 = (math.pow(a, (t - 1.0)) / y) * x tmp = 0 if t_1 <= -5000000.0: tmp = t_2 elif t_1 <= 48.0: tmp = x / ((math.exp(b) * y) * a) elif t_1 <= 5e+63: tmp = (1.0 / (a * y)) * (math.pow(z, y) * x) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(log(a) * Float64(t - 1.0)) t_2 = Float64(Float64((a ^ Float64(t - 1.0)) / y) * x) tmp = 0.0 if (t_1 <= -5000000.0) tmp = t_2; elseif (t_1 <= 48.0) tmp = Float64(x / Float64(Float64(exp(b) * y) * a)); elseif (t_1 <= 5e+63) tmp = Float64(Float64(1.0 / Float64(a * y)) * Float64((z ^ y) * x)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = log(a) * (t - 1.0); t_2 = ((a ^ (t - 1.0)) / y) * x; tmp = 0.0; if (t_1 <= -5000000.0) tmp = t_2; elseif (t_1 <= 48.0) tmp = x / ((exp(b) * y) * a); elseif (t_1 <= 5e+63) tmp = (1.0 / (a * y)) * ((z ^ y) * x); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[Log[a], $MachinePrecision] * N[(t - 1.0), $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, -5000000.0], t$95$2, If[LessEqual[t$95$1, 48.0], N[(x / N[(N[(N[Exp[b], $MachinePrecision] * y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+63], N[(N[(1.0 / N[(a * y), $MachinePrecision]), $MachinePrecision] * N[(N[Power[z, y], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log a \cdot \left(t - 1\right)\\
t_2 := \frac{{a}^{\left(t - 1\right)}}{y} \cdot x\\
\mathbf{if}\;t\_1 \leq -5000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 48:\\
\;\;\;\;\frac{x}{\left(e^{b} \cdot y\right) \cdot a}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+63}:\\
\;\;\;\;\frac{1}{a \cdot y} \cdot \left({z}^{y} \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -5e6 or 5.00000000000000011e63 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) Initial program 100.0%
Taylor expanded in b around 0
exp-sumN/A
associate-*r*N/A
associate-/l*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-/.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f6475.3
Applied rewrites75.3%
Taylor expanded in y around 0
Applied rewrites87.4%
if -5e6 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 48Initial program 90.5%
Taylor expanded in t around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
Applied rewrites77.0%
Taylor expanded in y around 0
Applied rewrites80.8%
if 48 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 5.00000000000000011e63Initial program 99.0%
Taylor expanded in b around 0
exp-sumN/A
associate-*r*N/A
associate-/l*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-/.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f6480.0
Applied rewrites80.0%
Taylor expanded in t around 0
Applied rewrites81.4%
Final simplification84.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (log a) (- t 1.0))) (t_2 (* (/ (pow a (- t 1.0)) y) x)))
(if (<= t_1 -5000000.0)
t_2
(if (<= t_1 50.0)
(/ x (* (* (exp b) y) a))
(if (<= t_1 1e+46) (* (/ x (* a y)) (pow z y)) t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = log(a) * (t - 1.0);
double t_2 = (pow(a, (t - 1.0)) / y) * x;
double tmp;
if (t_1 <= -5000000.0) {
tmp = t_2;
} else if (t_1 <= 50.0) {
tmp = x / ((exp(b) * y) * a);
} else if (t_1 <= 1e+46) {
tmp = (x / (a * y)) * pow(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 = log(a) * (t - 1.0d0)
t_2 = ((a ** (t - 1.0d0)) / y) * x
if (t_1 <= (-5000000.0d0)) then
tmp = t_2
else if (t_1 <= 50.0d0) then
tmp = x / ((exp(b) * y) * a)
else if (t_1 <= 1d+46) then
tmp = (x / (a * y)) * (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.log(a) * (t - 1.0);
double t_2 = (Math.pow(a, (t - 1.0)) / y) * x;
double tmp;
if (t_1 <= -5000000.0) {
tmp = t_2;
} else if (t_1 <= 50.0) {
tmp = x / ((Math.exp(b) * y) * a);
} else if (t_1 <= 1e+46) {
tmp = (x / (a * y)) * Math.pow(z, y);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = math.log(a) * (t - 1.0) t_2 = (math.pow(a, (t - 1.0)) / y) * x tmp = 0 if t_1 <= -5000000.0: tmp = t_2 elif t_1 <= 50.0: tmp = x / ((math.exp(b) * y) * a) elif t_1 <= 1e+46: tmp = (x / (a * y)) * math.pow(z, y) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(log(a) * Float64(t - 1.0)) t_2 = Float64(Float64((a ^ Float64(t - 1.0)) / y) * x) tmp = 0.0 if (t_1 <= -5000000.0) tmp = t_2; elseif (t_1 <= 50.0) tmp = Float64(x / Float64(Float64(exp(b) * y) * a)); elseif (t_1 <= 1e+46) tmp = Float64(Float64(x / Float64(a * y)) * (z ^ y)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = log(a) * (t - 1.0); t_2 = ((a ^ (t - 1.0)) / y) * x; tmp = 0.0; if (t_1 <= -5000000.0) tmp = t_2; elseif (t_1 <= 50.0) tmp = x / ((exp(b) * y) * a); elseif (t_1 <= 1e+46) tmp = (x / (a * y)) * (z ^ y); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[Log[a], $MachinePrecision] * N[(t - 1.0), $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, -5000000.0], t$95$2, If[LessEqual[t$95$1, 50.0], N[(x / N[(N[(N[Exp[b], $MachinePrecision] * y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+46], N[(N[(x / N[(a * y), $MachinePrecision]), $MachinePrecision] * N[Power[z, y], $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log a \cdot \left(t - 1\right)\\
t_2 := \frac{{a}^{\left(t - 1\right)}}{y} \cdot x\\
\mathbf{if}\;t\_1 \leq -5000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 50:\\
\;\;\;\;\frac{x}{\left(e^{b} \cdot y\right) \cdot a}\\
\mathbf{elif}\;t\_1 \leq 10^{+46}:\\
\;\;\;\;\frac{x}{a \cdot y} \cdot {z}^{y}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -5e6 or 9.9999999999999999e45 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) Initial program 100.0%
Taylor expanded in b around 0
exp-sumN/A
associate-*r*N/A
associate-/l*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-/.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f6474.7
Applied rewrites74.7%
Taylor expanded in y around 0
Applied rewrites86.3%
if -5e6 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 50Initial program 90.7%
Taylor expanded in t around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
Applied rewrites77.4%
Taylor expanded in y around 0
Applied rewrites79.5%
if 50 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 9.9999999999999999e45Initial program 98.9%
Taylor expanded in t around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
Applied rewrites86.3%
Taylor expanded in b around 0
Applied rewrites78.6%
Final simplification82.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (log a) (- t 1.0))) (t_2 (* (/ (pow a (- t 1.0)) y) x)))
(if (<= t_1 -5000000.0)
t_2
(if (<= t_1 1e+46) (/ x (* (* (exp b) y) a)) t_2))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = log(a) * (t - 1.0);
double t_2 = (pow(a, (t - 1.0)) / y) * x;
double tmp;
if (t_1 <= -5000000.0) {
tmp = t_2;
} else if (t_1 <= 1e+46) {
tmp = x / ((exp(b) * y) * a);
} 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 = log(a) * (t - 1.0d0)
t_2 = ((a ** (t - 1.0d0)) / y) * x
if (t_1 <= (-5000000.0d0)) then
tmp = t_2
else if (t_1 <= 1d+46) then
tmp = x / ((exp(b) * y) * a)
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.log(a) * (t - 1.0);
double t_2 = (Math.pow(a, (t - 1.0)) / y) * x;
double tmp;
if (t_1 <= -5000000.0) {
tmp = t_2;
} else if (t_1 <= 1e+46) {
tmp = x / ((Math.exp(b) * y) * a);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = math.log(a) * (t - 1.0) t_2 = (math.pow(a, (t - 1.0)) / y) * x tmp = 0 if t_1 <= -5000000.0: tmp = t_2 elif t_1 <= 1e+46: tmp = x / ((math.exp(b) * y) * a) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(log(a) * Float64(t - 1.0)) t_2 = Float64(Float64((a ^ Float64(t - 1.0)) / y) * x) tmp = 0.0 if (t_1 <= -5000000.0) tmp = t_2; elseif (t_1 <= 1e+46) tmp = Float64(x / Float64(Float64(exp(b) * y) * a)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = log(a) * (t - 1.0); t_2 = ((a ^ (t - 1.0)) / y) * x; tmp = 0.0; if (t_1 <= -5000000.0) tmp = t_2; elseif (t_1 <= 1e+46) tmp = x / ((exp(b) * y) * a); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[Log[a], $MachinePrecision] * N[(t - 1.0), $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, -5000000.0], t$95$2, If[LessEqual[t$95$1, 1e+46], N[(x / N[(N[(N[Exp[b], $MachinePrecision] * y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log a \cdot \left(t - 1\right)\\
t_2 := \frac{{a}^{\left(t - 1\right)}}{y} \cdot x\\
\mathbf{if}\;t\_1 \leq -5000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 10^{+46}:\\
\;\;\;\;\frac{x}{\left(e^{b} \cdot y\right) \cdot a}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -5e6 or 9.9999999999999999e45 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) Initial program 100.0%
Taylor expanded in b around 0
exp-sumN/A
associate-*r*N/A
associate-/l*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-/.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f6474.7
Applied rewrites74.7%
Taylor expanded in y around 0
Applied rewrites86.3%
if -5e6 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 9.9999999999999999e45Initial program 95.2%
Taylor expanded in t around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
Applied rewrites82.3%
Taylor expanded in y around 0
Applied rewrites73.6%
Final simplification79.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (log a) (- t 1.0))) (t_2 (* (/ (pow a (- t 1.0)) y) x)))
(if (<= t_1 -5000000.0)
t_2
(if (<= t_1 1e+46) (/ x (* (* a y) (exp b))) t_2))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = log(a) * (t - 1.0);
double t_2 = (pow(a, (t - 1.0)) / y) * x;
double tmp;
if (t_1 <= -5000000.0) {
tmp = t_2;
} else if (t_1 <= 1e+46) {
tmp = x / ((a * y) * exp(b));
} 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 = log(a) * (t - 1.0d0)
t_2 = ((a ** (t - 1.0d0)) / y) * x
if (t_1 <= (-5000000.0d0)) then
tmp = t_2
else if (t_1 <= 1d+46) then
tmp = x / ((a * y) * exp(b))
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.log(a) * (t - 1.0);
double t_2 = (Math.pow(a, (t - 1.0)) / y) * x;
double tmp;
if (t_1 <= -5000000.0) {
tmp = t_2;
} else if (t_1 <= 1e+46) {
tmp = x / ((a * y) * Math.exp(b));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = math.log(a) * (t - 1.0) t_2 = (math.pow(a, (t - 1.0)) / y) * x tmp = 0 if t_1 <= -5000000.0: tmp = t_2 elif t_1 <= 1e+46: tmp = x / ((a * y) * math.exp(b)) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(log(a) * Float64(t - 1.0)) t_2 = Float64(Float64((a ^ Float64(t - 1.0)) / y) * x) tmp = 0.0 if (t_1 <= -5000000.0) tmp = t_2; elseif (t_1 <= 1e+46) tmp = Float64(x / Float64(Float64(a * y) * exp(b))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = log(a) * (t - 1.0); t_2 = ((a ^ (t - 1.0)) / y) * x; tmp = 0.0; if (t_1 <= -5000000.0) tmp = t_2; elseif (t_1 <= 1e+46) tmp = x / ((a * y) * exp(b)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[Log[a], $MachinePrecision] * N[(t - 1.0), $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, -5000000.0], t$95$2, If[LessEqual[t$95$1, 1e+46], N[(x / N[(N[(a * y), $MachinePrecision] * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log a \cdot \left(t - 1\right)\\
t_2 := \frac{{a}^{\left(t - 1\right)}}{y} \cdot x\\
\mathbf{if}\;t\_1 \leq -5000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 10^{+46}:\\
\;\;\;\;\frac{x}{\left(a \cdot y\right) \cdot e^{b}}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -5e6 or 9.9999999999999999e45 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) Initial program 100.0%
Taylor expanded in b around 0
exp-sumN/A
associate-*r*N/A
associate-/l*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-/.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f6474.7
Applied rewrites74.7%
Taylor expanded in y around 0
Applied rewrites86.3%
if -5e6 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 9.9999999999999999e45Initial program 95.2%
Taylor expanded in t around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
Applied rewrites82.3%
Taylor expanded in y around 0
Applied rewrites73.6%
Applied rewrites70.7%
Final simplification78.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* (exp (- (* (log a) t) b)) x) y)) (t_2 (/ (pow z y) a)))
(if (<= t -5.6e+36)
t_1
(if (<= t 1.15e-238)
(/ (* (* (exp (- b)) t_2) x) y)
(if (<= t 1.8e-20) (* (/ x y) t_2) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (exp(((log(a) * t) - b)) * x) / y;
double t_2 = pow(z, y) / a;
double tmp;
if (t <= -5.6e+36) {
tmp = t_1;
} else if (t <= 1.15e-238) {
tmp = ((exp(-b) * t_2) * x) / y;
} else if (t <= 1.8e-20) {
tmp = (x / y) * t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = (exp(((log(a) * t) - b)) * x) / y
t_2 = (z ** y) / a
if (t <= (-5.6d+36)) then
tmp = t_1
else if (t <= 1.15d-238) then
tmp = ((exp(-b) * t_2) * x) / y
else if (t <= 1.8d-20) then
tmp = (x / y) * t_2
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(((Math.log(a) * t) - b)) * x) / y;
double t_2 = Math.pow(z, y) / a;
double tmp;
if (t <= -5.6e+36) {
tmp = t_1;
} else if (t <= 1.15e-238) {
tmp = ((Math.exp(-b) * t_2) * x) / y;
} else if (t <= 1.8e-20) {
tmp = (x / y) * t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (math.exp(((math.log(a) * t) - b)) * x) / y t_2 = math.pow(z, y) / a tmp = 0 if t <= -5.6e+36: tmp = t_1 elif t <= 1.15e-238: tmp = ((math.exp(-b) * t_2) * x) / y elif t <= 1.8e-20: tmp = (x / y) * t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(exp(Float64(Float64(log(a) * t) - b)) * x) / y) t_2 = Float64((z ^ y) / a) tmp = 0.0 if (t <= -5.6e+36) tmp = t_1; elseif (t <= 1.15e-238) tmp = Float64(Float64(Float64(exp(Float64(-b)) * t_2) * x) / y); elseif (t <= 1.8e-20) tmp = Float64(Float64(x / y) * t_2); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (exp(((log(a) * t) - b)) * x) / y; t_2 = (z ^ y) / a; tmp = 0.0; if (t <= -5.6e+36) tmp = t_1; elseif (t <= 1.15e-238) tmp = ((exp(-b) * t_2) * x) / y; elseif (t <= 1.8e-20) tmp = (x / y) * t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[Exp[N[(N[(N[Log[a], $MachinePrecision] * t), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$2 = N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[t, -5.6e+36], t$95$1, If[LessEqual[t, 1.15e-238], N[(N[(N[(N[Exp[(-b)], $MachinePrecision] * t$95$2), $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 1.8e-20], N[(N[(x / y), $MachinePrecision] * t$95$2), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{e^{\log a \cdot t - b} \cdot x}{y}\\
t_2 := \frac{{z}^{y}}{a}\\
\mathbf{if}\;t \leq -5.6 \cdot 10^{+36}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{-238}:\\
\;\;\;\;\frac{\left(e^{-b} \cdot t\_2\right) \cdot x}{y}\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{-20}:\\
\;\;\;\;\frac{x}{y} \cdot t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -5.6000000000000001e36 or 1.79999999999999987e-20 < t Initial program 99.9%
Taylor expanded in t around inf
lower-*.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log91.4
Applied rewrites91.4%
if -5.6000000000000001e36 < t < 1.15000000000000002e-238Initial program 95.5%
Taylor expanded in t around 0
sub-negN/A
exp-sumN/A
mul-1-negN/A
lower-*.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
rem-exp-logN/A
mul-1-negN/A
lower-exp.f64N/A
lower-neg.f6488.3
Applied rewrites88.3%
if 1.15000000000000002e-238 < t < 1.79999999999999987e-20Initial program 94.4%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
div-invN/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites80.4%
Taylor expanded in b around 0
lower-/.f6489.2
Applied rewrites89.2%
Taylor expanded in t around 0
lower-/.f64N/A
lower-pow.f6489.2
Applied rewrites89.2%
Final simplification90.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* (exp (- (* (log a) t) b)) x) y)))
(if (<= t -2.7e+151)
t_1
(if (<= t 8.5e-216)
(/ (* (exp (- (* (log z) y) b)) x) y)
(if (<= t 1.8e-20) (* (/ x y) (/ (pow z y) a)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (exp(((log(a) * t) - b)) * x) / y;
double tmp;
if (t <= -2.7e+151) {
tmp = t_1;
} else if (t <= 8.5e-216) {
tmp = (exp(((log(z) * y) - b)) * x) / y;
} else if (t <= 1.8e-20) {
tmp = (x / y) * (pow(z, y) / a);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (exp(((log(a) * t) - b)) * x) / y
if (t <= (-2.7d+151)) then
tmp = t_1
else if (t <= 8.5d-216) then
tmp = (exp(((log(z) * y) - b)) * x) / y
else if (t <= 1.8d-20) then
tmp = (x / y) * ((z ** y) / a)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (Math.exp(((Math.log(a) * t) - b)) * x) / y;
double tmp;
if (t <= -2.7e+151) {
tmp = t_1;
} else if (t <= 8.5e-216) {
tmp = (Math.exp(((Math.log(z) * y) - b)) * x) / y;
} else if (t <= 1.8e-20) {
tmp = (x / y) * (Math.pow(z, y) / a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (math.exp(((math.log(a) * t) - b)) * x) / y tmp = 0 if t <= -2.7e+151: tmp = t_1 elif t <= 8.5e-216: tmp = (math.exp(((math.log(z) * y) - b)) * x) / y elif t <= 1.8e-20: tmp = (x / y) * (math.pow(z, y) / a) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(exp(Float64(Float64(log(a) * t) - b)) * x) / y) tmp = 0.0 if (t <= -2.7e+151) tmp = t_1; elseif (t <= 8.5e-216) tmp = Float64(Float64(exp(Float64(Float64(log(z) * y) - b)) * x) / y); elseif (t <= 1.8e-20) tmp = Float64(Float64(x / y) * Float64((z ^ y) / a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (exp(((log(a) * t) - b)) * x) / y; tmp = 0.0; if (t <= -2.7e+151) tmp = t_1; elseif (t <= 8.5e-216) tmp = (exp(((log(z) * y) - b)) * x) / y; elseif (t <= 1.8e-20) tmp = (x / y) * ((z ^ y) / a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[Exp[N[(N[(N[Log[a], $MachinePrecision] * t), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t, -2.7e+151], t$95$1, If[LessEqual[t, 8.5e-216], N[(N[(N[Exp[N[(N[(N[Log[z], $MachinePrecision] * y), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 1.8e-20], N[(N[(x / y), $MachinePrecision] * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{e^{\log a \cdot t - b} \cdot x}{y}\\
\mathbf{if}\;t \leq -2.7 \cdot 10^{+151}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 8.5 \cdot 10^{-216}:\\
\;\;\;\;\frac{e^{\log z \cdot y - b} \cdot x}{y}\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{-20}:\\
\;\;\;\;\frac{x}{y} \cdot \frac{{z}^{y}}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.7000000000000001e151 or 1.79999999999999987e-20 < t Initial program 99.9%
Taylor expanded in t around inf
lower-*.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log95.0
Applied rewrites95.0%
if -2.7000000000000001e151 < t < 8.50000000000000003e-216Initial program 96.8%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6482.1
Applied rewrites82.1%
if 8.50000000000000003e-216 < t < 1.79999999999999987e-20Initial program 93.9%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
div-invN/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites80.9%
Taylor expanded in b around 0
lower-/.f6490.5
Applied rewrites90.5%
Taylor expanded in t around 0
lower-/.f64N/A
lower-pow.f6490.5
Applied rewrites90.5%
Final simplification88.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* (exp (- (* (log a) t) b)) x) y)))
(if (<= b -1e+50)
t_1
(if (<= b 650.0) (* (/ (pow a (- t 1.0)) y) (* (pow z y) x)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (exp(((log(a) * t) - b)) * x) / y;
double tmp;
if (b <= -1e+50) {
tmp = t_1;
} else if (b <= 650.0) {
tmp = (pow(a, (t - 1.0)) / y) * (pow(z, y) * x);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (exp(((log(a) * t) - b)) * x) / y
if (b <= (-1d+50)) then
tmp = t_1
else if (b <= 650.0d0) then
tmp = ((a ** (t - 1.0d0)) / y) * ((z ** y) * x)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (Math.exp(((Math.log(a) * t) - b)) * x) / y;
double tmp;
if (b <= -1e+50) {
tmp = t_1;
} else if (b <= 650.0) {
tmp = (Math.pow(a, (t - 1.0)) / y) * (Math.pow(z, y) * x);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (math.exp(((math.log(a) * t) - b)) * x) / y tmp = 0 if b <= -1e+50: tmp = t_1 elif b <= 650.0: tmp = (math.pow(a, (t - 1.0)) / y) * (math.pow(z, y) * x) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(exp(Float64(Float64(log(a) * t) - b)) * x) / y) tmp = 0.0 if (b <= -1e+50) tmp = t_1; elseif (b <= 650.0) tmp = Float64(Float64((a ^ Float64(t - 1.0)) / y) * Float64((z ^ y) * x)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (exp(((log(a) * t) - b)) * x) / y; tmp = 0.0; if (b <= -1e+50) tmp = t_1; elseif (b <= 650.0) tmp = ((a ^ (t - 1.0)) / y) * ((z ^ y) * x); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[Exp[N[(N[(N[Log[a], $MachinePrecision] * t), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[b, -1e+50], t$95$1, If[LessEqual[b, 650.0], N[(N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision] * N[(N[Power[z, y], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{e^{\log a \cdot t - b} \cdot x}{y}\\
\mathbf{if}\;b \leq -1 \cdot 10^{+50}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 650:\\
\;\;\;\;\frac{{a}^{\left(t - 1\right)}}{y} \cdot \left({z}^{y} \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.0000000000000001e50 or 650 < b Initial program 100.0%
Taylor expanded in t around inf
lower-*.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log90.7
Applied rewrites90.7%
if -1.0000000000000001e50 < b < 650Initial program 95.4%
Taylor expanded in b around 0
exp-sumN/A
associate-*r*N/A
associate-/l*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-/.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f6484.4
Applied rewrites84.4%
Final simplification87.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (/ (exp (- b)) y) x)))
(if (<= b -1.55e+161)
t_1
(if (<= b 1500000000.0) (* (/ (pow a (- t 1.0)) y) x) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (exp(-b) / y) * x;
double tmp;
if (b <= -1.55e+161) {
tmp = t_1;
} else if (b <= 1500000000.0) {
tmp = (pow(a, (t - 1.0)) / y) * x;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (exp(-b) / y) * x
if (b <= (-1.55d+161)) then
tmp = t_1
else if (b <= 1500000000.0d0) then
tmp = ((a ** (t - 1.0d0)) / y) * x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (Math.exp(-b) / y) * x;
double tmp;
if (b <= -1.55e+161) {
tmp = t_1;
} else if (b <= 1500000000.0) {
tmp = (Math.pow(a, (t - 1.0)) / y) * x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (math.exp(-b) / y) * x tmp = 0 if b <= -1.55e+161: tmp = t_1 elif b <= 1500000000.0: tmp = (math.pow(a, (t - 1.0)) / y) * x else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(exp(Float64(-b)) / y) * x) tmp = 0.0 if (b <= -1.55e+161) tmp = t_1; elseif (b <= 1500000000.0) tmp = Float64(Float64((a ^ Float64(t - 1.0)) / y) * x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (exp(-b) / y) * x; tmp = 0.0; if (b <= -1.55e+161) tmp = t_1; elseif (b <= 1500000000.0) tmp = ((a ^ (t - 1.0)) / y) * x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[b, -1.55e+161], t$95$1, If[LessEqual[b, 1500000000.0], N[(N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{e^{-b}}{y} \cdot x\\
\mathbf{if}\;b \leq -1.55 \cdot 10^{+161}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1500000000:\\
\;\;\;\;\frac{{a}^{\left(t - 1\right)}}{y} \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.55000000000000003e161 or 1.5e9 < b Initial program 100.0%
Taylor expanded in t around inf
lower-*.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log91.5
Applied rewrites91.5%
Taylor expanded in b around inf
neg-mul-1N/A
lower-neg.f6480.9
Applied rewrites80.9%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6480.9
Applied rewrites80.9%
if -1.55000000000000003e161 < b < 1.5e9Initial program 96.0%
Taylor expanded in b around 0
exp-sumN/A
associate-*r*N/A
associate-/l*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-/.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f6482.5
Applied rewrites82.5%
Taylor expanded in y around 0
Applied rewrites72.0%
Final simplification75.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (/ (exp (- b)) y) x)))
(if (<= b -6.2e-18)
t_1
(if (<= b 240000.0) (/ x (* (fma (* (fma 0.5 b 1.0) y) b y) a)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (exp(-b) / y) * x;
double tmp;
if (b <= -6.2e-18) {
tmp = t_1;
} else if (b <= 240000.0) {
tmp = x / (fma((fma(0.5, b, 1.0) * y), b, y) * a);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(exp(Float64(-b)) / y) * x) tmp = 0.0 if (b <= -6.2e-18) tmp = t_1; elseif (b <= 240000.0) tmp = Float64(x / Float64(fma(Float64(fma(0.5, b, 1.0) * y), b, y) * a)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[b, -6.2e-18], t$95$1, If[LessEqual[b, 240000.0], N[(x / N[(N[(N[(N[(0.5 * b + 1.0), $MachinePrecision] * y), $MachinePrecision] * b + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{e^{-b}}{y} \cdot x\\
\mathbf{if}\;b \leq -6.2 \cdot 10^{-18}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 240000:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(\mathsf{fma}\left(0.5, b, 1\right) \cdot y, b, y\right) \cdot a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -6.20000000000000014e-18 or 2.4e5 < b Initial program 100.0%
Taylor expanded in t around inf
lower-*.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log89.9
Applied rewrites89.9%
Taylor expanded in b around inf
neg-mul-1N/A
lower-neg.f6475.3
Applied rewrites75.3%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6475.3
Applied rewrites75.3%
if -6.20000000000000014e-18 < b < 2.4e5Initial program 95.0%
Taylor expanded in t around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
Applied rewrites69.0%
Taylor expanded in y around 0
Applied rewrites41.1%
Taylor expanded in b around 0
Applied rewrites41.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (* a y))))
(if (<= b -2.1e+25)
(fma
(fma
(- (fma (fma t_1 0.16666666666666666 0.0) b (* -0.5 t_1)))
b
(/ (- x) (* a y)))
b
t_1)
(/ x (* (fma (fma (* (fma 0.16666666666666666 b 0.5) y) b y) b y) a)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a * y);
double tmp;
if (b <= -2.1e+25) {
tmp = fma(fma(-fma(fma(t_1, 0.16666666666666666, 0.0), b, (-0.5 * t_1)), b, (-x / (a * y))), b, t_1);
} else {
tmp = x / (fma(fma((fma(0.16666666666666666, b, 0.5) * y), b, y), b, y) * a);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(a * y)) tmp = 0.0 if (b <= -2.1e+25) tmp = fma(fma(Float64(-fma(fma(t_1, 0.16666666666666666, 0.0), b, Float64(-0.5 * t_1))), b, Float64(Float64(-x) / Float64(a * y))), b, t_1); else tmp = Float64(x / Float64(fma(fma(Float64(fma(0.16666666666666666, b, 0.5) * y), b, y), b, y) * a)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(a * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.1e+25], N[(N[((-N[(N[(t$95$1 * 0.16666666666666666 + 0.0), $MachinePrecision] * b + N[(-0.5 * t$95$1), $MachinePrecision]), $MachinePrecision]) * b + N[((-x) / N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * b + t$95$1), $MachinePrecision], N[(x / N[(N[(N[(N[(N[(0.16666666666666666 * b + 0.5), $MachinePrecision] * y), $MachinePrecision] * b + y), $MachinePrecision] * b + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a \cdot y}\\
\mathbf{if}\;b \leq -2.1 \cdot 10^{+25}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-\mathsf{fma}\left(\mathsf{fma}\left(t\_1, 0.16666666666666666, 0\right), b, -0.5 \cdot t\_1\right), b, \frac{-x}{a \cdot y}\right), b, t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(0.16666666666666666, b, 0.5\right) \cdot y, b, y\right), b, y\right) \cdot a}\\
\end{array}
\end{array}
if b < -2.0999999999999999e25Initial program 100.0%
Taylor expanded in t around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
Applied rewrites62.1%
Taylor expanded in y around 0
Applied rewrites75.0%
Taylor expanded in b around 0
Applied rewrites30.9%
Taylor expanded in b around 0
Applied rewrites67.4%
if -2.0999999999999999e25 < b Initial program 96.7%
Taylor expanded in t around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
Applied rewrites66.4%
Taylor expanded in y around 0
Applied rewrites52.5%
Taylor expanded in b around 0
Applied rewrites46.5%
Final simplification51.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (* a y))))
(if (<= b -1.02e+90)
(fma (- (fma (* -0.5 t_1) b t_1)) b t_1)
(if (<= b 4.6e-284)
(/ (fma (/ (* (- x) b) y) a (* (/ x y) a)) (* a a))
(/
x
(* (fma (fma (* (fma 0.16666666666666666 b 0.5) y) b y) b y) a))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a * y);
double tmp;
if (b <= -1.02e+90) {
tmp = fma(-fma((-0.5 * t_1), b, t_1), b, t_1);
} else if (b <= 4.6e-284) {
tmp = fma(((-x * b) / y), a, ((x / y) * a)) / (a * a);
} else {
tmp = x / (fma(fma((fma(0.16666666666666666, b, 0.5) * y), b, y), b, y) * a);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(a * y)) tmp = 0.0 if (b <= -1.02e+90) tmp = fma(Float64(-fma(Float64(-0.5 * t_1), b, t_1)), b, t_1); elseif (b <= 4.6e-284) tmp = Float64(fma(Float64(Float64(Float64(-x) * b) / y), a, Float64(Float64(x / y) * a)) / Float64(a * a)); else tmp = Float64(x / Float64(fma(fma(Float64(fma(0.16666666666666666, b, 0.5) * y), b, y), b, y) * a)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(a * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.02e+90], N[((-N[(N[(-0.5 * t$95$1), $MachinePrecision] * b + t$95$1), $MachinePrecision]) * b + t$95$1), $MachinePrecision], If[LessEqual[b, 4.6e-284], N[(N[(N[(N[((-x) * b), $MachinePrecision] / y), $MachinePrecision] * a + N[(N[(x / y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] / N[(a * a), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(N[(N[(N[(0.16666666666666666 * b + 0.5), $MachinePrecision] * y), $MachinePrecision] * b + y), $MachinePrecision] * b + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a \cdot y}\\
\mathbf{if}\;b \leq -1.02 \cdot 10^{+90}:\\
\;\;\;\;\mathsf{fma}\left(-\mathsf{fma}\left(-0.5 \cdot t\_1, b, t\_1\right), b, t\_1\right)\\
\mathbf{elif}\;b \leq 4.6 \cdot 10^{-284}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\frac{\left(-x\right) \cdot b}{y}, a, \frac{x}{y} \cdot a\right)}{a \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(0.16666666666666666, b, 0.5\right) \cdot y, b, y\right), b, y\right) \cdot a}\\
\end{array}
\end{array}
if b < -1.02000000000000005e90Initial program 100.0%
Taylor expanded in t around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
Applied rewrites63.2%
Taylor expanded in y around 0
Applied rewrites78.6%
Taylor expanded in b around 0
Applied rewrites64.1%
if -1.02000000000000005e90 < b < 4.6e-284Initial program 95.7%
Taylor expanded in t around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
Applied rewrites68.1%
Taylor expanded in y around 0
Applied rewrites45.1%
Taylor expanded in b around 0
Applied rewrites37.4%
Applied rewrites45.3%
if 4.6e-284 < b Initial program 97.8%
Taylor expanded in t around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
Applied rewrites64.3%
Taylor expanded in y around 0
Applied rewrites59.3%
Taylor expanded in b around 0
Applied rewrites50.9%
Final simplification51.4%
(FPCore (x y z t a b) :precision binary64 (if (<= b -5e-138) (/ (* (- 1.0 b) (/ x y)) a) (/ x (* (fma (* (fma 0.5 b 1.0) y) b y) a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -5e-138) {
tmp = ((1.0 - b) * (x / y)) / a;
} else {
tmp = x / (fma((fma(0.5, b, 1.0) * y), b, y) * a);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -5e-138) tmp = Float64(Float64(Float64(1.0 - b) * Float64(x / y)) / a); else tmp = Float64(x / Float64(fma(Float64(fma(0.5, b, 1.0) * y), b, y) * a)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -5e-138], N[(N[(N[(1.0 - b), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(x / N[(N[(N[(N[(0.5 * b + 1.0), $MachinePrecision] * y), $MachinePrecision] * b + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5 \cdot 10^{-138}:\\
\;\;\;\;\frac{\left(1 - b\right) \cdot \frac{x}{y}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(\mathsf{fma}\left(0.5, b, 1\right) \cdot y, b, y\right) \cdot a}\\
\end{array}
\end{array}
if b < -4.99999999999999989e-138Initial program 97.7%
Taylor expanded in t around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
Applied rewrites67.0%
Taylor expanded in y around 0
Applied rewrites65.9%
Taylor expanded in b around 0
Applied rewrites41.5%
Applied rewrites50.2%
if -4.99999999999999989e-138 < b Initial program 97.4%
Taylor expanded in t around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
Applied rewrites64.3%
Taylor expanded in y around 0
Applied rewrites53.3%
Taylor expanded in b around 0
Applied rewrites45.9%
Final simplification47.5%
(FPCore (x y z t a b) :precision binary64 (if (<= b -5e-138) (/ (* (- 1.0 b) (/ x y)) a) (/ x (* (fma b y y) a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -5e-138) {
tmp = ((1.0 - b) * (x / y)) / a;
} else {
tmp = x / (fma(b, y, y) * a);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -5e-138) tmp = Float64(Float64(Float64(1.0 - b) * Float64(x / y)) / a); else tmp = Float64(x / Float64(fma(b, y, y) * a)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -5e-138], N[(N[(N[(1.0 - b), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(x / N[(N[(b * y + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5 \cdot 10^{-138}:\\
\;\;\;\;\frac{\left(1 - b\right) \cdot \frac{x}{y}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(b, y, y\right) \cdot a}\\
\end{array}
\end{array}
if b < -4.99999999999999989e-138Initial program 97.7%
Taylor expanded in t around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
Applied rewrites67.0%
Taylor expanded in y around 0
Applied rewrites65.9%
Taylor expanded in b around 0
Applied rewrites41.5%
Applied rewrites50.2%
if -4.99999999999999989e-138 < b Initial program 97.4%
Taylor expanded in t around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
Applied rewrites64.3%
Taylor expanded in y around 0
Applied rewrites53.3%
Taylor expanded in b around 0
Applied rewrites41.1%
Final simplification44.5%
(FPCore (x y z t a b) :precision binary64 (if (<= b -2.1e+25) (* (/ b (* a y)) (- x)) (/ x (* (fma b y y) a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.1e+25) {
tmp = (b / (a * y)) * -x;
} else {
tmp = x / (fma(b, y, y) * a);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -2.1e+25) tmp = Float64(Float64(b / Float64(a * y)) * Float64(-x)); else tmp = Float64(x / Float64(fma(b, y, y) * a)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -2.1e+25], N[(N[(b / N[(a * y), $MachinePrecision]), $MachinePrecision] * (-x)), $MachinePrecision], N[(x / N[(N[(b * y + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.1 \cdot 10^{+25}:\\
\;\;\;\;\frac{b}{a \cdot y} \cdot \left(-x\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(b, y, y\right) \cdot a}\\
\end{array}
\end{array}
if b < -2.0999999999999999e25Initial program 100.0%
Taylor expanded in t around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
Applied rewrites62.1%
Taylor expanded in y around 0
Applied rewrites75.0%
Taylor expanded in b around 0
Applied rewrites40.8%
Taylor expanded in b around inf
Applied rewrites39.3%
if -2.0999999999999999e25 < b Initial program 96.7%
Taylor expanded in t around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
Applied rewrites66.4%
Taylor expanded in y around 0
Applied rewrites52.5%
Taylor expanded in b around 0
Applied rewrites41.7%
Final simplification41.1%
(FPCore (x y z t a b) :precision binary64 (if (<= b -2.1e+25) (* (/ 1.0 (* a y)) x) (/ x (* (fma a b a) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.1e+25) {
tmp = (1.0 / (a * y)) * x;
} else {
tmp = x / (fma(a, b, a) * y);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -2.1e+25) tmp = Float64(Float64(1.0 / Float64(a * y)) * x); else tmp = Float64(x / Float64(fma(a, b, a) * y)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -2.1e+25], N[(N[(1.0 / N[(a * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], N[(x / N[(N[(a * b + a), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.1 \cdot 10^{+25}:\\
\;\;\;\;\frac{1}{a \cdot y} \cdot x\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(a, b, a\right) \cdot y}\\
\end{array}
\end{array}
if b < -2.0999999999999999e25Initial program 100.0%
Taylor expanded in t around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
Applied rewrites62.1%
Taylor expanded in y around 0
Applied rewrites75.0%
Taylor expanded in b around 0
Applied rewrites30.9%
Applied rewrites32.4%
if -2.0999999999999999e25 < b Initial program 96.7%
Taylor expanded in t around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
Applied rewrites66.4%
Taylor expanded in y around 0
Applied rewrites52.5%
Taylor expanded in b around 0
Applied rewrites40.7%
Final simplification38.7%
(FPCore (x y z t a b) :precision binary64 (* (/ 1.0 (* a y)) x))
double code(double x, double y, double z, double t, double a, double b) {
return (1.0 / (a * y)) * x;
}
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 = (1.0d0 / (a * y)) * x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (1.0 / (a * y)) * x;
}
def code(x, y, z, t, a, b): return (1.0 / (a * y)) * x
function code(x, y, z, t, a, b) return Float64(Float64(1.0 / Float64(a * y)) * x) end
function tmp = code(x, y, z, t, a, b) tmp = (1.0 / (a * y)) * x; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(1.0 / N[(a * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{a \cdot y} \cdot x
\end{array}
Initial program 97.5%
Taylor expanded in t around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
Applied rewrites65.3%
Taylor expanded in y around 0
Applied rewrites58.0%
Taylor expanded in b around 0
Applied rewrites32.8%
Applied rewrites33.1%
(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(x / Float64(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[(x / N[(a * y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{a \cdot y}
\end{array}
Initial program 97.5%
Taylor expanded in t around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
Applied rewrites65.3%
Taylor expanded in y around 0
Applied rewrites58.0%
Taylor expanded in b around 0
Applied rewrites32.8%
Final simplification32.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (pow a (- t 1.0)))
(t_2 (/ (* x (/ t_1 y)) (- (+ b 1.0) (* y (log z))))))
(if (< t -0.8845848504127471)
t_2
(if (< t 852031.2288374073)
(/ (* (/ x y) t_1) (exp (- b (* (log z) y))))
t_2))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = pow(a, (t - 1.0));
double t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * log(z)));
double tmp;
if (t < -0.8845848504127471) {
tmp = t_2;
} else if (t < 852031.2288374073) {
tmp = ((x / y) * t_1) / exp((b - (log(z) * y)));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = a ** (t - 1.0d0)
t_2 = (x * (t_1 / y)) / ((b + 1.0d0) - (y * log(z)))
if (t < (-0.8845848504127471d0)) then
tmp = t_2
else if (t < 852031.2288374073d0) then
tmp = ((x / y) * t_1) / exp((b - (log(z) * y)))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = Math.pow(a, (t - 1.0));
double t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * Math.log(z)));
double tmp;
if (t < -0.8845848504127471) {
tmp = t_2;
} else if (t < 852031.2288374073) {
tmp = ((x / y) * t_1) / Math.exp((b - (Math.log(z) * y)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = math.pow(a, (t - 1.0)) t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * math.log(z))) tmp = 0 if t < -0.8845848504127471: tmp = t_2 elif t < 852031.2288374073: tmp = ((x / y) * t_1) / math.exp((b - (math.log(z) * y))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = a ^ Float64(t - 1.0) t_2 = Float64(Float64(x * Float64(t_1 / y)) / Float64(Float64(b + 1.0) - Float64(y * log(z)))) tmp = 0.0 if (t < -0.8845848504127471) tmp = t_2; elseif (t < 852031.2288374073) tmp = Float64(Float64(Float64(x / y) * t_1) / exp(Float64(b - Float64(log(z) * y)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a ^ (t - 1.0); t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * log(z))); tmp = 0.0; if (t < -0.8845848504127471) tmp = t_2; elseif (t < 852031.2288374073) tmp = ((x / y) * t_1) / exp((b - (log(z) * y))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision] / N[(N[(b + 1.0), $MachinePrecision] - N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -0.8845848504127471], t$95$2, If[Less[t, 852031.2288374073], N[(N[(N[(x / y), $MachinePrecision] * t$95$1), $MachinePrecision] / N[Exp[N[(b - N[(N[Log[z], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {a}^{\left(t - 1\right)}\\
t_2 := \frac{x \cdot \frac{t\_1}{y}}{\left(b + 1\right) - y \cdot \log z}\\
\mathbf{if}\;t < -0.8845848504127471:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t < 852031.2288374073:\\
\;\;\;\;\frac{\frac{x}{y} \cdot t\_1}{e^{b - \log z \cdot y}}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024235
(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))