
(FPCore (x y z t a b) :precision binary64 (* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b))));
}
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)) + (a * (log((1.0d0 - z)) - b))))
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)) + (a * (Math.log((1.0 - z)) - b))));
}
def code(x, y, z, t, a, b): return x * math.exp(((y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b))))
function code(x, y, z, t, a, b) return Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))))) end
function tmp = code(x, y, z, t, a, b) tmp = x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b)))); end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}
\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)) (* a (- (log (- 1.0 z)) b))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b))));
}
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)) + (a * (log((1.0d0 - z)) - b))))
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)) + (a * (Math.log((1.0 - z)) - b))));
}
def code(x, y, z, t, a, b): return x * math.exp(((y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b))))
function code(x, y, z, t, a, b) return Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))))) end
function tmp = code(x, y, z, t, a, b) tmp = x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b)))); end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}
\end{array}
(FPCore (x y z t a b) :precision binary64 (* x (exp (fma y (- (log z) t) (* a (- (log1p (- z)) b))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(fma(y, (log(z) - t), (a * (log1p(-z) - b))));
}
function code(x, y, z, t, a, b) return Float64(x * exp(fma(y, Float64(log(z) - t), Float64(a * Float64(log1p(Float64(-z)) - b))))) end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] + N[(a * N[(N[Log[1 + (-z)], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{\mathsf{fma}\left(y, \log z - t, a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)\right)}
\end{array}
Initial program 97.7%
fma-def98.5%
sub-neg98.5%
log1p-def100.0%
Simplified100.0%
Final simplification100.0%
(FPCore (x y z t a b) :precision binary64 (* x (exp (+ (* a (- (log (- 1.0 z)) b)) (* y (- (log z) t))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(((a * (log((1.0 - z)) - b)) + (y * (log(z) - t))));
}
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(((a * (log((1.0d0 - z)) - b)) + (y * (log(z) - t))))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x * Math.exp(((a * (Math.log((1.0 - z)) - b)) + (y * (Math.log(z) - t))));
}
def code(x, y, z, t, a, b): return x * math.exp(((a * (math.log((1.0 - z)) - b)) + (y * (math.log(z) - t))))
function code(x, y, z, t, a, b) return Float64(x * exp(Float64(Float64(a * Float64(log(Float64(1.0 - z)) - b)) + Float64(y * Float64(log(z) - t))))) end
function tmp = code(x, y, z, t, a, b) tmp = x * exp(((a * (log((1.0 - z)) - b)) + (y * (log(z) - t)))); end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision] + N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right) + y \cdot \left(\log z - t\right)}
\end{array}
Initial program 97.7%
Final simplification97.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -0.00091) (not (<= y 1.7e+37))) (* x (exp (* y (- (log z) t)))) (* x (exp (- (* a (- b)) (* y t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -0.00091) || !(y <= 1.7e+37)) {
tmp = x * exp((y * (log(z) - t)));
} else {
tmp = x * exp(((a * -b) - (y * t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-0.00091d0)) .or. (.not. (y <= 1.7d+37))) then
tmp = x * exp((y * (log(z) - t)))
else
tmp = x * exp(((a * -b) - (y * t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -0.00091) || !(y <= 1.7e+37)) {
tmp = x * Math.exp((y * (Math.log(z) - t)));
} else {
tmp = x * Math.exp(((a * -b) - (y * t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -0.00091) or not (y <= 1.7e+37): tmp = x * math.exp((y * (math.log(z) - t))) else: tmp = x * math.exp(((a * -b) - (y * t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -0.00091) || !(y <= 1.7e+37)) tmp = Float64(x * exp(Float64(y * Float64(log(z) - t)))); else tmp = Float64(x * exp(Float64(Float64(a * Float64(-b)) - Float64(y * t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -0.00091) || ~((y <= 1.7e+37))) tmp = x * exp((y * (log(z) - t))); else tmp = x * exp(((a * -b) - (y * t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -0.00091], N[Not[LessEqual[y, 1.7e+37]], $MachinePrecision]], N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(N[(a * (-b)), $MachinePrecision] - N[(y * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.00091 \lor \neg \left(y \leq 1.7 \cdot 10^{+37}\right):\\
\;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right) - y \cdot t}\\
\end{array}
\end{array}
if y < -9.1e-4 or 1.70000000000000003e37 < y Initial program 98.3%
Taylor expanded in y around inf 93.5%
if -9.1e-4 < y < 1.70000000000000003e37Initial program 97.1%
fma-def97.1%
sub-neg97.1%
log1p-def100.0%
Simplified100.0%
Taylor expanded in z around 0 96.4%
Taylor expanded in t around inf 95.7%
neg-mul-195.7%
Simplified95.7%
Final simplification94.6%
(FPCore (x y z t a b) :precision binary64 (* x (exp (- (* y (- (log z) t)) (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(((y * (log(z) - t)) - (a * b)));
}
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)) - (a * b)))
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)) - (a * b)));
}
def code(x, y, z, t, a, b): return x * math.exp(((y * (math.log(z) - t)) - (a * b)))
function code(x, y, z, t, a, b) return Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) - Float64(a * b)))) end
function tmp = code(x, y, z, t, a, b) tmp = x * exp(((y * (log(z) - t)) - (a * b))); end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] - N[(a * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{y \cdot \left(\log z - t\right) - a \cdot b}
\end{array}
Initial program 97.7%
fma-def98.5%
sub-neg98.5%
log1p-def100.0%
Simplified100.0%
Taylor expanded in z around 0 97.3%
Final simplification97.3%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -6.5e+217)
(* x (exp (* y (- t))))
(if (or (<= y -1.9e-6) (not (<= y 1.25e+56)))
(* x (pow z y))
(* x (exp (* (- a) (+ z b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -6.5e+217) {
tmp = x * exp((y * -t));
} else if ((y <= -1.9e-6) || !(y <= 1.25e+56)) {
tmp = x * pow(z, y);
} else {
tmp = x * exp((-a * (z + 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 (y <= (-6.5d+217)) then
tmp = x * exp((y * -t))
else if ((y <= (-1.9d-6)) .or. (.not. (y <= 1.25d+56))) then
tmp = x * (z ** y)
else
tmp = x * exp((-a * (z + 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 (y <= -6.5e+217) {
tmp = x * Math.exp((y * -t));
} else if ((y <= -1.9e-6) || !(y <= 1.25e+56)) {
tmp = x * Math.pow(z, y);
} else {
tmp = x * Math.exp((-a * (z + b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -6.5e+217: tmp = x * math.exp((y * -t)) elif (y <= -1.9e-6) or not (y <= 1.25e+56): tmp = x * math.pow(z, y) else: tmp = x * math.exp((-a * (z + b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -6.5e+217) tmp = Float64(x * exp(Float64(y * Float64(-t)))); elseif ((y <= -1.9e-6) || !(y <= 1.25e+56)) tmp = Float64(x * (z ^ y)); else tmp = Float64(x * exp(Float64(Float64(-a) * Float64(z + b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -6.5e+217) tmp = x * exp((y * -t)); elseif ((y <= -1.9e-6) || ~((y <= 1.25e+56))) tmp = x * (z ^ y); else tmp = x * exp((-a * (z + b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -6.5e+217], N[(x * N[Exp[N[(y * (-t)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -1.9e-6], N[Not[LessEqual[y, 1.25e+56]], $MachinePrecision]], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[((-a) * N[(z + b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.5 \cdot 10^{+217}:\\
\;\;\;\;x \cdot e^{y \cdot \left(-t\right)}\\
\mathbf{elif}\;y \leq -1.9 \cdot 10^{-6} \lor \neg \left(y \leq 1.25 \cdot 10^{+56}\right):\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{\left(-a\right) \cdot \left(z + b\right)}\\
\end{array}
\end{array}
if y < -6.50000000000000005e217Initial program 100.0%
Taylor expanded in t around inf 90.8%
mul-1-neg90.8%
distribute-rgt-neg-out90.8%
Simplified90.8%
if -6.50000000000000005e217 < y < -1.9e-6 or 1.25000000000000006e56 < y Initial program 99.0%
Taylor expanded in y around inf 94.0%
Taylor expanded in t around 0 77.2%
if -1.9e-6 < y < 1.25000000000000006e56Initial program 96.4%
Taylor expanded in y around 0 79.6%
sub-neg79.6%
neg-mul-179.6%
log1p-def83.2%
neg-mul-183.2%
Simplified83.2%
Taylor expanded in z around 0 83.2%
neg-mul-183.2%
+-commutative83.2%
neg-mul-183.2%
unsub-neg83.2%
Simplified83.2%
Final simplification81.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1.65e-6) (not (<= t 6.2e-142))) (* x (exp (- (* a (- b)) (* y t)))) (* x (pow z y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.65e-6) || !(t <= 6.2e-142)) {
tmp = x * exp(((a * -b) - (y * t)));
} else {
tmp = x * pow(z, 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 ((t <= (-1.65d-6)) .or. (.not. (t <= 6.2d-142))) then
tmp = x * exp(((a * -b) - (y * t)))
else
tmp = x * (z ** 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 ((t <= -1.65e-6) || !(t <= 6.2e-142)) {
tmp = x * Math.exp(((a * -b) - (y * t)));
} else {
tmp = x * Math.pow(z, y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.65e-6) or not (t <= 6.2e-142): tmp = x * math.exp(((a * -b) - (y * t))) else: tmp = x * math.pow(z, y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1.65e-6) || !(t <= 6.2e-142)) tmp = Float64(x * exp(Float64(Float64(a * Float64(-b)) - Float64(y * t)))); else tmp = Float64(x * (z ^ y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -1.65e-6) || ~((t <= 6.2e-142))) tmp = x * exp(((a * -b) - (y * t))); else tmp = x * (z ^ y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1.65e-6], N[Not[LessEqual[t, 6.2e-142]], $MachinePrecision]], N[(x * N[Exp[N[(N[(a * (-b)), $MachinePrecision] - N[(y * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.65 \cdot 10^{-6} \lor \neg \left(t \leq 6.2 \cdot 10^{-142}\right):\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right) - y \cdot t}\\
\mathbf{else}:\\
\;\;\;\;x \cdot {z}^{y}\\
\end{array}
\end{array}
if t < -1.65000000000000008e-6 or 6.2e-142 < t Initial program 96.6%
fma-def97.7%
sub-neg97.7%
log1p-def100.0%
Simplified100.0%
Taylor expanded in z around 0 96.0%
Taylor expanded in t around inf 94.3%
neg-mul-194.3%
Simplified94.3%
if -1.65000000000000008e-6 < t < 6.2e-142Initial program 100.0%
Taylor expanded in y around inf 76.9%
Taylor expanded in t around 0 76.9%
Final simplification88.7%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -1e+218)
(* x (exp (* y (- t))))
(if (or (<= y -1.9e-6) (not (<= y 5.3e+35)))
(* x (pow z y))
(* x (exp (* a (- b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1e+218) {
tmp = x * exp((y * -t));
} else if ((y <= -1.9e-6) || !(y <= 5.3e+35)) {
tmp = x * pow(z, y);
} else {
tmp = x * exp((a * -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 (y <= (-1d+218)) then
tmp = x * exp((y * -t))
else if ((y <= (-1.9d-6)) .or. (.not. (y <= 5.3d+35))) then
tmp = x * (z ** y)
else
tmp = x * exp((a * -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 (y <= -1e+218) {
tmp = x * Math.exp((y * -t));
} else if ((y <= -1.9e-6) || !(y <= 5.3e+35)) {
tmp = x * Math.pow(z, y);
} else {
tmp = x * Math.exp((a * -b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1e+218: tmp = x * math.exp((y * -t)) elif (y <= -1.9e-6) or not (y <= 5.3e+35): tmp = x * math.pow(z, y) else: tmp = x * math.exp((a * -b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1e+218) tmp = Float64(x * exp(Float64(y * Float64(-t)))); elseif ((y <= -1.9e-6) || !(y <= 5.3e+35)) tmp = Float64(x * (z ^ y)); else tmp = Float64(x * exp(Float64(a * Float64(-b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1e+218) tmp = x * exp((y * -t)); elseif ((y <= -1.9e-6) || ~((y <= 5.3e+35))) tmp = x * (z ^ y); else tmp = x * exp((a * -b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1e+218], N[(x * N[Exp[N[(y * (-t)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -1.9e-6], N[Not[LessEqual[y, 5.3e+35]], $MachinePrecision]], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(a * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{+218}:\\
\;\;\;\;x \cdot e^{y \cdot \left(-t\right)}\\
\mathbf{elif}\;y \leq -1.9 \cdot 10^{-6} \lor \neg \left(y \leq 5.3 \cdot 10^{+35}\right):\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\
\end{array}
\end{array}
if y < -1.00000000000000008e218Initial program 100.0%
Taylor expanded in t around inf 90.8%
mul-1-neg90.8%
distribute-rgt-neg-out90.8%
Simplified90.8%
if -1.00000000000000008e218 < y < -1.9e-6 or 5.30000000000000009e35 < y Initial program 98.0%
Taylor expanded in y around inf 93.2%
Taylor expanded in t around 0 76.7%
if -1.9e-6 < y < 5.30000000000000009e35Initial program 97.0%
Taylor expanded in b around inf 79.3%
associate-*r*79.3%
*-commutative79.3%
neg-mul-179.3%
Simplified79.3%
Final simplification79.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.7e-13) (not (<= y 6.5e-9))) (* x (pow z y)) (* x (exp (* a (- z))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.7e-13) || !(y <= 6.5e-9)) {
tmp = x * pow(z, y);
} else {
tmp = x * exp((a * -z));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-1.7d-13)) .or. (.not. (y <= 6.5d-9))) then
tmp = x * (z ** y)
else
tmp = x * exp((a * -z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.7e-13) || !(y <= 6.5e-9)) {
tmp = x * Math.pow(z, y);
} else {
tmp = x * Math.exp((a * -z));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.7e-13) or not (y <= 6.5e-9): tmp = x * math.pow(z, y) else: tmp = x * math.exp((a * -z)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.7e-13) || !(y <= 6.5e-9)) tmp = Float64(x * (z ^ y)); else tmp = Float64(x * exp(Float64(a * Float64(-z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.7e-13) || ~((y <= 6.5e-9))) tmp = x * (z ^ y); else tmp = x * exp((a * -z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.7e-13], N[Not[LessEqual[y, 6.5e-9]], $MachinePrecision]], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(a * (-z)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.7 \cdot 10^{-13} \lor \neg \left(y \leq 6.5 \cdot 10^{-9}\right):\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-z\right)}\\
\end{array}
\end{array}
if y < -1.70000000000000008e-13 or 6.5000000000000003e-9 < y Initial program 98.5%
Taylor expanded in y around inf 91.8%
Taylor expanded in t around 0 71.0%
if -1.70000000000000008e-13 < y < 6.5000000000000003e-9Initial program 96.8%
Taylor expanded in y around 0 80.7%
sub-neg80.7%
neg-mul-180.7%
log1p-def83.9%
neg-mul-183.9%
Simplified83.9%
Taylor expanded in z around 0 83.9%
neg-mul-183.9%
+-commutative83.9%
neg-mul-183.9%
unsub-neg83.9%
Simplified83.9%
Taylor expanded in b around 0 49.7%
mul-1-neg49.7%
distribute-rgt-neg-out49.7%
Simplified49.7%
Final simplification60.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.8e-6) (not (<= y 1.62e+35))) (* x (pow z y)) (* x (exp (* a (- b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.8e-6) || !(y <= 1.62e+35)) {
tmp = x * pow(z, y);
} else {
tmp = x * exp((a * -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 ((y <= (-1.8d-6)) .or. (.not. (y <= 1.62d+35))) then
tmp = x * (z ** y)
else
tmp = x * exp((a * -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 ((y <= -1.8e-6) || !(y <= 1.62e+35)) {
tmp = x * Math.pow(z, y);
} else {
tmp = x * Math.exp((a * -b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.8e-6) or not (y <= 1.62e+35): tmp = x * math.pow(z, y) else: tmp = x * math.exp((a * -b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.8e-6) || !(y <= 1.62e+35)) tmp = Float64(x * (z ^ y)); else tmp = Float64(x * exp(Float64(a * Float64(-b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.8e-6) || ~((y <= 1.62e+35))) tmp = x * (z ^ y); else tmp = x * exp((a * -b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.8e-6], N[Not[LessEqual[y, 1.62e+35]], $MachinePrecision]], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(a * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{-6} \lor \neg \left(y \leq 1.62 \cdot 10^{+35}\right):\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\
\end{array}
\end{array}
if y < -1.79999999999999992e-6 or 1.62e35 < y Initial program 98.4%
Taylor expanded in y around inf 93.5%
Taylor expanded in t around 0 73.4%
if -1.79999999999999992e-6 < y < 1.62e35Initial program 97.0%
Taylor expanded in b around inf 79.3%
associate-*r*79.3%
*-commutative79.3%
neg-mul-179.3%
Simplified79.3%
Final simplification76.5%
(FPCore (x y z t a b) :precision binary64 (if (<= t -450.0) (* x (* (* (* z a) (* z a)) 0.5)) (* x (pow z y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -450.0) {
tmp = x * (((z * a) * (z * a)) * 0.5);
} else {
tmp = x * pow(z, 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 (t <= (-450.0d0)) then
tmp = x * (((z * a) * (z * a)) * 0.5d0)
else
tmp = x * (z ** 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 (t <= -450.0) {
tmp = x * (((z * a) * (z * a)) * 0.5);
} else {
tmp = x * Math.pow(z, y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -450.0: tmp = x * (((z * a) * (z * a)) * 0.5) else: tmp = x * math.pow(z, y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -450.0) tmp = Float64(x * Float64(Float64(Float64(z * a) * Float64(z * a)) * 0.5)); else tmp = Float64(x * (z ^ y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -450.0) tmp = x * (((z * a) * (z * a)) * 0.5); else tmp = x * (z ^ y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -450.0], N[(x * N[(N[(N[(z * a), $MachinePrecision] * N[(z * a), $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -450:\\
\;\;\;\;x \cdot \left(\left(\left(z \cdot a\right) \cdot \left(z \cdot a\right)\right) \cdot 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot {z}^{y}\\
\end{array}
\end{array}
if t < -450Initial program 98.5%
Taylor expanded in y around 0 54.7%
sub-neg54.7%
neg-mul-154.7%
log1p-def56.2%
neg-mul-156.2%
Simplified56.2%
Taylor expanded in z around 0 56.2%
neg-mul-156.2%
+-commutative56.2%
neg-mul-156.2%
unsub-neg56.2%
Simplified56.2%
Taylor expanded in a around 0 30.0%
associate-+r+30.0%
mul-1-neg30.0%
+-commutative30.0%
unsub-neg30.0%
fma-def30.0%
+-commutative30.0%
unpow230.0%
Simplified30.0%
Taylor expanded in z around inf 39.8%
*-commutative39.8%
unpow239.8%
unpow239.8%
swap-sqr38.7%
Simplified38.7%
if -450 < t Initial program 97.4%
Taylor expanded in y around inf 75.3%
Taylor expanded in t around 0 66.0%
Final simplification59.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (* x (- y)))))
(if (<= y -3.2e+265)
t_1
(if (<= y -1.6e+199)
(* x (* (* (* z a) (* z a)) 0.5))
(if (<= y -1.1e+160)
t_1
(if (<= y 8.2e-76)
(* x (+ 1.0 (- (* 0.5 (* (* a a) (* b b))) (* a b))))
(* (* a (* z (* z a))) (* x 0.5))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * (x * -y);
double tmp;
if (y <= -3.2e+265) {
tmp = t_1;
} else if (y <= -1.6e+199) {
tmp = x * (((z * a) * (z * a)) * 0.5);
} else if (y <= -1.1e+160) {
tmp = t_1;
} else if (y <= 8.2e-76) {
tmp = x * (1.0 + ((0.5 * ((a * a) * (b * b))) - (a * b)));
} else {
tmp = (a * (z * (z * a))) * (x * 0.5);
}
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 = t * (x * -y)
if (y <= (-3.2d+265)) then
tmp = t_1
else if (y <= (-1.6d+199)) then
tmp = x * (((z * a) * (z * a)) * 0.5d0)
else if (y <= (-1.1d+160)) then
tmp = t_1
else if (y <= 8.2d-76) then
tmp = x * (1.0d0 + ((0.5d0 * ((a * a) * (b * b))) - (a * b)))
else
tmp = (a * (z * (z * a))) * (x * 0.5d0)
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 * (x * -y);
double tmp;
if (y <= -3.2e+265) {
tmp = t_1;
} else if (y <= -1.6e+199) {
tmp = x * (((z * a) * (z * a)) * 0.5);
} else if (y <= -1.1e+160) {
tmp = t_1;
} else if (y <= 8.2e-76) {
tmp = x * (1.0 + ((0.5 * ((a * a) * (b * b))) - (a * b)));
} else {
tmp = (a * (z * (z * a))) * (x * 0.5);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t * (x * -y) tmp = 0 if y <= -3.2e+265: tmp = t_1 elif y <= -1.6e+199: tmp = x * (((z * a) * (z * a)) * 0.5) elif y <= -1.1e+160: tmp = t_1 elif y <= 8.2e-76: tmp = x * (1.0 + ((0.5 * ((a * a) * (b * b))) - (a * b))) else: tmp = (a * (z * (z * a))) * (x * 0.5) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t * Float64(x * Float64(-y))) tmp = 0.0 if (y <= -3.2e+265) tmp = t_1; elseif (y <= -1.6e+199) tmp = Float64(x * Float64(Float64(Float64(z * a) * Float64(z * a)) * 0.5)); elseif (y <= -1.1e+160) tmp = t_1; elseif (y <= 8.2e-76) tmp = Float64(x * Float64(1.0 + Float64(Float64(0.5 * Float64(Float64(a * a) * Float64(b * b))) - Float64(a * b)))); else tmp = Float64(Float64(a * Float64(z * Float64(z * a))) * Float64(x * 0.5)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t * (x * -y); tmp = 0.0; if (y <= -3.2e+265) tmp = t_1; elseif (y <= -1.6e+199) tmp = x * (((z * a) * (z * a)) * 0.5); elseif (y <= -1.1e+160) tmp = t_1; elseif (y <= 8.2e-76) tmp = x * (1.0 + ((0.5 * ((a * a) * (b * b))) - (a * b))); else tmp = (a * (z * (z * a))) * (x * 0.5); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(x * (-y)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.2e+265], t$95$1, If[LessEqual[y, -1.6e+199], N[(x * N[(N[(N[(z * a), $MachinePrecision] * N[(z * a), $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.1e+160], t$95$1, If[LessEqual[y, 8.2e-76], N[(x * N[(1.0 + N[(N[(0.5 * N[(N[(a * a), $MachinePrecision] * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * N[(z * N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x * 0.5), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(x \cdot \left(-y\right)\right)\\
\mathbf{if}\;y \leq -3.2 \cdot 10^{+265}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.6 \cdot 10^{+199}:\\
\;\;\;\;x \cdot \left(\left(\left(z \cdot a\right) \cdot \left(z \cdot a\right)\right) \cdot 0.5\right)\\
\mathbf{elif}\;y \leq -1.1 \cdot 10^{+160}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 8.2 \cdot 10^{-76}:\\
\;\;\;\;x \cdot \left(1 + \left(0.5 \cdot \left(\left(a \cdot a\right) \cdot \left(b \cdot b\right)\right) - a \cdot b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(a \cdot \left(z \cdot \left(z \cdot a\right)\right)\right) \cdot \left(x \cdot 0.5\right)\\
\end{array}
\end{array}
if y < -3.20000000000000014e265 or -1.60000000000000003e199 < y < -1.09999999999999996e160Initial program 100.0%
Taylor expanded in t around inf 70.9%
mul-1-neg70.9%
distribute-rgt-neg-out70.9%
Simplified70.9%
Taylor expanded in y around 0 51.5%
+-commutative51.5%
mul-1-neg51.5%
unsub-neg51.5%
associate-*r*51.5%
*-commutative51.5%
Simplified51.5%
Taylor expanded in t around inf 51.4%
mul-1-neg51.4%
associate-*r*51.3%
*-commutative51.3%
associate-*r*65.5%
distribute-rgt-neg-in65.5%
distribute-rgt-neg-in65.5%
Simplified65.5%
if -3.20000000000000014e265 < y < -1.60000000000000003e199Initial program 94.7%
Taylor expanded in y around 0 48.6%
sub-neg48.6%
neg-mul-148.6%
log1p-def48.6%
neg-mul-148.6%
Simplified48.6%
Taylor expanded in z around 0 48.6%
neg-mul-148.6%
+-commutative48.6%
neg-mul-148.6%
unsub-neg48.6%
Simplified48.6%
Taylor expanded in a around 0 27.7%
associate-+r+27.7%
mul-1-neg27.7%
+-commutative27.7%
unsub-neg27.7%
fma-def27.7%
+-commutative27.7%
unpow227.7%
Simplified27.7%
Taylor expanded in z around inf 53.3%
*-commutative53.3%
unpow253.3%
unpow253.3%
swap-sqr48.4%
Simplified48.4%
if -1.09999999999999996e160 < y < 8.1999999999999996e-76Initial program 97.3%
Taylor expanded in y around 0 73.0%
sub-neg73.0%
neg-mul-173.0%
log1p-def75.0%
neg-mul-175.0%
Simplified75.0%
Taylor expanded in z around 0 75.0%
neg-mul-175.0%
+-commutative75.0%
neg-mul-175.0%
unsub-neg75.0%
Simplified75.0%
Taylor expanded in a around 0 46.6%
associate-+r+46.6%
mul-1-neg46.6%
+-commutative46.6%
unsub-neg46.6%
fma-def46.6%
+-commutative46.6%
unpow246.6%
Simplified46.6%
Taylor expanded in z around 0 45.2%
associate--l+45.2%
*-commutative45.2%
unpow245.2%
unpow245.2%
Simplified45.2%
if 8.1999999999999996e-76 < y Initial program 98.6%
Taylor expanded in y around 0 37.6%
sub-neg37.6%
neg-mul-137.6%
log1p-def40.4%
neg-mul-140.4%
Simplified40.4%
Taylor expanded in z around 0 40.4%
neg-mul-140.4%
+-commutative40.4%
neg-mul-140.4%
unsub-neg40.4%
Simplified40.4%
Taylor expanded in a around 0 16.3%
associate-+r+16.3%
mul-1-neg16.3%
+-commutative16.3%
unsub-neg16.3%
fma-def16.3%
+-commutative16.3%
unpow216.3%
Simplified16.3%
Taylor expanded in z around inf 47.4%
*-commutative47.4%
associate-*r*48.8%
associate-*l*48.8%
unpow248.8%
unpow248.8%
swap-sqr48.0%
associate-*l*49.2%
Simplified49.2%
Final simplification48.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (* (* (* z a) (* z a)) 0.5))) (t_2 (* t (* x (- y)))))
(if (<= y -2.05e+265)
t_2
(if (<= y -5e+196)
t_1
(if (<= y -3.9e+160)
t_2
(if (<= y -9.5e-34)
(* x (* 0.5 (* (* a a) (* b b))))
(if (<= y 1.12e-64) (* x (- 1.0 (* a (+ z b)))) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * (((z * a) * (z * a)) * 0.5);
double t_2 = t * (x * -y);
double tmp;
if (y <= -2.05e+265) {
tmp = t_2;
} else if (y <= -5e+196) {
tmp = t_1;
} else if (y <= -3.9e+160) {
tmp = t_2;
} else if (y <= -9.5e-34) {
tmp = x * (0.5 * ((a * a) * (b * b)));
} else if (y <= 1.12e-64) {
tmp = x * (1.0 - (a * (z + b)));
} 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 = x * (((z * a) * (z * a)) * 0.5d0)
t_2 = t * (x * -y)
if (y <= (-2.05d+265)) then
tmp = t_2
else if (y <= (-5d+196)) then
tmp = t_1
else if (y <= (-3.9d+160)) then
tmp = t_2
else if (y <= (-9.5d-34)) then
tmp = x * (0.5d0 * ((a * a) * (b * b)))
else if (y <= 1.12d-64) then
tmp = x * (1.0d0 - (a * (z + b)))
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 * (((z * a) * (z * a)) * 0.5);
double t_2 = t * (x * -y);
double tmp;
if (y <= -2.05e+265) {
tmp = t_2;
} else if (y <= -5e+196) {
tmp = t_1;
} else if (y <= -3.9e+160) {
tmp = t_2;
} else if (y <= -9.5e-34) {
tmp = x * (0.5 * ((a * a) * (b * b)));
} else if (y <= 1.12e-64) {
tmp = x * (1.0 - (a * (z + b)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * (((z * a) * (z * a)) * 0.5) t_2 = t * (x * -y) tmp = 0 if y <= -2.05e+265: tmp = t_2 elif y <= -5e+196: tmp = t_1 elif y <= -3.9e+160: tmp = t_2 elif y <= -9.5e-34: tmp = x * (0.5 * ((a * a) * (b * b))) elif y <= 1.12e-64: tmp = x * (1.0 - (a * (z + b))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * Float64(Float64(Float64(z * a) * Float64(z * a)) * 0.5)) t_2 = Float64(t * Float64(x * Float64(-y))) tmp = 0.0 if (y <= -2.05e+265) tmp = t_2; elseif (y <= -5e+196) tmp = t_1; elseif (y <= -3.9e+160) tmp = t_2; elseif (y <= -9.5e-34) tmp = Float64(x * Float64(0.5 * Float64(Float64(a * a) * Float64(b * b)))); elseif (y <= 1.12e-64) tmp = Float64(x * Float64(1.0 - Float64(a * Float64(z + b)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * (((z * a) * (z * a)) * 0.5); t_2 = t * (x * -y); tmp = 0.0; if (y <= -2.05e+265) tmp = t_2; elseif (y <= -5e+196) tmp = t_1; elseif (y <= -3.9e+160) tmp = t_2; elseif (y <= -9.5e-34) tmp = x * (0.5 * ((a * a) * (b * b))); elseif (y <= 1.12e-64) tmp = x * (1.0 - (a * (z + b))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(N[(N[(z * a), $MachinePrecision] * N[(z * a), $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(x * (-y)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.05e+265], t$95$2, If[LessEqual[y, -5e+196], t$95$1, If[LessEqual[y, -3.9e+160], t$95$2, If[LessEqual[y, -9.5e-34], N[(x * N[(0.5 * N[(N[(a * a), $MachinePrecision] * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.12e-64], N[(x * N[(1.0 - N[(a * N[(z + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(\left(\left(z \cdot a\right) \cdot \left(z \cdot a\right)\right) \cdot 0.5\right)\\
t_2 := t \cdot \left(x \cdot \left(-y\right)\right)\\
\mathbf{if}\;y \leq -2.05 \cdot 10^{+265}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -5 \cdot 10^{+196}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -3.9 \cdot 10^{+160}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -9.5 \cdot 10^{-34}:\\
\;\;\;\;x \cdot \left(0.5 \cdot \left(\left(a \cdot a\right) \cdot \left(b \cdot b\right)\right)\right)\\
\mathbf{elif}\;y \leq 1.12 \cdot 10^{-64}:\\
\;\;\;\;x \cdot \left(1 - a \cdot \left(z + b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -2.0500000000000002e265 or -4.9999999999999998e196 < y < -3.90000000000000007e160Initial program 100.0%
Taylor expanded in t around inf 70.9%
mul-1-neg70.9%
distribute-rgt-neg-out70.9%
Simplified70.9%
Taylor expanded in y around 0 51.5%
+-commutative51.5%
mul-1-neg51.5%
unsub-neg51.5%
associate-*r*51.5%
*-commutative51.5%
Simplified51.5%
Taylor expanded in t around inf 51.4%
mul-1-neg51.4%
associate-*r*51.3%
*-commutative51.3%
associate-*r*65.5%
distribute-rgt-neg-in65.5%
distribute-rgt-neg-in65.5%
Simplified65.5%
if -2.0500000000000002e265 < y < -4.9999999999999998e196 or 1.12e-64 < y Initial program 97.7%
Taylor expanded in y around 0 39.8%
sub-neg39.8%
neg-mul-139.8%
log1p-def42.1%
neg-mul-142.1%
Simplified42.1%
Taylor expanded in z around 0 42.1%
neg-mul-142.1%
+-commutative42.1%
neg-mul-142.1%
unsub-neg42.1%
Simplified42.1%
Taylor expanded in a around 0 19.3%
associate-+r+19.3%
mul-1-neg19.3%
+-commutative19.3%
unsub-neg19.3%
fma-def19.3%
+-commutative19.3%
unpow219.3%
Simplified19.3%
Taylor expanded in z around inf 51.4%
*-commutative51.4%
unpow251.4%
unpow251.4%
swap-sqr49.6%
Simplified49.6%
if -3.90000000000000007e160 < y < -9.49999999999999985e-34Initial program 100.0%
Taylor expanded in y around 0 47.3%
sub-neg47.3%
neg-mul-147.3%
log1p-def44.9%
neg-mul-144.9%
Simplified44.9%
Taylor expanded in z around 0 44.9%
neg-mul-144.9%
+-commutative44.9%
neg-mul-144.9%
unsub-neg44.9%
Simplified44.9%
Taylor expanded in a around 0 35.4%
associate-+r+35.4%
mul-1-neg35.4%
+-commutative35.4%
unsub-neg35.4%
fma-def35.4%
+-commutative35.4%
unpow235.4%
Simplified35.4%
Taylor expanded in b around inf 36.7%
*-commutative36.7%
unpow236.7%
unpow236.7%
Simplified36.7%
if -9.49999999999999985e-34 < y < 1.12e-64Initial program 96.3%
Taylor expanded in y around 0 82.2%
sub-neg82.2%
neg-mul-182.2%
log1p-def85.9%
neg-mul-185.9%
Simplified85.9%
Taylor expanded in z around 0 85.9%
neg-mul-185.9%
+-commutative85.9%
neg-mul-185.9%
unsub-neg85.9%
Simplified85.9%
Taylor expanded in a around 0 46.0%
mul-1-neg46.0%
+-commutative46.0%
unsub-neg46.0%
Simplified46.0%
Final simplification47.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (* x (- y)))))
(if (<= y -3.4e+268)
t_1
(if (<= y -4.2e+196)
(* x (* (* (* z a) (* z a)) 0.5))
(if (<= y -2.55e+160)
t_1
(if (<= y -1.38e-33)
(* x (* 0.5 (* (* a a) (* b b))))
(if (<= y 1.12e-64)
(* x (- 1.0 (* a (+ z b))))
(* (* a (* z (* z a))) (* x 0.5)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * (x * -y);
double tmp;
if (y <= -3.4e+268) {
tmp = t_1;
} else if (y <= -4.2e+196) {
tmp = x * (((z * a) * (z * a)) * 0.5);
} else if (y <= -2.55e+160) {
tmp = t_1;
} else if (y <= -1.38e-33) {
tmp = x * (0.5 * ((a * a) * (b * b)));
} else if (y <= 1.12e-64) {
tmp = x * (1.0 - (a * (z + b)));
} else {
tmp = (a * (z * (z * a))) * (x * 0.5);
}
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 = t * (x * -y)
if (y <= (-3.4d+268)) then
tmp = t_1
else if (y <= (-4.2d+196)) then
tmp = x * (((z * a) * (z * a)) * 0.5d0)
else if (y <= (-2.55d+160)) then
tmp = t_1
else if (y <= (-1.38d-33)) then
tmp = x * (0.5d0 * ((a * a) * (b * b)))
else if (y <= 1.12d-64) then
tmp = x * (1.0d0 - (a * (z + b)))
else
tmp = (a * (z * (z * a))) * (x * 0.5d0)
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 * (x * -y);
double tmp;
if (y <= -3.4e+268) {
tmp = t_1;
} else if (y <= -4.2e+196) {
tmp = x * (((z * a) * (z * a)) * 0.5);
} else if (y <= -2.55e+160) {
tmp = t_1;
} else if (y <= -1.38e-33) {
tmp = x * (0.5 * ((a * a) * (b * b)));
} else if (y <= 1.12e-64) {
tmp = x * (1.0 - (a * (z + b)));
} else {
tmp = (a * (z * (z * a))) * (x * 0.5);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t * (x * -y) tmp = 0 if y <= -3.4e+268: tmp = t_1 elif y <= -4.2e+196: tmp = x * (((z * a) * (z * a)) * 0.5) elif y <= -2.55e+160: tmp = t_1 elif y <= -1.38e-33: tmp = x * (0.5 * ((a * a) * (b * b))) elif y <= 1.12e-64: tmp = x * (1.0 - (a * (z + b))) else: tmp = (a * (z * (z * a))) * (x * 0.5) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t * Float64(x * Float64(-y))) tmp = 0.0 if (y <= -3.4e+268) tmp = t_1; elseif (y <= -4.2e+196) tmp = Float64(x * Float64(Float64(Float64(z * a) * Float64(z * a)) * 0.5)); elseif (y <= -2.55e+160) tmp = t_1; elseif (y <= -1.38e-33) tmp = Float64(x * Float64(0.5 * Float64(Float64(a * a) * Float64(b * b)))); elseif (y <= 1.12e-64) tmp = Float64(x * Float64(1.0 - Float64(a * Float64(z + b)))); else tmp = Float64(Float64(a * Float64(z * Float64(z * a))) * Float64(x * 0.5)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t * (x * -y); tmp = 0.0; if (y <= -3.4e+268) tmp = t_1; elseif (y <= -4.2e+196) tmp = x * (((z * a) * (z * a)) * 0.5); elseif (y <= -2.55e+160) tmp = t_1; elseif (y <= -1.38e-33) tmp = x * (0.5 * ((a * a) * (b * b))); elseif (y <= 1.12e-64) tmp = x * (1.0 - (a * (z + b))); else tmp = (a * (z * (z * a))) * (x * 0.5); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(x * (-y)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.4e+268], t$95$1, If[LessEqual[y, -4.2e+196], N[(x * N[(N[(N[(z * a), $MachinePrecision] * N[(z * a), $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.55e+160], t$95$1, If[LessEqual[y, -1.38e-33], N[(x * N[(0.5 * N[(N[(a * a), $MachinePrecision] * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.12e-64], N[(x * N[(1.0 - N[(a * N[(z + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * N[(z * N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x * 0.5), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(x \cdot \left(-y\right)\right)\\
\mathbf{if}\;y \leq -3.4 \cdot 10^{+268}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -4.2 \cdot 10^{+196}:\\
\;\;\;\;x \cdot \left(\left(\left(z \cdot a\right) \cdot \left(z \cdot a\right)\right) \cdot 0.5\right)\\
\mathbf{elif}\;y \leq -2.55 \cdot 10^{+160}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.38 \cdot 10^{-33}:\\
\;\;\;\;x \cdot \left(0.5 \cdot \left(\left(a \cdot a\right) \cdot \left(b \cdot b\right)\right)\right)\\
\mathbf{elif}\;y \leq 1.12 \cdot 10^{-64}:\\
\;\;\;\;x \cdot \left(1 - a \cdot \left(z + b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(a \cdot \left(z \cdot \left(z \cdot a\right)\right)\right) \cdot \left(x \cdot 0.5\right)\\
\end{array}
\end{array}
if y < -3.4000000000000003e268 or -4.20000000000000029e196 < y < -2.5500000000000001e160Initial program 100.0%
Taylor expanded in t around inf 70.9%
mul-1-neg70.9%
distribute-rgt-neg-out70.9%
Simplified70.9%
Taylor expanded in y around 0 51.5%
+-commutative51.5%
mul-1-neg51.5%
unsub-neg51.5%
associate-*r*51.5%
*-commutative51.5%
Simplified51.5%
Taylor expanded in t around inf 51.4%
mul-1-neg51.4%
associate-*r*51.3%
*-commutative51.3%
associate-*r*65.5%
distribute-rgt-neg-in65.5%
distribute-rgt-neg-in65.5%
Simplified65.5%
if -3.4000000000000003e268 < y < -4.20000000000000029e196Initial program 94.7%
Taylor expanded in y around 0 48.6%
sub-neg48.6%
neg-mul-148.6%
log1p-def48.6%
neg-mul-148.6%
Simplified48.6%
Taylor expanded in z around 0 48.6%
neg-mul-148.6%
+-commutative48.6%
neg-mul-148.6%
unsub-neg48.6%
Simplified48.6%
Taylor expanded in a around 0 27.7%
associate-+r+27.7%
mul-1-neg27.7%
+-commutative27.7%
unsub-neg27.7%
fma-def27.7%
+-commutative27.7%
unpow227.7%
Simplified27.7%
Taylor expanded in z around inf 53.3%
*-commutative53.3%
unpow253.3%
unpow253.3%
swap-sqr48.4%
Simplified48.4%
if -2.5500000000000001e160 < y < -1.38e-33Initial program 100.0%
Taylor expanded in y around 0 47.3%
sub-neg47.3%
neg-mul-147.3%
log1p-def44.9%
neg-mul-144.9%
Simplified44.9%
Taylor expanded in z around 0 44.9%
neg-mul-144.9%
+-commutative44.9%
neg-mul-144.9%
unsub-neg44.9%
Simplified44.9%
Taylor expanded in a around 0 35.4%
associate-+r+35.4%
mul-1-neg35.4%
+-commutative35.4%
unsub-neg35.4%
fma-def35.4%
+-commutative35.4%
unpow235.4%
Simplified35.4%
Taylor expanded in b around inf 36.7%
*-commutative36.7%
unpow236.7%
unpow236.7%
Simplified36.7%
if -1.38e-33 < y < 1.12e-64Initial program 96.3%
Taylor expanded in y around 0 82.2%
sub-neg82.2%
neg-mul-182.2%
log1p-def85.9%
neg-mul-185.9%
Simplified85.9%
Taylor expanded in z around 0 85.9%
neg-mul-185.9%
+-commutative85.9%
neg-mul-185.9%
unsub-neg85.9%
Simplified85.9%
Taylor expanded in a around 0 46.0%
mul-1-neg46.0%
+-commutative46.0%
unsub-neg46.0%
Simplified46.0%
if 1.12e-64 < y Initial program 98.5%
Taylor expanded in y around 0 37.4%
sub-neg37.4%
neg-mul-137.4%
log1p-def40.3%
neg-mul-140.3%
Simplified40.3%
Taylor expanded in z around 0 40.3%
neg-mul-140.3%
+-commutative40.3%
neg-mul-140.3%
unsub-neg40.3%
Simplified40.3%
Taylor expanded in a around 0 16.9%
associate-+r+16.9%
mul-1-neg16.9%
+-commutative16.9%
unsub-neg16.9%
fma-def16.9%
+-commutative16.9%
unpow216.9%
Simplified16.9%
Taylor expanded in z around inf 49.4%
*-commutative49.4%
associate-*r*50.9%
associate-*l*50.9%
unpow250.9%
unpow250.9%
swap-sqr49.9%
associate-*l*51.3%
Simplified51.3%
Final simplification47.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -3.7e+159)
(* t (* x (- y)))
(if (or (<= y -1.38e-33) (not (<= y 0.0058)))
(* x (* 0.5 (* (* a a) (* b b))))
(* x (- 1.0 (* a (+ z b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -3.7e+159) {
tmp = t * (x * -y);
} else if ((y <= -1.38e-33) || !(y <= 0.0058)) {
tmp = x * (0.5 * ((a * a) * (b * b)));
} else {
tmp = x * (1.0 - (a * (z + 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 (y <= (-3.7d+159)) then
tmp = t * (x * -y)
else if ((y <= (-1.38d-33)) .or. (.not. (y <= 0.0058d0))) then
tmp = x * (0.5d0 * ((a * a) * (b * b)))
else
tmp = x * (1.0d0 - (a * (z + 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 (y <= -3.7e+159) {
tmp = t * (x * -y);
} else if ((y <= -1.38e-33) || !(y <= 0.0058)) {
tmp = x * (0.5 * ((a * a) * (b * b)));
} else {
tmp = x * (1.0 - (a * (z + b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -3.7e+159: tmp = t * (x * -y) elif (y <= -1.38e-33) or not (y <= 0.0058): tmp = x * (0.5 * ((a * a) * (b * b))) else: tmp = x * (1.0 - (a * (z + b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -3.7e+159) tmp = Float64(t * Float64(x * Float64(-y))); elseif ((y <= -1.38e-33) || !(y <= 0.0058)) tmp = Float64(x * Float64(0.5 * Float64(Float64(a * a) * Float64(b * b)))); else tmp = Float64(x * Float64(1.0 - Float64(a * Float64(z + b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -3.7e+159) tmp = t * (x * -y); elseif ((y <= -1.38e-33) || ~((y <= 0.0058))) tmp = x * (0.5 * ((a * a) * (b * b))); else tmp = x * (1.0 - (a * (z + b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -3.7e+159], N[(t * N[(x * (-y)), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -1.38e-33], N[Not[LessEqual[y, 0.0058]], $MachinePrecision]], N[(x * N[(0.5 * N[(N[(a * a), $MachinePrecision] * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(a * N[(z + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.7 \cdot 10^{+159}:\\
\;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\
\mathbf{elif}\;y \leq -1.38 \cdot 10^{-33} \lor \neg \left(y \leq 0.0058\right):\\
\;\;\;\;x \cdot \left(0.5 \cdot \left(\left(a \cdot a\right) \cdot \left(b \cdot b\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - a \cdot \left(z + b\right)\right)\\
\end{array}
\end{array}
if y < -3.70000000000000001e159Initial program 97.4%
Taylor expanded in t around inf 72.5%
mul-1-neg72.5%
distribute-rgt-neg-out72.5%
Simplified72.5%
Taylor expanded in y around 0 37.5%
+-commutative37.5%
mul-1-neg37.5%
unsub-neg37.5%
associate-*r*37.4%
*-commutative37.4%
Simplified37.4%
Taylor expanded in t around inf 37.3%
mul-1-neg37.3%
associate-*r*37.3%
*-commutative37.3%
associate-*r*44.5%
distribute-rgt-neg-in44.5%
distribute-rgt-neg-in44.5%
Simplified44.5%
if -3.70000000000000001e159 < y < -1.38e-33 or 0.0058 < y Initial program 99.0%
Taylor expanded in y around 0 36.6%
sub-neg36.6%
neg-mul-136.6%
log1p-def37.6%
neg-mul-137.6%
Simplified37.6%
Taylor expanded in z around 0 37.6%
neg-mul-137.6%
+-commutative37.6%
neg-mul-137.6%
unsub-neg37.6%
Simplified37.6%
Taylor expanded in a around 0 25.5%
associate-+r+25.5%
mul-1-neg25.5%
+-commutative25.5%
unsub-neg25.5%
fma-def25.5%
+-commutative25.5%
unpow225.5%
Simplified25.5%
Taylor expanded in b around inf 40.6%
*-commutative40.6%
unpow240.6%
unpow240.6%
Simplified40.6%
if -1.38e-33 < y < 0.0058Initial program 96.6%
Taylor expanded in y around 0 82.2%
sub-neg82.2%
neg-mul-182.2%
log1p-def85.5%
neg-mul-185.5%
Simplified85.5%
Taylor expanded in z around 0 85.5%
neg-mul-185.5%
+-commutative85.5%
neg-mul-185.5%
unsub-neg85.5%
Simplified85.5%
Taylor expanded in a around 0 42.7%
mul-1-neg42.7%
+-commutative42.7%
unsub-neg42.7%
Simplified42.7%
Final simplification42.2%
(FPCore (x y z t a b) :precision binary64 (if (<= y -4.3e+108) (* t (* x (- y))) (if (<= y 6.6e+35) (* x (- 1.0 (* a b))) (* x (* y (- t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -4.3e+108) {
tmp = t * (x * -y);
} else if (y <= 6.6e+35) {
tmp = x * (1.0 - (a * b));
} else {
tmp = x * (y * -t);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-4.3d+108)) then
tmp = t * (x * -y)
else if (y <= 6.6d+35) then
tmp = x * (1.0d0 - (a * b))
else
tmp = x * (y * -t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -4.3e+108) {
tmp = t * (x * -y);
} else if (y <= 6.6e+35) {
tmp = x * (1.0 - (a * b));
} else {
tmp = x * (y * -t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -4.3e+108: tmp = t * (x * -y) elif y <= 6.6e+35: tmp = x * (1.0 - (a * b)) else: tmp = x * (y * -t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -4.3e+108) tmp = Float64(t * Float64(x * Float64(-y))); elseif (y <= 6.6e+35) tmp = Float64(x * Float64(1.0 - Float64(a * b))); else tmp = Float64(x * Float64(y * Float64(-t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -4.3e+108) tmp = t * (x * -y); elseif (y <= 6.6e+35) tmp = x * (1.0 - (a * b)); else tmp = x * (y * -t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -4.3e+108], N[(t * N[(x * (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.6e+35], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(y * (-t)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.3 \cdot 10^{+108}:\\
\;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\
\mathbf{elif}\;y \leq 6.6 \cdot 10^{+35}:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\
\end{array}
\end{array}
if y < -4.29999999999999996e108Initial program 98.1%
Taylor expanded in t around inf 71.0%
mul-1-neg71.0%
distribute-rgt-neg-out71.0%
Simplified71.0%
Taylor expanded in y around 0 33.2%
+-commutative33.2%
mul-1-neg33.2%
unsub-neg33.2%
associate-*r*34.9%
*-commutative34.9%
Simplified34.9%
Taylor expanded in t around inf 33.1%
mul-1-neg33.1%
associate-*r*34.8%
*-commutative34.8%
associate-*r*38.4%
distribute-rgt-neg-in38.4%
distribute-rgt-neg-in38.4%
Simplified38.4%
if -4.29999999999999996e108 < y < 6.6000000000000003e35Initial program 97.4%
Taylor expanded in b around inf 74.2%
associate-*r*74.2%
*-commutative74.2%
neg-mul-174.2%
Simplified74.2%
Taylor expanded in b around 0 37.1%
mul-1-neg37.1%
unsub-neg37.1%
Simplified37.1%
if 6.6000000000000003e35 < y Initial program 98.0%
Taylor expanded in t around inf 66.8%
mul-1-neg66.8%
distribute-rgt-neg-out66.8%
Simplified66.8%
Taylor expanded in y around 0 16.4%
+-commutative16.4%
mul-1-neg16.4%
unsub-neg16.4%
associate-*r*20.1%
*-commutative20.1%
Simplified20.1%
Taylor expanded in t around inf 20.3%
mul-1-neg20.3%
associate-*r*22.1%
*-commutative22.1%
associate-*r*18.4%
distribute-rgt-neg-in18.4%
distribute-rgt-neg-in18.4%
Simplified18.4%
Taylor expanded in t around 0 20.3%
mul-1-neg20.3%
*-commutative20.3%
distribute-rgt-neg-in20.3%
*-commutative20.3%
associate-*l*22.1%
Simplified22.1%
Final simplification34.4%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1.7e-37) (* t (* x (- y))) (if (<= y 1.25e+51) x (* x (* y (- t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.7e-37) {
tmp = t * (x * -y);
} else if (y <= 1.25e+51) {
tmp = x;
} else {
tmp = x * (y * -t);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-1.7d-37)) then
tmp = t * (x * -y)
else if (y <= 1.25d+51) then
tmp = x
else
tmp = x * (y * -t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.7e-37) {
tmp = t * (x * -y);
} else if (y <= 1.25e+51) {
tmp = x;
} else {
tmp = x * (y * -t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.7e-37: tmp = t * (x * -y) elif y <= 1.25e+51: tmp = x else: tmp = x * (y * -t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.7e-37) tmp = Float64(t * Float64(x * Float64(-y))); elseif (y <= 1.25e+51) tmp = x; else tmp = Float64(x * Float64(y * Float64(-t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.7e-37) tmp = t * (x * -y); elseif (y <= 1.25e+51) tmp = x; else tmp = x * (y * -t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.7e-37], N[(t * N[(x * (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.25e+51], x, N[(x * N[(y * (-t)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.7 \cdot 10^{-37}:\\
\;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{+51}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\
\end{array}
\end{array}
if y < -1.70000000000000009e-37Initial program 98.8%
Taylor expanded in t around inf 63.0%
mul-1-neg63.0%
distribute-rgt-neg-out63.0%
Simplified63.0%
Taylor expanded in y around 0 25.0%
+-commutative25.0%
mul-1-neg25.0%
unsub-neg25.0%
associate-*r*27.2%
*-commutative27.2%
Simplified27.2%
Taylor expanded in t around inf 24.7%
mul-1-neg24.7%
associate-*r*26.9%
*-commutative26.9%
associate-*r*28.0%
distribute-rgt-neg-in28.0%
distribute-rgt-neg-in28.0%
Simplified28.0%
if -1.70000000000000009e-37 < y < 1.25e51Initial program 96.0%
Taylor expanded in b around inf 81.4%
associate-*r*81.4%
*-commutative81.4%
neg-mul-181.4%
Simplified81.4%
Taylor expanded in b around 0 34.7%
if 1.25e51 < y Initial program 100.0%
Taylor expanded in t around inf 68.2%
mul-1-neg68.2%
distribute-rgt-neg-out68.2%
Simplified68.2%
Taylor expanded in y around 0 16.7%
+-commutative16.7%
mul-1-neg16.7%
unsub-neg16.7%
associate-*r*20.5%
*-commutative20.5%
Simplified20.5%
Taylor expanded in t around inf 20.7%
mul-1-neg20.7%
associate-*r*22.5%
*-commutative22.5%
associate-*r*18.7%
distribute-rgt-neg-in18.7%
distribute-rgt-neg-in18.7%
Simplified18.7%
Taylor expanded in t around 0 20.7%
mul-1-neg20.7%
*-commutative20.7%
distribute-rgt-neg-in20.7%
*-commutative20.7%
associate-*l*22.5%
Simplified22.5%
Final simplification30.2%
(FPCore (x y z t a b) :precision binary64 (if (<= y -2.3e-37) (* t (* x (- y))) (if (<= y 2.55e-77) x (* a (- (* x b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.3e-37) {
tmp = t * (x * -y);
} else if (y <= 2.55e-77) {
tmp = x;
} else {
tmp = a * -(x * 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 (y <= (-2.3d-37)) then
tmp = t * (x * -y)
else if (y <= 2.55d-77) then
tmp = x
else
tmp = a * -(x * 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 (y <= -2.3e-37) {
tmp = t * (x * -y);
} else if (y <= 2.55e-77) {
tmp = x;
} else {
tmp = a * -(x * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2.3e-37: tmp = t * (x * -y) elif y <= 2.55e-77: tmp = x else: tmp = a * -(x * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2.3e-37) tmp = Float64(t * Float64(x * Float64(-y))); elseif (y <= 2.55e-77) tmp = x; else tmp = Float64(a * Float64(-Float64(x * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -2.3e-37) tmp = t * (x * -y); elseif (y <= 2.55e-77) tmp = x; else tmp = a * -(x * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.3e-37], N[(t * N[(x * (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.55e-77], x, N[(a * (-N[(x * b), $MachinePrecision])), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.3 \cdot 10^{-37}:\\
\;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\
\mathbf{elif}\;y \leq 2.55 \cdot 10^{-77}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(-x \cdot b\right)\\
\end{array}
\end{array}
if y < -2.3e-37Initial program 98.8%
Taylor expanded in t around inf 63.0%
mul-1-neg63.0%
distribute-rgt-neg-out63.0%
Simplified63.0%
Taylor expanded in y around 0 25.0%
+-commutative25.0%
mul-1-neg25.0%
unsub-neg25.0%
associate-*r*27.2%
*-commutative27.2%
Simplified27.2%
Taylor expanded in t around inf 24.7%
mul-1-neg24.7%
associate-*r*26.9%
*-commutative26.9%
associate-*r*28.0%
distribute-rgt-neg-in28.0%
distribute-rgt-neg-in28.0%
Simplified28.0%
if -2.3e-37 < y < 2.55000000000000016e-77Initial program 96.1%
Taylor expanded in b around inf 82.9%
associate-*r*82.9%
*-commutative82.9%
neg-mul-182.9%
Simplified82.9%
Taylor expanded in b around 0 40.3%
if 2.55000000000000016e-77 < y Initial program 98.6%
Taylor expanded in b around inf 36.3%
associate-*r*36.3%
*-commutative36.3%
neg-mul-136.3%
Simplified36.3%
Taylor expanded in b around 0 7.5%
mul-1-neg7.5%
unsub-neg7.5%
Simplified7.5%
Taylor expanded in a around inf 19.4%
associate-*r*19.4%
neg-mul-119.4%
Simplified19.4%
Final simplification30.5%
(FPCore (x y z t a b) :precision binary64 (if (<= y -2.3e-37) (* t (* x (- y))) (if (<= y 0.35) x (* a (* x b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.3e-37) {
tmp = t * (x * -y);
} else if (y <= 0.35) {
tmp = x;
} else {
tmp = a * (x * 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 (y <= (-2.3d-37)) then
tmp = t * (x * -y)
else if (y <= 0.35d0) then
tmp = x
else
tmp = a * (x * 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 (y <= -2.3e-37) {
tmp = t * (x * -y);
} else if (y <= 0.35) {
tmp = x;
} else {
tmp = a * (x * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2.3e-37: tmp = t * (x * -y) elif y <= 0.35: tmp = x else: tmp = a * (x * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2.3e-37) tmp = Float64(t * Float64(x * Float64(-y))); elseif (y <= 0.35) tmp = x; else tmp = Float64(a * Float64(x * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -2.3e-37) tmp = t * (x * -y); elseif (y <= 0.35) tmp = x; else tmp = a * (x * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.3e-37], N[(t * N[(x * (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.35], x, N[(a * N[(x * b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.3 \cdot 10^{-37}:\\
\;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\
\mathbf{elif}\;y \leq 0.35:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot b\right)\\
\end{array}
\end{array}
if y < -2.3e-37Initial program 98.8%
Taylor expanded in t around inf 63.0%
mul-1-neg63.0%
distribute-rgt-neg-out63.0%
Simplified63.0%
Taylor expanded in y around 0 25.0%
+-commutative25.0%
mul-1-neg25.0%
unsub-neg25.0%
associate-*r*27.2%
*-commutative27.2%
Simplified27.2%
Taylor expanded in t around inf 24.7%
mul-1-neg24.7%
associate-*r*26.9%
*-commutative26.9%
associate-*r*28.0%
distribute-rgt-neg-in28.0%
distribute-rgt-neg-in28.0%
Simplified28.0%
if -2.3e-37 < y < 0.34999999999999998Initial program 96.6%
Taylor expanded in b around inf 81.8%
associate-*r*81.8%
*-commutative81.8%
neg-mul-181.8%
Simplified81.8%
Taylor expanded in b around 0 36.8%
if 0.34999999999999998 < y Initial program 98.2%
Taylor expanded in b around inf 27.0%
associate-*r*27.0%
*-commutative27.0%
neg-mul-127.0%
Simplified27.0%
Taylor expanded in b around 0 6.6%
mul-1-neg6.6%
unsub-neg6.6%
Simplified6.6%
sub-neg6.6%
mul-1-neg6.6%
distribute-rgt-in6.6%
*-un-lft-identity6.6%
add-sqr-sqrt5.2%
sqrt-unprod12.0%
mul-1-neg12.0%
mul-1-neg12.0%
sqr-neg12.0%
sqrt-unprod3.7%
add-sqr-sqrt4.8%
Applied egg-rr4.8%
associate-*r*4.8%
Simplified4.8%
Taylor expanded in a around inf 18.3%
Final simplification29.8%
(FPCore (x y z t a b) :precision binary64 (if (<= b -2.8e+93) (* x (- 1.0 (* a b))) (- x (* x (* y t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.8e+93) {
tmp = x * (1.0 - (a * b));
} else {
tmp = x - (x * (y * t));
}
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.8d+93)) then
tmp = x * (1.0d0 - (a * b))
else
tmp = x - (x * (y * t))
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.8e+93) {
tmp = x * (1.0 - (a * b));
} else {
tmp = x - (x * (y * t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -2.8e+93: tmp = x * (1.0 - (a * b)) else: tmp = x - (x * (y * t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -2.8e+93) tmp = Float64(x * Float64(1.0 - Float64(a * b))); else tmp = Float64(x - Float64(x * Float64(y * t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -2.8e+93) tmp = x * (1.0 - (a * b)); else tmp = x - (x * (y * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -2.8e+93], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(x * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.8 \cdot 10^{+93}:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x - x \cdot \left(y \cdot t\right)\\
\end{array}
\end{array}
if b < -2.79999999999999989e93Initial program 97.7%
Taylor expanded in b around inf 84.5%
associate-*r*84.5%
*-commutative84.5%
neg-mul-184.5%
Simplified84.5%
Taylor expanded in b around 0 33.3%
mul-1-neg33.3%
unsub-neg33.3%
Simplified33.3%
if -2.79999999999999989e93 < b Initial program 97.7%
Taylor expanded in t around inf 61.9%
mul-1-neg61.9%
distribute-rgt-neg-out61.9%
Simplified61.9%
Taylor expanded in y around 0 32.4%
+-commutative32.4%
mul-1-neg32.4%
unsub-neg32.4%
associate-*r*34.2%
*-commutative34.2%
Simplified34.2%
Final simplification34.0%
(FPCore (x y z t a b) :precision binary64 (if (<= y 0.0102) x (* a (* x b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 0.0102) {
tmp = x;
} else {
tmp = a * (x * 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 (y <= 0.0102d0) then
tmp = x
else
tmp = a * (x * 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 (y <= 0.0102) {
tmp = x;
} else {
tmp = a * (x * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 0.0102: tmp = x else: tmp = a * (x * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 0.0102) tmp = x; else tmp = Float64(a * Float64(x * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= 0.0102) tmp = x; else tmp = a * (x * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 0.0102], x, N[(a * N[(x * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 0.0102:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot b\right)\\
\end{array}
\end{array}
if y < 0.010200000000000001Initial program 97.5%
Taylor expanded in b around inf 65.7%
associate-*r*65.7%
*-commutative65.7%
neg-mul-165.7%
Simplified65.7%
Taylor expanded in b around 0 22.9%
if 0.010200000000000001 < y Initial program 98.2%
Taylor expanded in b around inf 27.0%
associate-*r*27.0%
*-commutative27.0%
neg-mul-127.0%
Simplified27.0%
Taylor expanded in b around 0 6.6%
mul-1-neg6.6%
unsub-neg6.6%
Simplified6.6%
sub-neg6.6%
mul-1-neg6.6%
distribute-rgt-in6.6%
*-un-lft-identity6.6%
add-sqr-sqrt5.2%
sqrt-unprod12.0%
mul-1-neg12.0%
mul-1-neg12.0%
sqr-neg12.0%
sqrt-unprod3.7%
add-sqr-sqrt4.8%
Applied egg-rr4.8%
associate-*r*4.8%
Simplified4.8%
Taylor expanded in a around inf 18.3%
Final simplification21.8%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return 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 = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 97.7%
Taylor expanded in b around inf 57.1%
associate-*r*57.1%
*-commutative57.1%
neg-mul-157.1%
Simplified57.1%
Taylor expanded in b around 0 18.6%
Final simplification18.6%
herbie shell --seed 2023274
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, B"
:precision binary64
(* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))))))