
(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.5%
Final simplification98.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (exp (- (+ (* y (log z)) (* (+ t -1.0) (log a))) b))) y))
(t_2 (/ x (* a (* 0.5 (* b (* y b)))))))
(if (<= t_1 (- INFINITY))
t_2
(if (<= t_1 4e+274) (/ x (* a (fma y (fma 0.5 (* b b) b) y))) t_2))))
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 t_2 = x / (a * (0.5 * (b * (y * b))));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = t_2;
} else if (t_1 <= 4e+274) {
tmp = x / (a * fma(y, fma(0.5, (b * b), b), y));
} else {
tmp = t_2;
}
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) t_2 = Float64(x / Float64(a * Float64(0.5 * Float64(b * Float64(y * b))))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = t_2; elseif (t_1 <= 4e+274) tmp = Float64(x / Float64(a * fma(y, fma(0.5, Float64(b * b), b), y))); else tmp = t_2; 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]}, Block[{t$95$2 = N[(x / N[(a * N[(0.5 * N[(b * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], t$95$2, If[LessEqual[t$95$1, 4e+274], N[(x / N[(a * N[(y * N[(0.5 * N[(b * b), $MachinePrecision] + b), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\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}\\
t_2 := \frac{x}{a \cdot \left(0.5 \cdot \left(b \cdot \left(y \cdot b\right)\right)\right)}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+274}:\\
\;\;\;\;\frac{x}{a \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(0.5, b \cdot b, b\right), y\right)}\\
\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 3.99999999999999969e274 < (/.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.9%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
lower-*.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
lower-+.f64N/A
lower-*.f64N/A
lower-exp.f6462.5
Applied rewrites62.5%
Taylor expanded in t around 0
Applied rewrites57.0%
Taylor expanded in b around 0
Applied rewrites19.9%
Taylor expanded in b around inf
Applied rewrites32.5%
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) < 3.99999999999999969e274Initial program 97.0%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
lower-*.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
lower-+.f64N/A
lower-*.f64N/A
lower-exp.f6466.1
Applied rewrites66.1%
Taylor expanded in t around 0
Applied rewrites62.3%
Taylor expanded in b around 0
Applied rewrites36.2%
Taylor expanded in b around 0
Applied rewrites55.8%
Final simplification44.3%
(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 (<= t_1 -2e+57)
(/ (* x (/ 1.0 a)) y)
(if (<= t_1 5e-11) (/ x (* a (fma y b y))) (/ x (* y a))))))
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 <= -2e+57) {
tmp = (x * (1.0 / a)) / y;
} else if (t_1 <= 5e-11) {
tmp = x / (a * fma(y, b, y));
} else {
tmp = x / (y * a);
}
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 <= -2e+57) tmp = Float64(Float64(x * Float64(1.0 / a)) / y); elseif (t_1 <= 5e-11) tmp = Float64(x / Float64(a * fma(y, b, y))); else tmp = Float64(x / Float64(y * a)); 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[LessEqual[t$95$1, -2e+57], N[(N[(x * N[(1.0 / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t$95$1, 5e-11], N[(x / N[(a * N[(y * b + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * a), $MachinePrecision]), $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 -2 \cdot 10^{+57}:\\
\;\;\;\;\frac{x \cdot \frac{1}{a}}{y}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-11}:\\
\;\;\;\;\frac{x}{a \cdot \mathsf{fma}\left(y, b, y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\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.0000000000000001e57Initial program 99.0%
Taylor expanded in b around 0
exp-sumN/A
lower-*.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
lower-+.f6466.5
Applied rewrites66.5%
Taylor expanded in y around 0
Applied rewrites62.5%
Taylor expanded in t around 0
Applied rewrites32.9%
if -2.0000000000000001e57 < (/.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.00000000000000018e-11Initial program 97.4%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
lower-*.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
lower-+.f64N/A
lower-*.f64N/A
lower-exp.f6463.7
Applied rewrites63.7%
Taylor expanded in t around 0
Applied rewrites61.4%
Taylor expanded in b around 0
Applied rewrites43.0%
if 5.00000000000000018e-11 < (/.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.7%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
lower-*.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
lower-+.f64N/A
lower-*.f64N/A
lower-exp.f6463.6
Applied rewrites63.6%
Taylor expanded in t around 0
Applied rewrites58.2%
Taylor expanded in b around 0
Applied rewrites34.4%
Final simplification38.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (* a (* y (exp b)))))
(t_2 (* (+ t -1.0) (log a)))
(t_3 (* x (/ (pow a (+ t -1.0)) y))))
(if (<= t_2 -1e+27)
t_3
(if (<= t_2 -143.0)
t_1
(if (<= t_2 4e+69)
(/ (* x (/ (pow z y) a)) y)
(if (<= t_2 5e+131) t_1 t_3))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a * (y * exp(b)));
double t_2 = (t + -1.0) * log(a);
double t_3 = x * (pow(a, (t + -1.0)) / y);
double tmp;
if (t_2 <= -1e+27) {
tmp = t_3;
} else if (t_2 <= -143.0) {
tmp = t_1;
} else if (t_2 <= 4e+69) {
tmp = (x * (pow(z, y) / a)) / y;
} else if (t_2 <= 5e+131) {
tmp = t_1;
} 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 = x / (a * (y * exp(b)))
t_2 = (t + (-1.0d0)) * log(a)
t_3 = x * ((a ** (t + (-1.0d0))) / y)
if (t_2 <= (-1d+27)) then
tmp = t_3
else if (t_2 <= (-143.0d0)) then
tmp = t_1
else if (t_2 <= 4d+69) then
tmp = (x * ((z ** y) / a)) / y
else if (t_2 <= 5d+131) then
tmp = t_1
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 = x / (a * (y * Math.exp(b)));
double t_2 = (t + -1.0) * Math.log(a);
double t_3 = x * (Math.pow(a, (t + -1.0)) / y);
double tmp;
if (t_2 <= -1e+27) {
tmp = t_3;
} else if (t_2 <= -143.0) {
tmp = t_1;
} else if (t_2 <= 4e+69) {
tmp = (x * (Math.pow(z, y) / a)) / y;
} else if (t_2 <= 5e+131) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (a * (y * math.exp(b))) t_2 = (t + -1.0) * math.log(a) t_3 = x * (math.pow(a, (t + -1.0)) / y) tmp = 0 if t_2 <= -1e+27: tmp = t_3 elif t_2 <= -143.0: tmp = t_1 elif t_2 <= 4e+69: tmp = (x * (math.pow(z, y) / a)) / y elif t_2 <= 5e+131: tmp = t_1 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(a * Float64(y * exp(b)))) t_2 = Float64(Float64(t + -1.0) * log(a)) t_3 = Float64(x * Float64((a ^ Float64(t + -1.0)) / y)) tmp = 0.0 if (t_2 <= -1e+27) tmp = t_3; elseif (t_2 <= -143.0) tmp = t_1; elseif (t_2 <= 4e+69) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y); elseif (t_2 <= 5e+131) tmp = t_1; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (a * (y * exp(b))); t_2 = (t + -1.0) * log(a); t_3 = x * ((a ^ (t + -1.0)) / y); tmp = 0.0; if (t_2 <= -1e+27) tmp = t_3; elseif (t_2 <= -143.0) tmp = t_1; elseif (t_2 <= 4e+69) tmp = (x * ((z ^ y) / a)) / y; elseif (t_2 <= 5e+131) tmp = t_1; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+27], t$95$3, If[LessEqual[t$95$2, -143.0], t$95$1, If[LessEqual[t$95$2, 4e+69], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t$95$2, 5e+131], t$95$1, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
t_2 := \left(t + -1\right) \cdot \log a\\
t_3 := x \cdot \frac{{a}^{\left(t + -1\right)}}{y}\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+27}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq -143:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+69}:\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+131}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -1e27 or 4.99999999999999995e131 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) Initial program 100.0%
Taylor expanded in b around 0
exp-sumN/A
lower-*.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
lower-+.f6465.8
Applied rewrites65.8%
Taylor expanded in y around 0
Applied rewrites83.1%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6483.1
Applied rewrites83.1%
if -1e27 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -143 or 4.0000000000000003e69 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 4.99999999999999995e131Initial program 95.5%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
lower-*.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
lower-+.f64N/A
lower-*.f64N/A
lower-exp.f6464.2
Applied rewrites64.2%
Taylor expanded in t around 0
Applied rewrites81.8%
if -143 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 4.0000000000000003e69Initial program 99.1%
Taylor expanded in b around 0
exp-sumN/A
lower-*.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
lower-+.f6478.0
Applied rewrites78.0%
Taylor expanded in t around 0
Applied rewrites79.4%
Final simplification81.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (* a (* y (exp b)))))
(t_2 (* (+ t -1.0) (log a)))
(t_3 (* x (/ (pow a (+ t -1.0)) y))))
(if (<= t_2 -1e+27)
t_3
(if (<= t_2 -143.0)
t_1
(if (<= t_2 1000.0)
(* x (/ (pow z y) (* y a)))
(if (<= t_2 5e+131) t_1 t_3))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a * (y * exp(b)));
double t_2 = (t + -1.0) * log(a);
double t_3 = x * (pow(a, (t + -1.0)) / y);
double tmp;
if (t_2 <= -1e+27) {
tmp = t_3;
} else if (t_2 <= -143.0) {
tmp = t_1;
} else if (t_2 <= 1000.0) {
tmp = x * (pow(z, y) / (y * a));
} else if (t_2 <= 5e+131) {
tmp = t_1;
} 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 = x / (a * (y * exp(b)))
t_2 = (t + (-1.0d0)) * log(a)
t_3 = x * ((a ** (t + (-1.0d0))) / y)
if (t_2 <= (-1d+27)) then
tmp = t_3
else if (t_2 <= (-143.0d0)) then
tmp = t_1
else if (t_2 <= 1000.0d0) then
tmp = x * ((z ** y) / (y * a))
else if (t_2 <= 5d+131) then
tmp = t_1
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 = x / (a * (y * Math.exp(b)));
double t_2 = (t + -1.0) * Math.log(a);
double t_3 = x * (Math.pow(a, (t + -1.0)) / y);
double tmp;
if (t_2 <= -1e+27) {
tmp = t_3;
} else if (t_2 <= -143.0) {
tmp = t_1;
} else if (t_2 <= 1000.0) {
tmp = x * (Math.pow(z, y) / (y * a));
} else if (t_2 <= 5e+131) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (a * (y * math.exp(b))) t_2 = (t + -1.0) * math.log(a) t_3 = x * (math.pow(a, (t + -1.0)) / y) tmp = 0 if t_2 <= -1e+27: tmp = t_3 elif t_2 <= -143.0: tmp = t_1 elif t_2 <= 1000.0: tmp = x * (math.pow(z, y) / (y * a)) elif t_2 <= 5e+131: tmp = t_1 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(a * Float64(y * exp(b)))) t_2 = Float64(Float64(t + -1.0) * log(a)) t_3 = Float64(x * Float64((a ^ Float64(t + -1.0)) / y)) tmp = 0.0 if (t_2 <= -1e+27) tmp = t_3; elseif (t_2 <= -143.0) tmp = t_1; elseif (t_2 <= 1000.0) tmp = Float64(x * Float64((z ^ y) / Float64(y * a))); elseif (t_2 <= 5e+131) tmp = t_1; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (a * (y * exp(b))); t_2 = (t + -1.0) * log(a); t_3 = x * ((a ^ (t + -1.0)) / y); tmp = 0.0; if (t_2 <= -1e+27) tmp = t_3; elseif (t_2 <= -143.0) tmp = t_1; elseif (t_2 <= 1000.0) tmp = x * ((z ^ y) / (y * a)); elseif (t_2 <= 5e+131) tmp = t_1; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+27], t$95$3, If[LessEqual[t$95$2, -143.0], t$95$1, If[LessEqual[t$95$2, 1000.0], N[(x * N[(N[Power[z, y], $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+131], t$95$1, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
t_2 := \left(t + -1\right) \cdot \log a\\
t_3 := x \cdot \frac{{a}^{\left(t + -1\right)}}{y}\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+27}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq -143:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 1000:\\
\;\;\;\;x \cdot \frac{{z}^{y}}{y \cdot a}\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+131}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -1e27 or 4.99999999999999995e131 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) Initial program 100.0%
Taylor expanded in b around 0
exp-sumN/A
lower-*.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
lower-+.f6465.8
Applied rewrites65.8%
Taylor expanded in y around 0
Applied rewrites83.1%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6483.1
Applied rewrites83.1%
if -1e27 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -143 or 1e3 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 4.99999999999999995e131Initial program 96.2%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
lower-*.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
lower-+.f64N/A
lower-*.f64N/A
lower-exp.f6462.7
Applied rewrites62.7%
Taylor expanded in t around 0
Applied rewrites78.8%
if -143 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 1e3Initial program 99.0%
Taylor expanded in t around 0
associate-/l*N/A
lower-*.f64N/A
exp-diffN/A
associate-/l/N/A
lower-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
rem-exp-logN/A
lower-*.f64N/A
lower-exp.f6482.2
Applied rewrites82.2%
Taylor expanded in b around 0
Applied rewrites81.2%
Final simplification81.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (+ t -1.0) (log a)))
(t_2 (/ (* x (exp (- (* t (log a)) b))) y)))
(if (<= t_1 -5e+30)
t_2
(if (<= t_1 2.5e+64) (* x (/ (/ (pow z y) a) (* y (exp b)))) 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(((t * log(a)) - b))) / y;
double tmp;
if (t_1 <= -5e+30) {
tmp = t_2;
} else if (t_1 <= 2.5e+64) {
tmp = x * ((pow(z, y) / 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 = (t + (-1.0d0)) * log(a)
t_2 = (x * exp(((t * log(a)) - b))) / y
if (t_1 <= (-5d+30)) then
tmp = t_2
else if (t_1 <= 2.5d+64) then
tmp = x * (((z ** y) / 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 = (t + -1.0) * Math.log(a);
double t_2 = (x * Math.exp(((t * Math.log(a)) - b))) / y;
double tmp;
if (t_1 <= -5e+30) {
tmp = t_2;
} else if (t_1 <= 2.5e+64) {
tmp = x * ((Math.pow(z, y) / a) / (y * Math.exp(b)));
} 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(((t * math.log(a)) - b))) / y tmp = 0 if t_1 <= -5e+30: tmp = t_2 elif t_1 <= 2.5e+64: tmp = x * ((math.pow(z, y) / a) / (y * math.exp(b))) 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(t * log(a)) - b))) / y) tmp = 0.0 if (t_1 <= -5e+30) tmp = t_2; elseif (t_1 <= 2.5e+64) tmp = Float64(x * Float64(Float64((z ^ y) / a) / Float64(y * exp(b)))); 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(((t * log(a)) - b))) / y; tmp = 0.0; if (t_1 <= -5e+30) tmp = t_2; elseif (t_1 <= 2.5e+64) tmp = x * (((z ^ y) / 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[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[Exp[N[(N[(t * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+30], t$95$2, If[LessEqual[t$95$1, 2.5e+64], N[(x * N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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^{t \cdot \log a - b}}{y}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+30}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 2.5 \cdot 10^{+64}:\\
\;\;\;\;x \cdot \frac{\frac{{z}^{y}}{a}}{y \cdot e^{b}}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -4.9999999999999998e30 or 2.5e64 < (*.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
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log91.5
Applied rewrites91.5%
if -4.9999999999999998e30 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 2.5e64Initial program 97.2%
Taylor expanded in t around 0
associate-/l*N/A
lower-*.f64N/A
exp-diffN/A
associate-/l/N/A
lower-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
rem-exp-logN/A
lower-*.f64N/A
lower-exp.f6486.5
Applied rewrites86.5%
Final simplification88.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (+ t -1.0) (log a)))
(t_2 (/ (* x (exp (- (* t (log a)) b))) y)))
(if (<= t_1 -5e+30)
t_2
(if (<= t_1 5e+131) (/ (* x (exp (- (* y (log z)) b))) 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(((t * log(a)) - b))) / y;
double tmp;
if (t_1 <= -5e+30) {
tmp = t_2;
} else if (t_1 <= 5e+131) {
tmp = (x * exp(((y * log(z)) - b))) / 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(((t * log(a)) - b))) / y
if (t_1 <= (-5d+30)) then
tmp = t_2
else if (t_1 <= 5d+131) then
tmp = (x * exp(((y * log(z)) - b))) / 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(((t * Math.log(a)) - b))) / y;
double tmp;
if (t_1 <= -5e+30) {
tmp = t_2;
} else if (t_1 <= 5e+131) {
tmp = (x * Math.exp(((y * Math.log(z)) - b))) / 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(((t * math.log(a)) - b))) / y tmp = 0 if t_1 <= -5e+30: tmp = t_2 elif t_1 <= 5e+131: tmp = (x * math.exp(((y * math.log(z)) - b))) / 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(t * log(a)) - b))) / y) tmp = 0.0 if (t_1 <= -5e+30) tmp = t_2; elseif (t_1 <= 5e+131) tmp = Float64(Float64(x * exp(Float64(Float64(y * log(z)) - b))) / 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(((t * log(a)) - b))) / y; tmp = 0.0; if (t_1 <= -5e+30) tmp = t_2; elseif (t_1 <= 5e+131) tmp = (x * exp(((y * log(z)) - b))) / 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[(t * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+30], t$95$2, If[LessEqual[t$95$1, 5e+131], N[(N[(x * N[Exp[N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $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^{t \cdot \log a - b}}{y}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+30}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+131}:\\
\;\;\;\;\frac{x \cdot e^{y \cdot \log z - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -4.9999999999999998e30 or 4.99999999999999995e131 < (*.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
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log93.0
Applied rewrites93.0%
if -4.9999999999999998e30 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 4.99999999999999995e131Initial program 97.5%
Taylor expanded in y around inf
lower-*.f64N/A
lower-log.f6483.3
Applied rewrites83.3%
Final simplification87.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (+ t -1.0) (log a))) (t_2 (* x (/ (pow a (+ t -1.0)) y))))
(if (<= t_1 -5e+107)
t_2
(if (<= t_1 5e+131) (/ (* x (exp (- (* y (log z)) b))) 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 * (pow(a, (t + -1.0)) / y);
double tmp;
if (t_1 <= -5e+107) {
tmp = t_2;
} else if (t_1 <= 5e+131) {
tmp = (x * exp(((y * log(z)) - b))) / 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 * ((a ** (t + (-1.0d0))) / y)
if (t_1 <= (-5d+107)) then
tmp = t_2
else if (t_1 <= 5d+131) then
tmp = (x * exp(((y * log(z)) - b))) / 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.pow(a, (t + -1.0)) / y);
double tmp;
if (t_1 <= -5e+107) {
tmp = t_2;
} else if (t_1 <= 5e+131) {
tmp = (x * Math.exp(((y * Math.log(z)) - b))) / 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.pow(a, (t + -1.0)) / y) tmp = 0 if t_1 <= -5e+107: tmp = t_2 elif t_1 <= 5e+131: tmp = (x * math.exp(((y * math.log(z)) - b))) / 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(x * Float64((a ^ Float64(t + -1.0)) / y)) tmp = 0.0 if (t_1 <= -5e+107) tmp = t_2; elseif (t_1 <= 5e+131) tmp = Float64(Float64(x * exp(Float64(Float64(y * log(z)) - b))) / 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 * ((a ^ (t + -1.0)) / y); tmp = 0.0; if (t_1 <= -5e+107) tmp = t_2; elseif (t_1 <= 5e+131) tmp = (x * exp(((y * log(z)) - b))) / 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[(x * N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+107], t$95$2, If[LessEqual[t$95$1, 5e+131], N[(N[(x * N[Exp[N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t + -1\right) \cdot \log a\\
t_2 := x \cdot \frac{{a}^{\left(t + -1\right)}}{y}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+107}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+131}:\\
\;\;\;\;\frac{x \cdot e^{y \cdot \log z - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -5.0000000000000002e107 or 4.99999999999999995e131 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) Initial program 100.0%
Taylor expanded in b around 0
exp-sumN/A
lower-*.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
lower-+.f6468.0
Applied rewrites68.0%
Taylor expanded in y around 0
Applied rewrites85.9%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6485.9
Applied rewrites85.9%
if -5.0000000000000002e107 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 4.99999999999999995e131Initial program 97.7%
Taylor expanded in y around inf
lower-*.f64N/A
lower-log.f6483.0
Applied rewrites83.0%
Final simplification83.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -2.7e+26)
(/ (* x (exp (- (* t (log a)) b))) y)
(if (<= b 2.9e-14)
(/ (* x (* (pow z y) (pow a (+ t -1.0)))) y)
(/ (* x (exp (- (* y (log z)) b))) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.7e+26) {
tmp = (x * exp(((t * log(a)) - b))) / y;
} else if (b <= 2.9e-14) {
tmp = (x * (pow(z, y) * pow(a, (t + -1.0)))) / y;
} else {
tmp = (x * exp(((y * log(z)) - 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 (b <= (-2.7d+26)) then
tmp = (x * exp(((t * log(a)) - b))) / y
else if (b <= 2.9d-14) then
tmp = (x * ((z ** y) * (a ** (t + (-1.0d0))))) / y
else
tmp = (x * exp(((y * log(z)) - 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 (b <= -2.7e+26) {
tmp = (x * Math.exp(((t * Math.log(a)) - b))) / y;
} else if (b <= 2.9e-14) {
tmp = (x * (Math.pow(z, y) * Math.pow(a, (t + -1.0)))) / y;
} else {
tmp = (x * Math.exp(((y * Math.log(z)) - b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -2.7e+26: tmp = (x * math.exp(((t * math.log(a)) - b))) / y elif b <= 2.9e-14: tmp = (x * (math.pow(z, y) * math.pow(a, (t + -1.0)))) / y else: tmp = (x * math.exp(((y * math.log(z)) - b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -2.7e+26) tmp = Float64(Float64(x * exp(Float64(Float64(t * log(a)) - b))) / y); elseif (b <= 2.9e-14) tmp = Float64(Float64(x * Float64((z ^ y) * (a ^ Float64(t + -1.0)))) / y); else tmp = Float64(Float64(x * exp(Float64(Float64(y * log(z)) - b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -2.7e+26) tmp = (x * exp(((t * log(a)) - b))) / y; elseif (b <= 2.9e-14) tmp = (x * ((z ^ y) * (a ^ (t + -1.0)))) / y; else tmp = (x * exp(((y * log(z)) - b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -2.7e+26], N[(N[(x * N[Exp[N[(N[(t * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 2.9e-14], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[Exp[N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.7 \cdot 10^{+26}:\\
\;\;\;\;\frac{x \cdot e^{t \cdot \log a - b}}{y}\\
\mathbf{elif}\;b \leq 2.9 \cdot 10^{-14}:\\
\;\;\;\;\frac{x \cdot \left({z}^{y} \cdot {a}^{\left(t + -1\right)}\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{y \cdot \log z - b}}{y}\\
\end{array}
\end{array}
if b < -2.7e26Initial program 100.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log93.0
Applied rewrites93.0%
if -2.7e26 < b < 2.9000000000000003e-14Initial program 97.0%
Taylor expanded in b around 0
exp-sumN/A
lower-*.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
lower-+.f6485.1
Applied rewrites85.1%
if 2.9000000000000003e-14 < b Initial program 100.0%
Taylor expanded in y around inf
lower-*.f64N/A
lower-log.f6487.0
Applied rewrites87.0%
Final simplification87.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (/ (exp (- b)) y))))
(if (<= b -0.0019)
t_1
(if (<= b 3.5e-144)
(/ 1.0 (/ (* y a) x))
(if (<= b 1.3e-21)
(/ x (* (* b b) (fma a (+ (/ y b) (/ y (* b b))) (* a (* y 0.5)))))
t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * (exp(-b) / y);
double tmp;
if (b <= -0.0019) {
tmp = t_1;
} else if (b <= 3.5e-144) {
tmp = 1.0 / ((y * a) / x);
} else if (b <= 1.3e-21) {
tmp = x / ((b * b) * fma(a, ((y / b) + (y / (b * b))), (a * (y * 0.5))));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(x * Float64(exp(Float64(-b)) / y)) tmp = 0.0 if (b <= -0.0019) tmp = t_1; elseif (b <= 3.5e-144) tmp = Float64(1.0 / Float64(Float64(y * a) / x)); elseif (b <= 1.3e-21) tmp = Float64(x / Float64(Float64(b * b) * fma(a, Float64(Float64(y / b) + Float64(y / Float64(b * b))), Float64(a * Float64(y * 0.5))))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -0.0019], t$95$1, If[LessEqual[b, 3.5e-144], N[(1.0 / N[(N[(y * a), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.3e-21], N[(x / N[(N[(b * b), $MachinePrecision] * N[(a * N[(N[(y / b), $MachinePrecision] + N[(y / N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(y * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{e^{-b}}{y}\\
\mathbf{if}\;b \leq -0.0019:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 3.5 \cdot 10^{-144}:\\
\;\;\;\;\frac{1}{\frac{y \cdot a}{x}}\\
\mathbf{elif}\;b \leq 1.3 \cdot 10^{-21}:\\
\;\;\;\;\frac{x}{\left(b \cdot b\right) \cdot \mathsf{fma}\left(a, \frac{y}{b} + \frac{y}{b \cdot b}, a \cdot \left(y \cdot 0.5\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -0.0019 or 1.30000000000000009e-21 < b Initial program 99.9%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log87.0
Applied rewrites87.0%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f6471.9
Applied rewrites71.9%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6471.9
Applied rewrites71.9%
if -0.0019 < b < 3.4999999999999998e-144Initial program 96.1%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
lower-*.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
lower-+.f64N/A
lower-*.f64N/A
lower-exp.f6472.5
Applied rewrites72.5%
Taylor expanded in t around 0
Applied rewrites43.4%
Taylor expanded in b around 0
Applied rewrites43.4%
Applied rewrites43.5%
if 3.4999999999999998e-144 < b < 1.30000000000000009e-21Initial program 99.4%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
lower-*.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
lower-+.f64N/A
lower-*.f64N/A
lower-exp.f6474.8
Applied rewrites74.8%
Taylor expanded in t around 0
Applied rewrites55.5%
Taylor expanded in b around 0
Applied rewrites55.5%
Taylor expanded in b around inf
Applied rewrites75.9%
Final simplification61.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -4.3e+55)
(* x (/ (exp (- b)) y))
(if (<= b 2.75e-9)
(* x (/ (pow a (+ t -1.0)) y))
(/ x (* a (* y (exp b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -4.3e+55) {
tmp = x * (exp(-b) / y);
} else if (b <= 2.75e-9) {
tmp = x * (pow(a, (t + -1.0)) / y);
} else {
tmp = x / (a * (y * exp(b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-4.3d+55)) then
tmp = x * (exp(-b) / y)
else if (b <= 2.75d-9) then
tmp = x * ((a ** (t + (-1.0d0))) / y)
else
tmp = x / (a * (y * exp(b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -4.3e+55) {
tmp = x * (Math.exp(-b) / y);
} else if (b <= 2.75e-9) {
tmp = x * (Math.pow(a, (t + -1.0)) / y);
} else {
tmp = x / (a * (y * Math.exp(b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -4.3e+55: tmp = x * (math.exp(-b) / y) elif b <= 2.75e-9: tmp = x * (math.pow(a, (t + -1.0)) / y) else: tmp = x / (a * (y * math.exp(b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -4.3e+55) tmp = Float64(x * Float64(exp(Float64(-b)) / y)); elseif (b <= 2.75e-9) tmp = Float64(x * Float64((a ^ Float64(t + -1.0)) / y)); else tmp = Float64(x / Float64(a * Float64(y * exp(b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -4.3e+55) tmp = x * (exp(-b) / y); elseif (b <= 2.75e-9) tmp = x * ((a ^ (t + -1.0)) / y); else tmp = x / (a * (y * exp(b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -4.3e+55], N[(x * N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.75e-9], N[(x * N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.3 \cdot 10^{+55}:\\
\;\;\;\;x \cdot \frac{e^{-b}}{y}\\
\mathbf{elif}\;b \leq 2.75 \cdot 10^{-9}:\\
\;\;\;\;x \cdot \frac{{a}^{\left(t + -1\right)}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\end{array}
\end{array}
if b < -4.2999999999999999e55Initial program 100.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log94.2
Applied rewrites94.2%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f6488.4
Applied rewrites88.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6488.4
Applied rewrites88.4%
if -4.2999999999999999e55 < b < 2.7499999999999998e-9Initial program 97.2%
Taylor expanded in b around 0
exp-sumN/A
lower-*.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
lower-+.f6483.9
Applied rewrites83.9%
Taylor expanded in y around 0
Applied rewrites73.3%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6475.3
Applied rewrites75.3%
if 2.7499999999999998e-9 < b Initial program 100.0%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
lower-*.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
lower-+.f64N/A
lower-*.f64N/A
lower-exp.f6451.0
Applied rewrites51.0%
Taylor expanded in t around 0
Applied rewrites71.2%
Final simplification76.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (/ (exp (- b)) y))))
(if (<= b -4.3e+55)
t_1
(if (<= b 2.75e-9) (* x (/ (pow a (+ t -1.0)) y)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * (exp(-b) / y);
double tmp;
if (b <= -4.3e+55) {
tmp = t_1;
} else if (b <= 2.75e-9) {
tmp = x * (pow(a, (t + -1.0)) / y);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x * (exp(-b) / y)
if (b <= (-4.3d+55)) then
tmp = t_1
else if (b <= 2.75d-9) then
tmp = x * ((a ** (t + (-1.0d0))) / y)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * (Math.exp(-b) / y);
double tmp;
if (b <= -4.3e+55) {
tmp = t_1;
} else if (b <= 2.75e-9) {
tmp = x * (Math.pow(a, (t + -1.0)) / y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * (math.exp(-b) / y) tmp = 0 if b <= -4.3e+55: tmp = t_1 elif b <= 2.75e-9: tmp = x * (math.pow(a, (t + -1.0)) / y) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * Float64(exp(Float64(-b)) / y)) tmp = 0.0 if (b <= -4.3e+55) tmp = t_1; elseif (b <= 2.75e-9) tmp = Float64(x * Float64((a ^ Float64(t + -1.0)) / y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * (exp(-b) / y); tmp = 0.0; if (b <= -4.3e+55) tmp = t_1; elseif (b <= 2.75e-9) tmp = x * ((a ^ (t + -1.0)) / y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -4.3e+55], t$95$1, If[LessEqual[b, 2.75e-9], N[(x * N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{e^{-b}}{y}\\
\mathbf{if}\;b \leq -4.3 \cdot 10^{+55}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 2.75 \cdot 10^{-9}:\\
\;\;\;\;x \cdot \frac{{a}^{\left(t + -1\right)}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -4.2999999999999999e55 or 2.7499999999999998e-9 < b Initial program 100.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log89.0
Applied rewrites89.0%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f6478.0
Applied rewrites78.0%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6478.0
Applied rewrites78.0%
if -4.2999999999999999e55 < b < 2.7499999999999998e-9Initial program 97.2%
Taylor expanded in b around 0
exp-sumN/A
lower-*.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
lower-+.f6483.9
Applied rewrites83.9%
Taylor expanded in y around 0
Applied rewrites73.3%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6475.3
Applied rewrites75.3%
Final simplification76.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (/ (exp (- b)) y))))
(if (<= b -9.8e+42)
t_1
(if (<= b 2.75e-9) (* (pow a (+ t -1.0)) (/ x y)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * (exp(-b) / y);
double tmp;
if (b <= -9.8e+42) {
tmp = t_1;
} else if (b <= 2.75e-9) {
tmp = pow(a, (t + -1.0)) * (x / y);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x * (exp(-b) / y)
if (b <= (-9.8d+42)) then
tmp = t_1
else if (b <= 2.75d-9) then
tmp = (a ** (t + (-1.0d0))) * (x / y)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * (Math.exp(-b) / y);
double tmp;
if (b <= -9.8e+42) {
tmp = t_1;
} else if (b <= 2.75e-9) {
tmp = Math.pow(a, (t + -1.0)) * (x / y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * (math.exp(-b) / y) tmp = 0 if b <= -9.8e+42: tmp = t_1 elif b <= 2.75e-9: tmp = math.pow(a, (t + -1.0)) * (x / y) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * Float64(exp(Float64(-b)) / y)) tmp = 0.0 if (b <= -9.8e+42) tmp = t_1; elseif (b <= 2.75e-9) tmp = Float64((a ^ Float64(t + -1.0)) * Float64(x / y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * (exp(-b) / y); tmp = 0.0; if (b <= -9.8e+42) tmp = t_1; elseif (b <= 2.75e-9) tmp = (a ^ (t + -1.0)) * (x / y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -9.8e+42], t$95$1, If[LessEqual[b, 2.75e-9], N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{e^{-b}}{y}\\
\mathbf{if}\;b \leq -9.8 \cdot 10^{+42}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 2.75 \cdot 10^{-9}:\\
\;\;\;\;{a}^{\left(t + -1\right)} \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -9.8000000000000004e42 or 2.7499999999999998e-9 < b Initial program 100.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log89.1
Applied rewrites89.1%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f6478.2
Applied rewrites78.2%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6478.2
Applied rewrites78.2%
if -9.8000000000000004e42 < b < 2.7499999999999998e-9Initial program 97.1%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
lower-*.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
lower-+.f64N/A
lower-*.f64N/A
lower-exp.f6471.6
Applied rewrites71.6%
Taylor expanded in b around 0
Applied rewrites67.8%
Final simplification72.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= b 1.45e-279)
(/
(fma
b
(fma
b
(fma b (* (/ x y) -0.16666666666666666) (* (/ x y) 0.5))
(/ x (- y)))
(/ x y))
a)
(/ x (* (- y) (fma a (- -1.0 b) (* -0.5 (* a (* b b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 1.45e-279) {
tmp = fma(b, fma(b, fma(b, ((x / y) * -0.16666666666666666), ((x / y) * 0.5)), (x / -y)), (x / y)) / a;
} else {
tmp = x / (-y * fma(a, (-1.0 - b), (-0.5 * (a * (b * b)))));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 1.45e-279) tmp = Float64(fma(b, fma(b, fma(b, Float64(Float64(x / y) * -0.16666666666666666), Float64(Float64(x / y) * 0.5)), Float64(x / Float64(-y))), Float64(x / y)) / a); else tmp = Float64(x / Float64(Float64(-y) * fma(a, Float64(-1.0 - b), Float64(-0.5 * Float64(a * Float64(b * b)))))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 1.45e-279], N[(N[(b * N[(b * N[(b * N[(N[(x / y), $MachinePrecision] * -0.16666666666666666), $MachinePrecision] + N[(N[(x / y), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision] + N[(x / (-y)), $MachinePrecision]), $MachinePrecision] + N[(x / y), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(x / N[((-y) * N[(a * N[(-1.0 - b), $MachinePrecision] + N[(-0.5 * N[(a * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.45 \cdot 10^{-279}:\\
\;\;\;\;\frac{\mathsf{fma}\left(b, \mathsf{fma}\left(b, \mathsf{fma}\left(b, \frac{x}{y} \cdot -0.16666666666666666, \frac{x}{y} \cdot 0.5\right), \frac{x}{-y}\right), \frac{x}{y}\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(-y\right) \cdot \mathsf{fma}\left(a, -1 - b, -0.5 \cdot \left(a \cdot \left(b \cdot b\right)\right)\right)}\\
\end{array}
\end{array}
if b < 1.45e-279Initial program 98.1%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
lower-*.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
lower-+.f64N/A
lower-*.f64N/A
lower-exp.f6467.2
Applied rewrites67.2%
Taylor expanded in t around 0
Applied rewrites60.2%
Taylor expanded in b around 0
Applied rewrites49.0%
Taylor expanded in a around 0
Applied rewrites58.3%
if 1.45e-279 < b Initial program 98.8%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
lower-*.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
lower-+.f64N/A
lower-*.f64N/A
lower-exp.f6461.4
Applied rewrites61.4%
Taylor expanded in t around 0
Applied rewrites59.1%
Taylor expanded in b around 0
Applied rewrites47.0%
Taylor expanded in y around -inf
Applied rewrites49.9%
Final simplification54.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -2.7e+40)
(/
(fma
b
(fma
b
(fma 0.5 (/ x a) (/ (* -0.16666666666666666 (* x b)) a))
(/ x (- a)))
(/ x a))
y)
(/ x (* (- y) (fma a (- -1.0 b) (* -0.5 (* a (* b b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.7e+40) {
tmp = fma(b, fma(b, fma(0.5, (x / a), ((-0.16666666666666666 * (x * b)) / a)), (x / -a)), (x / a)) / y;
} else {
tmp = x / (-y * fma(a, (-1.0 - b), (-0.5 * (a * (b * b)))));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -2.7e+40) tmp = Float64(fma(b, fma(b, fma(0.5, Float64(x / a), Float64(Float64(-0.16666666666666666 * Float64(x * b)) / a)), Float64(x / Float64(-a))), Float64(x / a)) / y); else tmp = Float64(x / Float64(Float64(-y) * fma(a, Float64(-1.0 - b), Float64(-0.5 * Float64(a * Float64(b * b)))))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -2.7e+40], N[(N[(b * N[(b * N[(0.5 * N[(x / a), $MachinePrecision] + N[(N[(-0.16666666666666666 * N[(x * b), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] + N[(x / (-a)), $MachinePrecision]), $MachinePrecision] + N[(x / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x / N[((-y) * N[(a * N[(-1.0 - b), $MachinePrecision] + N[(-0.5 * N[(a * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.7 \cdot 10^{+40}:\\
\;\;\;\;\frac{\mathsf{fma}\left(b, \mathsf{fma}\left(b, \mathsf{fma}\left(0.5, \frac{x}{a}, \frac{-0.16666666666666666 \cdot \left(x \cdot b\right)}{a}\right), \frac{x}{-a}\right), \frac{x}{a}\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(-y\right) \cdot \mathsf{fma}\left(a, -1 - b, -0.5 \cdot \left(a \cdot \left(b \cdot b\right)\right)\right)}\\
\end{array}
\end{array}
if b < -2.70000000000000009e40Initial program 100.0%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
lower-*.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
lower-+.f64N/A
lower-*.f64N/A
lower-exp.f6461.6
Applied rewrites61.6%
Taylor expanded in t around 0
Applied rewrites88.6%
Taylor expanded in b around 0
Applied rewrites66.2%
Taylor expanded in y around 0
Applied rewrites79.5%
if -2.70000000000000009e40 < b Initial program 98.1%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
lower-*.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
lower-+.f64N/A
lower-*.f64N/A
lower-exp.f6465.1
Applied rewrites65.1%
Taylor expanded in t around 0
Applied rewrites52.3%
Taylor expanded in b around 0
Applied rewrites43.9%
Taylor expanded in y around -inf
Applied rewrites46.2%
Final simplification53.0%
(FPCore (x y z t a b) :precision binary64 (if (<= b -2.7e+40) (/ (* -0.16666666666666666 (* b (* x (* b b)))) (* y a)) (/ x (* (- y) (fma a (- -1.0 b) (* -0.5 (* a (* b b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.7e+40) {
tmp = (-0.16666666666666666 * (b * (x * (b * b)))) / (y * a);
} else {
tmp = x / (-y * fma(a, (-1.0 - b), (-0.5 * (a * (b * b)))));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -2.7e+40) tmp = Float64(Float64(-0.16666666666666666 * Float64(b * Float64(x * Float64(b * b)))) / Float64(y * a)); else tmp = Float64(x / Float64(Float64(-y) * fma(a, Float64(-1.0 - b), Float64(-0.5 * Float64(a * Float64(b * b)))))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -2.7e+40], N[(N[(-0.16666666666666666 * N[(b * N[(x * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision], N[(x / N[((-y) * N[(a * N[(-1.0 - b), $MachinePrecision] + N[(-0.5 * N[(a * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.7 \cdot 10^{+40}:\\
\;\;\;\;\frac{-0.16666666666666666 \cdot \left(b \cdot \left(x \cdot \left(b \cdot b\right)\right)\right)}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(-y\right) \cdot \mathsf{fma}\left(a, -1 - b, -0.5 \cdot \left(a \cdot \left(b \cdot b\right)\right)\right)}\\
\end{array}
\end{array}
if b < -2.70000000000000009e40Initial program 100.0%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
lower-*.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
lower-+.f64N/A
lower-*.f64N/A
lower-exp.f6461.6
Applied rewrites61.6%
Taylor expanded in t around 0
Applied rewrites88.6%
Taylor expanded in b around 0
Applied rewrites66.2%
Taylor expanded in b around inf
Applied rewrites77.3%
if -2.70000000000000009e40 < b Initial program 98.1%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
lower-*.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
lower-+.f64N/A
lower-*.f64N/A
lower-exp.f6465.1
Applied rewrites65.1%
Taylor expanded in t around 0
Applied rewrites52.3%
Taylor expanded in b around 0
Applied rewrites43.9%
Taylor expanded in y around -inf
Applied rewrites46.2%
Final simplification52.5%
(FPCore (x y z t a b) :precision binary64 (if (<= b -5.2e+42) (/ (* -0.16666666666666666 (* b (* x (* b b)))) (* y a)) (/ x (* a (fma y (fma 0.5 (* b b) b) y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -5.2e+42) {
tmp = (-0.16666666666666666 * (b * (x * (b * b)))) / (y * a);
} else {
tmp = x / (a * fma(y, fma(0.5, (b * b), b), y));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -5.2e+42) tmp = Float64(Float64(-0.16666666666666666 * Float64(b * Float64(x * Float64(b * b)))) / Float64(y * a)); else tmp = Float64(x / Float64(a * fma(y, fma(0.5, Float64(b * b), b), y))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -5.2e+42], N[(N[(-0.16666666666666666 * N[(b * N[(x * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y * N[(0.5 * N[(b * b), $MachinePrecision] + b), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.2 \cdot 10^{+42}:\\
\;\;\;\;\frac{-0.16666666666666666 \cdot \left(b \cdot \left(x \cdot \left(b \cdot b\right)\right)\right)}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(0.5, b \cdot b, b\right), y\right)}\\
\end{array}
\end{array}
if b < -5.1999999999999998e42Initial program 100.0%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
lower-*.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
lower-+.f64N/A
lower-*.f64N/A
lower-exp.f6461.6
Applied rewrites61.6%
Taylor expanded in t around 0
Applied rewrites88.6%
Taylor expanded in b around 0
Applied rewrites66.2%
Taylor expanded in b around inf
Applied rewrites77.3%
if -5.1999999999999998e42 < b Initial program 98.1%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
lower-*.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
lower-+.f64N/A
lower-*.f64N/A
lower-exp.f6465.1
Applied rewrites65.1%
Taylor expanded in t around 0
Applied rewrites52.3%
Taylor expanded in b around 0
Applied rewrites34.9%
Taylor expanded in b around 0
Applied rewrites44.9%
Final simplification51.4%
(FPCore (x y z t a b) :precision binary64 (if (<= b 1.25e+85) (/ 1.0 (/ (* y a) x)) (/ x (* a (* 0.5 (* b (* y b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 1.25e+85) {
tmp = 1.0 / ((y * a) / x);
} else {
tmp = x / (a * (0.5 * (b * (y * b))));
}
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.25d+85) then
tmp = 1.0d0 / ((y * a) / x)
else
tmp = x / (a * (0.5d0 * (b * (y * b))))
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.25e+85) {
tmp = 1.0 / ((y * a) / x);
} else {
tmp = x / (a * (0.5 * (b * (y * b))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 1.25e+85: tmp = 1.0 / ((y * a) / x) else: tmp = x / (a * (0.5 * (b * (y * b)))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 1.25e+85) tmp = Float64(1.0 / Float64(Float64(y * a) / x)); else tmp = Float64(x / Float64(a * Float64(0.5 * Float64(b * Float64(y * b))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= 1.25e+85) tmp = 1.0 / ((y * a) / x); else tmp = x / (a * (0.5 * (b * (y * b)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 1.25e+85], N[(1.0 / N[(N[(y * a), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(0.5 * N[(b * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.25 \cdot 10^{+85}:\\
\;\;\;\;\frac{1}{\frac{y \cdot a}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(0.5 \cdot \left(b \cdot \left(y \cdot b\right)\right)\right)}\\
\end{array}
\end{array}
if b < 1.25e85Initial program 98.1%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
lower-*.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
lower-+.f64N/A
lower-*.f64N/A
lower-exp.f6467.1
Applied rewrites67.1%
Taylor expanded in t around 0
Applied rewrites56.8%
Taylor expanded in b around 0
Applied rewrites36.6%
Applied rewrites36.6%
if 1.25e85 < b Initial program 100.0%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
lower-*.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
lower-+.f64N/A
lower-*.f64N/A
lower-exp.f6450.2
Applied rewrites50.2%
Taylor expanded in t around 0
Applied rewrites74.2%
Taylor expanded in b around 0
Applied rewrites63.1%
Taylor expanded in b around inf
Applied rewrites63.1%
Final simplification41.0%
(FPCore (x y z t a b) :precision binary64 (if (<= b 2.35e+120) (/ 1.0 (/ (* y a) x)) (/ x (* a (fma y b y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 2.35e+120) {
tmp = 1.0 / ((y * a) / x);
} else {
tmp = x / (a * fma(y, b, y));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 2.35e+120) tmp = Float64(1.0 / Float64(Float64(y * a) / x)); else tmp = Float64(x / Float64(a * fma(y, b, y))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 2.35e+120], N[(1.0 / N[(N[(y * a), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y * b + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 2.35 \cdot 10^{+120}:\\
\;\;\;\;\frac{1}{\frac{y \cdot a}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \mathsf{fma}\left(y, b, y\right)}\\
\end{array}
\end{array}
if b < 2.34999999999999997e120Initial program 98.2%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
lower-*.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
lower-+.f64N/A
lower-*.f64N/A
lower-exp.f6467.0
Applied rewrites67.0%
Taylor expanded in t around 0
Applied rewrites56.9%
Taylor expanded in b around 0
Applied rewrites36.3%
Applied rewrites36.3%
if 2.34999999999999997e120 < b Initial program 100.0%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
lower-*.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
lower-+.f64N/A
lower-*.f64N/A
lower-exp.f6448.9
Applied rewrites48.9%
Taylor expanded in t around 0
Applied rewrites76.1%
Taylor expanded in b around 0
Applied rewrites41.2%
(FPCore (x y z t a b) :precision binary64 (if (<= b 2.35e+120) (/ x (* y a)) (/ x (* a (fma y b y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 2.35e+120) {
tmp = x / (y * a);
} else {
tmp = x / (a * fma(y, b, y));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 2.35e+120) tmp = Float64(x / Float64(y * a)); else tmp = Float64(x / Float64(a * fma(y, b, y))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 2.35e+120], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y * b + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 2.35 \cdot 10^{+120}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \mathsf{fma}\left(y, b, y\right)}\\
\end{array}
\end{array}
if b < 2.34999999999999997e120Initial program 98.2%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
lower-*.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
lower-+.f64N/A
lower-*.f64N/A
lower-exp.f6467.0
Applied rewrites67.0%
Taylor expanded in t around 0
Applied rewrites56.9%
Taylor expanded in b around 0
Applied rewrites36.3%
if 2.34999999999999997e120 < b Initial program 100.0%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
lower-*.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
lower-+.f64N/A
lower-*.f64N/A
lower-exp.f6448.9
Applied rewrites48.9%
Taylor expanded in t around 0
Applied rewrites76.1%
Taylor expanded in b around 0
Applied rewrites41.2%
(FPCore (x y z t a b) :precision binary64 (/ x (* y a)))
double code(double x, double y, double z, double t, double a, double b) {
return x / (y * a);
}
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 / (y * a)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x / (y * a);
}
def code(x, y, z, t, a, b): return x / (y * a)
function code(x, y, z, t, a, b) return Float64(x / Float64(y * a)) end
function tmp = code(x, y, z, t, a, b) tmp = x / (y * a); end
code[x_, y_, z_, t_, a_, b_] := N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y \cdot a}
\end{array}
Initial program 98.5%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
lower-*.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
lower-+.f64N/A
lower-*.f64N/A
lower-exp.f6464.4
Applied rewrites64.4%
Taylor expanded in t around 0
Applied rewrites59.7%
Taylor expanded in b around 0
Applied rewrites33.4%
(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 2024222
(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))