
(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 16 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 (- (* y (- (log z) t)) (* a (+ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(((y * (log(z) - t)) - (a * (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 * (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 * (z + b))));
}
def code(x, y, z, t, a, b): return x * math.exp(((y * (math.log(z) - t)) - (a * (z + b))))
function code(x, y, z, t, a, b) return Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) - Float64(a * Float64(z + b))))) end
function tmp = code(x, y, z, t, a, b) tmp = x * exp(((y * (log(z) - t)) - (a * (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[(z + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{y \cdot \left(\log z - t\right) - a \cdot \left(z + b\right)}
\end{array}
Initial program 97.3%
Taylor expanded in z around 0 100.0%
associate-*r*100.0%
associate-*r*100.0%
distribute-lft-out100.0%
neg-mul-1100.0%
Simplified100.0%
Final simplification100.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.65e-11) (not (<= y 1.35e+16))) (* x (exp (* y (- (log z) t)))) (* x (exp (* (- a) (+ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.65e-11) || !(y <= 1.35e+16)) {
tmp = x * exp((y * (log(z) - t)));
} 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 <= (-1.65d-11)) .or. (.not. (y <= 1.35d+16))) then
tmp = x * exp((y * (log(z) - t)))
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 <= -1.65e-11) || !(y <= 1.35e+16)) {
tmp = x * Math.exp((y * (Math.log(z) - t)));
} else {
tmp = x * Math.exp((-a * (z + b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.65e-11) or not (y <= 1.35e+16): tmp = x * math.exp((y * (math.log(z) - t))) else: tmp = x * math.exp((-a * (z + b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.65e-11) || !(y <= 1.35e+16)) tmp = Float64(x * exp(Float64(y * Float64(log(z) - t)))); 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 <= -1.65e-11) || ~((y <= 1.35e+16))) tmp = x * exp((y * (log(z) - t))); else tmp = x * exp((-a * (z + b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.65e-11], N[Not[LessEqual[y, 1.35e+16]], $MachinePrecision]], N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]], $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 -1.65 \cdot 10^{-11} \lor \neg \left(y \leq 1.35 \cdot 10^{+16}\right):\\
\;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{\left(-a\right) \cdot \left(z + b\right)}\\
\end{array}
\end{array}
if y < -1.6500000000000001e-11 or 1.35e16 < y Initial program 100.0%
fma-def100.0%
sub-neg100.0%
log1p-def100.0%
Simplified100.0%
Taylor expanded in a around 0 94.4%
if -1.6500000000000001e-11 < y < 1.35e16Initial program 94.1%
Taylor expanded in y around 0 84.8%
Taylor expanded in z around 0 91.5%
neg-mul-191.5%
Simplified91.5%
Final simplification93.1%
(FPCore (x y z t a b) :precision binary64 (if (<= y -3.7e+21) (* x (pow z y)) (if (<= y 1.25e+22) (* x (exp (* (- a) (+ z b)))) (* x (exp (* y (- t)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -3.7e+21) {
tmp = x * pow(z, y);
} else if (y <= 1.25e+22) {
tmp = x * exp((-a * (z + b)));
} else {
tmp = x * exp((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 <= (-3.7d+21)) then
tmp = x * (z ** y)
else if (y <= 1.25d+22) then
tmp = x * exp((-a * (z + b)))
else
tmp = x * exp((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 <= -3.7e+21) {
tmp = x * Math.pow(z, y);
} else if (y <= 1.25e+22) {
tmp = x * Math.exp((-a * (z + b)));
} else {
tmp = x * Math.exp((y * -t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -3.7e+21: tmp = x * math.pow(z, y) elif y <= 1.25e+22: tmp = x * math.exp((-a * (z + b))) else: tmp = x * math.exp((y * -t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -3.7e+21) tmp = Float64(x * (z ^ y)); elseif (y <= 1.25e+22) tmp = Float64(x * exp(Float64(Float64(-a) * Float64(z + b)))); else tmp = Float64(x * exp(Float64(y * Float64(-t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -3.7e+21) tmp = x * (z ^ y); elseif (y <= 1.25e+22) tmp = x * exp((-a * (z + b))); else tmp = x * exp((y * -t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -3.7e+21], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.25e+22], N[(x * N[Exp[N[((-a) * N[(z + b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(y * (-t)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.7 \cdot 10^{+21}:\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{+22}:\\
\;\;\;\;x \cdot e^{\left(-a\right) \cdot \left(z + b\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{y \cdot \left(-t\right)}\\
\end{array}
\end{array}
if y < -3.7e21Initial program 100.0%
fma-def100.0%
sub-neg100.0%
log1p-def100.0%
Simplified100.0%
Taylor expanded in a around 0 92.1%
Taylor expanded in t around 0 71.4%
Taylor expanded in x around 0 71.4%
if -3.7e21 < y < 1.2499999999999999e22Initial program 94.6%
Taylor expanded in y around 0 82.2%
Taylor expanded in z around 0 88.4%
neg-mul-188.4%
Simplified88.4%
if 1.2499999999999999e22 < y Initial program 100.0%
fma-def100.0%
sub-neg100.0%
log1p-def100.0%
Simplified100.0%
Taylor expanded in a around 0 98.6%
Taylor expanded in t around inf 74.4%
mul-1-neg74.4%
distribute-lft-neg-out74.4%
*-commutative74.4%
Simplified74.4%
Final simplification80.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -3.2e+23) (not (<= y 1.35e+16))) (* 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 <= -3.2e+23) || !(y <= 1.35e+16)) {
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 <= (-3.2d+23)) .or. (.not. (y <= 1.35d+16))) 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 <= -3.2e+23) || !(y <= 1.35e+16)) {
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 <= -3.2e+23) or not (y <= 1.35e+16): 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 <= -3.2e+23) || !(y <= 1.35e+16)) tmp = Float64(x * (z ^ y)); else tmp = Float64(x * exp(Float64(Float64(-a) * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -3.2e+23) || ~((y <= 1.35e+16))) 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, -3.2e+23], N[Not[LessEqual[y, 1.35e+16]], $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 -3.2 \cdot 10^{+23} \lor \neg \left(y \leq 1.35 \cdot 10^{+16}\right):\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{\left(-a\right) \cdot b}\\
\end{array}
\end{array}
if y < -3.2e23 or 1.35e16 < y Initial program 100.0%
fma-def100.0%
sub-neg100.0%
log1p-def100.0%
Simplified100.0%
Taylor expanded in a around 0 94.9%
Taylor expanded in t around 0 69.9%
Taylor expanded in x around 0 69.9%
if -3.2e23 < y < 1.35e16Initial program 94.4%
Taylor expanded in y around 0 83.2%
Taylor expanded in z around 0 79.2%
mul-1-neg79.2%
*-commutative79.2%
distribute-rgt-neg-in79.2%
Simplified79.2%
Final simplification74.3%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1.45e+20) (* x (pow z y)) (if (<= y 5.8e+21) (* x (exp (* (- a) b))) (* x (exp (* y (- t)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.45e+20) {
tmp = x * pow(z, y);
} else if (y <= 5.8e+21) {
tmp = x * exp((-a * b));
} else {
tmp = x * exp((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.45d+20)) then
tmp = x * (z ** y)
else if (y <= 5.8d+21) then
tmp = x * exp((-a * b))
else
tmp = x * exp((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.45e+20) {
tmp = x * Math.pow(z, y);
} else if (y <= 5.8e+21) {
tmp = x * Math.exp((-a * b));
} else {
tmp = x * Math.exp((y * -t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.45e+20: tmp = x * math.pow(z, y) elif y <= 5.8e+21: tmp = x * math.exp((-a * b)) else: tmp = x * math.exp((y * -t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.45e+20) tmp = Float64(x * (z ^ y)); elseif (y <= 5.8e+21) tmp = Float64(x * exp(Float64(Float64(-a) * b))); else tmp = Float64(x * exp(Float64(y * Float64(-t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.45e+20) tmp = x * (z ^ y); elseif (y <= 5.8e+21) tmp = x * exp((-a * b)); else tmp = x * exp((y * -t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.45e+20], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.8e+21], N[(x * N[Exp[N[((-a) * b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(y * (-t)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.45 \cdot 10^{+20}:\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{elif}\;y \leq 5.8 \cdot 10^{+21}:\\
\;\;\;\;x \cdot e^{\left(-a\right) \cdot b}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{y \cdot \left(-t\right)}\\
\end{array}
\end{array}
if y < -1.45e20Initial program 100.0%
fma-def100.0%
sub-neg100.0%
log1p-def100.0%
Simplified100.0%
Taylor expanded in a around 0 92.1%
Taylor expanded in t around 0 71.4%
Taylor expanded in x around 0 71.4%
if -1.45e20 < y < 5.8e21Initial program 94.6%
Taylor expanded in y around 0 82.2%
Taylor expanded in z around 0 78.3%
mul-1-neg78.3%
*-commutative78.3%
distribute-rgt-neg-in78.3%
Simplified78.3%
if 5.8e21 < y Initial program 100.0%
fma-def100.0%
sub-neg100.0%
log1p-def100.0%
Simplified100.0%
Taylor expanded in a around 0 98.6%
Taylor expanded in t around inf 74.4%
mul-1-neg74.4%
distribute-lft-neg-out74.4%
*-commutative74.4%
Simplified74.4%
Final simplification75.6%
(FPCore (x y z t a b) :precision binary64 (if (<= t -900000000.0) (* x (- 1.0 (* y t))) (* x (pow z y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -900000000.0) {
tmp = x * (1.0 - (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 <= (-900000000.0d0)) then
tmp = x * (1.0d0 - (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 <= -900000000.0) {
tmp = x * (1.0 - (y * t));
} else {
tmp = x * Math.pow(z, y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -900000000.0: tmp = x * (1.0 - (y * t)) else: tmp = x * math.pow(z, y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -900000000.0) tmp = Float64(x * Float64(1.0 - 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 <= -900000000.0) tmp = x * (1.0 - (y * t)); else tmp = x * (z ^ y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -900000000.0], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -900000000:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot {z}^{y}\\
\end{array}
\end{array}
if t < -9e8Initial program 98.6%
fma-def98.6%
sub-neg98.6%
log1p-def100.0%
Simplified100.0%
Taylor expanded in a around 0 82.1%
Taylor expanded in t around inf 82.1%
mul-1-neg82.1%
distribute-lft-neg-out82.1%
*-commutative82.1%
Simplified82.1%
Taylor expanded in y around 0 30.6%
mul-1-neg30.6%
unsub-neg30.6%
*-commutative30.6%
associate-*l*34.4%
*-commutative34.4%
Simplified34.4%
Taylor expanded in x around 0 34.4%
if -9e8 < t Initial program 96.8%
fma-def96.8%
sub-neg96.8%
log1p-def100.0%
Simplified100.0%
Taylor expanded in a around 0 73.1%
Taylor expanded in t around 0 68.4%
Taylor expanded in x around 0 68.4%
Final simplification59.0%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= x -9.8e-138)
(not (or (<= x 3.8e-210) (and (not (<= x 4.8e-155)) (<= x 3.0)))))
(* x (- 1.0 (* y t)))
(* a (* x (- z)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x <= -9.8e-138) || !((x <= 3.8e-210) || (!(x <= 4.8e-155) && (x <= 3.0)))) {
tmp = x * (1.0 - (y * t));
} else {
tmp = a * (x * -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 ((x <= (-9.8d-138)) .or. (.not. (x <= 3.8d-210) .or. (.not. (x <= 4.8d-155)) .and. (x <= 3.0d0))) then
tmp = x * (1.0d0 - (y * t))
else
tmp = a * (x * -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 ((x <= -9.8e-138) || !((x <= 3.8e-210) || (!(x <= 4.8e-155) && (x <= 3.0)))) {
tmp = x * (1.0 - (y * t));
} else {
tmp = a * (x * -z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (x <= -9.8e-138) or not ((x <= 3.8e-210) or (not (x <= 4.8e-155) and (x <= 3.0))): tmp = x * (1.0 - (y * t)) else: tmp = a * (x * -z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((x <= -9.8e-138) || !((x <= 3.8e-210) || (!(x <= 4.8e-155) && (x <= 3.0)))) tmp = Float64(x * Float64(1.0 - Float64(y * t))); else tmp = Float64(a * Float64(x * Float64(-z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((x <= -9.8e-138) || ~(((x <= 3.8e-210) || (~((x <= 4.8e-155)) && (x <= 3.0))))) tmp = x * (1.0 - (y * t)); else tmp = a * (x * -z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[x, -9.8e-138], N[Not[Or[LessEqual[x, 3.8e-210], And[N[Not[LessEqual[x, 4.8e-155]], $MachinePrecision], LessEqual[x, 3.0]]]], $MachinePrecision]], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(x * (-z)), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.8 \cdot 10^{-138} \lor \neg \left(x \leq 3.8 \cdot 10^{-210} \lor \neg \left(x \leq 4.8 \cdot 10^{-155}\right) \land x \leq 3\right):\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-z\right)\right)\\
\end{array}
\end{array}
if x < -9.80000000000000033e-138 or 3.80000000000000003e-210 < x < 4.8e-155 or 3 < x Initial program 96.7%
fma-def96.7%
sub-neg96.7%
log1p-def100.0%
Simplified100.0%
Taylor expanded in a around 0 75.2%
Taylor expanded in t around inf 63.2%
mul-1-neg63.2%
distribute-lft-neg-out63.2%
*-commutative63.2%
Simplified63.2%
Taylor expanded in y around 0 38.3%
mul-1-neg38.3%
unsub-neg38.3%
*-commutative38.3%
associate-*l*38.4%
*-commutative38.4%
Simplified38.4%
Taylor expanded in x around 0 38.4%
if -9.80000000000000033e-138 < x < 3.80000000000000003e-210 or 4.8e-155 < x < 3Initial program 98.8%
Taylor expanded in y around 0 52.0%
Taylor expanded in b around 0 11.9%
Taylor expanded in z around 0 11.8%
mul-1-neg11.8%
unsub-neg11.8%
Simplified11.8%
Taylor expanded in a around inf 35.7%
mul-1-neg35.7%
*-commutative35.7%
distribute-rgt-neg-in35.7%
Simplified35.7%
Final simplification37.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (* y (- t)))))
(if (<= y -2.2e+23)
t_1
(if (<= y 3.7e-12)
x
(if (or (<= y 3.5e+184) (not (<= y 4.5e+230)))
(* z (* x (- a)))
t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * (y * -t);
double tmp;
if (y <= -2.2e+23) {
tmp = t_1;
} else if (y <= 3.7e-12) {
tmp = x;
} else if ((y <= 3.5e+184) || !(y <= 4.5e+230)) {
tmp = z * (x * -a);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x * (y * -t)
if (y <= (-2.2d+23)) then
tmp = t_1
else if (y <= 3.7d-12) then
tmp = x
else if ((y <= 3.5d+184) .or. (.not. (y <= 4.5d+230))) then
tmp = z * (x * -a)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * (y * -t);
double tmp;
if (y <= -2.2e+23) {
tmp = t_1;
} else if (y <= 3.7e-12) {
tmp = x;
} else if ((y <= 3.5e+184) || !(y <= 4.5e+230)) {
tmp = z * (x * -a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * (y * -t) tmp = 0 if y <= -2.2e+23: tmp = t_1 elif y <= 3.7e-12: tmp = x elif (y <= 3.5e+184) or not (y <= 4.5e+230): tmp = z * (x * -a) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * Float64(y * Float64(-t))) tmp = 0.0 if (y <= -2.2e+23) tmp = t_1; elseif (y <= 3.7e-12) tmp = x; elseif ((y <= 3.5e+184) || !(y <= 4.5e+230)) tmp = Float64(z * Float64(x * Float64(-a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * (y * -t); tmp = 0.0; if (y <= -2.2e+23) tmp = t_1; elseif (y <= 3.7e-12) tmp = x; elseif ((y <= 3.5e+184) || ~((y <= 4.5e+230))) tmp = z * (x * -a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(y * (-t)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.2e+23], t$95$1, If[LessEqual[y, 3.7e-12], x, If[Or[LessEqual[y, 3.5e+184], N[Not[LessEqual[y, 4.5e+230]], $MachinePrecision]], N[(z * N[(x * (-a)), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot \left(-t\right)\right)\\
\mathbf{if}\;y \leq -2.2 \cdot 10^{+23}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 3.7 \cdot 10^{-12}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{+184} \lor \neg \left(y \leq 4.5 \cdot 10^{+230}\right):\\
\;\;\;\;z \cdot \left(x \cdot \left(-a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -2.20000000000000008e23 or 3.49999999999999978e184 < y < 4.4999999999999999e230Initial program 100.0%
fma-def100.0%
sub-neg100.0%
log1p-def100.0%
Simplified100.0%
Taylor expanded in a around 0 93.6%
Taylor expanded in t around inf 64.8%
mul-1-neg64.8%
distribute-lft-neg-out64.8%
*-commutative64.8%
Simplified64.8%
Taylor expanded in y around 0 29.2%
mul-1-neg29.2%
unsub-neg29.2%
*-commutative29.2%
associate-*l*28.2%
*-commutative28.2%
Simplified28.2%
Taylor expanded in t around inf 30.3%
mul-1-neg30.3%
associate-*r*25.4%
*-commutative25.4%
distribute-rgt-neg-in25.4%
associate-*r*29.1%
Simplified29.1%
if -2.20000000000000008e23 < y < 3.69999999999999999e-12Initial program 95.0%
Taylor expanded in y around 0 83.3%
Taylor expanded in a around 0 35.6%
if 3.69999999999999999e-12 < y < 3.49999999999999978e184 or 4.4999999999999999e230 < y Initial program 98.4%
Taylor expanded in y around 0 36.2%
Taylor expanded in b around 0 5.4%
Taylor expanded in z around 0 5.4%
mul-1-neg5.4%
unsub-neg5.4%
Simplified5.4%
Taylor expanded in a around inf 31.4%
mul-1-neg31.4%
associate-*r*32.4%
Simplified32.4%
Final simplification32.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (* y (- t)))))
(if (<= y -3e+22)
t_1
(if (<= y 2.6e-16)
x
(if (<= y 4e+185)
(* z (* x (- a)))
(if (<= y 4.2e+230) t_1 (* a (* x (- z)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * (y * -t);
double tmp;
if (y <= -3e+22) {
tmp = t_1;
} else if (y <= 2.6e-16) {
tmp = x;
} else if (y <= 4e+185) {
tmp = z * (x * -a);
} else if (y <= 4.2e+230) {
tmp = t_1;
} else {
tmp = a * (x * -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) :: t_1
real(8) :: tmp
t_1 = x * (y * -t)
if (y <= (-3d+22)) then
tmp = t_1
else if (y <= 2.6d-16) then
tmp = x
else if (y <= 4d+185) then
tmp = z * (x * -a)
else if (y <= 4.2d+230) then
tmp = t_1
else
tmp = a * (x * -z)
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 * (y * -t);
double tmp;
if (y <= -3e+22) {
tmp = t_1;
} else if (y <= 2.6e-16) {
tmp = x;
} else if (y <= 4e+185) {
tmp = z * (x * -a);
} else if (y <= 4.2e+230) {
tmp = t_1;
} else {
tmp = a * (x * -z);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * (y * -t) tmp = 0 if y <= -3e+22: tmp = t_1 elif y <= 2.6e-16: tmp = x elif y <= 4e+185: tmp = z * (x * -a) elif y <= 4.2e+230: tmp = t_1 else: tmp = a * (x * -z) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * Float64(y * Float64(-t))) tmp = 0.0 if (y <= -3e+22) tmp = t_1; elseif (y <= 2.6e-16) tmp = x; elseif (y <= 4e+185) tmp = Float64(z * Float64(x * Float64(-a))); elseif (y <= 4.2e+230) tmp = t_1; else tmp = Float64(a * Float64(x * Float64(-z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * (y * -t); tmp = 0.0; if (y <= -3e+22) tmp = t_1; elseif (y <= 2.6e-16) tmp = x; elseif (y <= 4e+185) tmp = z * (x * -a); elseif (y <= 4.2e+230) tmp = t_1; else tmp = a * (x * -z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(y * (-t)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3e+22], t$95$1, If[LessEqual[y, 2.6e-16], x, If[LessEqual[y, 4e+185], N[(z * N[(x * (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.2e+230], t$95$1, N[(a * N[(x * (-z)), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot \left(-t\right)\right)\\
\mathbf{if}\;y \leq -3 \cdot 10^{+22}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{-16}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 4 \cdot 10^{+185}:\\
\;\;\;\;z \cdot \left(x \cdot \left(-a\right)\right)\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{+230}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-z\right)\right)\\
\end{array}
\end{array}
if y < -3e22 or 3.9999999999999999e185 < y < 4.19999999999999986e230Initial program 100.0%
fma-def100.0%
sub-neg100.0%
log1p-def100.0%
Simplified100.0%
Taylor expanded in a around 0 93.6%
Taylor expanded in t around inf 64.8%
mul-1-neg64.8%
distribute-lft-neg-out64.8%
*-commutative64.8%
Simplified64.8%
Taylor expanded in y around 0 29.2%
mul-1-neg29.2%
unsub-neg29.2%
*-commutative29.2%
associate-*l*28.2%
*-commutative28.2%
Simplified28.2%
Taylor expanded in t around inf 30.3%
mul-1-neg30.3%
associate-*r*25.4%
*-commutative25.4%
distribute-rgt-neg-in25.4%
associate-*r*29.1%
Simplified29.1%
if -3e22 < y < 2.5999999999999998e-16Initial program 95.0%
Taylor expanded in y around 0 83.3%
Taylor expanded in a around 0 35.6%
if 2.5999999999999998e-16 < y < 3.9999999999999999e185Initial program 97.7%
Taylor expanded in y around 0 40.5%
Taylor expanded in b around 0 6.1%
Taylor expanded in z around 0 6.2%
mul-1-neg6.2%
unsub-neg6.2%
Simplified6.2%
Taylor expanded in a around inf 30.9%
mul-1-neg30.9%
associate-*r*33.0%
Simplified33.0%
if 4.19999999999999986e230 < y Initial program 100.0%
Taylor expanded in y around 0 27.3%
Taylor expanded in b around 0 3.8%
Taylor expanded in z around 0 3.8%
mul-1-neg3.8%
unsub-neg3.8%
Simplified3.8%
Taylor expanded in a around inf 32.3%
mul-1-neg32.3%
*-commutative32.3%
distribute-rgt-neg-in32.3%
Simplified32.3%
Final simplification33.0%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -5.5e+19)
(* t (* x (- y)))
(if (<= y 2.7e-19)
x
(if (<= y 1.05e+181)
(* z (* x (- a)))
(if (<= y 4.6e+230) (* x (* y (- t))) (* a (* x (- z))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -5.5e+19) {
tmp = t * (x * -y);
} else if (y <= 2.7e-19) {
tmp = x;
} else if (y <= 1.05e+181) {
tmp = z * (x * -a);
} else if (y <= 4.6e+230) {
tmp = x * (y * -t);
} else {
tmp = a * (x * -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 <= (-5.5d+19)) then
tmp = t * (x * -y)
else if (y <= 2.7d-19) then
tmp = x
else if (y <= 1.05d+181) then
tmp = z * (x * -a)
else if (y <= 4.6d+230) then
tmp = x * (y * -t)
else
tmp = a * (x * -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 <= -5.5e+19) {
tmp = t * (x * -y);
} else if (y <= 2.7e-19) {
tmp = x;
} else if (y <= 1.05e+181) {
tmp = z * (x * -a);
} else if (y <= 4.6e+230) {
tmp = x * (y * -t);
} else {
tmp = a * (x * -z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -5.5e+19: tmp = t * (x * -y) elif y <= 2.7e-19: tmp = x elif y <= 1.05e+181: tmp = z * (x * -a) elif y <= 4.6e+230: tmp = x * (y * -t) else: tmp = a * (x * -z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -5.5e+19) tmp = Float64(t * Float64(x * Float64(-y))); elseif (y <= 2.7e-19) tmp = x; elseif (y <= 1.05e+181) tmp = Float64(z * Float64(x * Float64(-a))); elseif (y <= 4.6e+230) tmp = Float64(x * Float64(y * Float64(-t))); else tmp = Float64(a * Float64(x * Float64(-z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -5.5e+19) tmp = t * (x * -y); elseif (y <= 2.7e-19) tmp = x; elseif (y <= 1.05e+181) tmp = z * (x * -a); elseif (y <= 4.6e+230) tmp = x * (y * -t); else tmp = a * (x * -z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -5.5e+19], N[(t * N[(x * (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.7e-19], x, If[LessEqual[y, 1.05e+181], N[(z * N[(x * (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.6e+230], N[(x * N[(y * (-t)), $MachinePrecision]), $MachinePrecision], N[(a * N[(x * (-z)), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.5 \cdot 10^{+19}:\\
\;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{-19}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.05 \cdot 10^{+181}:\\
\;\;\;\;z \cdot \left(x \cdot \left(-a\right)\right)\\
\mathbf{elif}\;y \leq 4.6 \cdot 10^{+230}:\\
\;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-z\right)\right)\\
\end{array}
\end{array}
if y < -5.5e19Initial program 100.0%
fma-def100.0%
sub-neg100.0%
log1p-def100.0%
Simplified100.0%
Taylor expanded in a around 0 92.1%
Taylor expanded in t around inf 62.6%
mul-1-neg62.6%
distribute-lft-neg-out62.6%
*-commutative62.6%
Simplified62.6%
Taylor expanded in y around 0 27.7%
mul-1-neg27.7%
unsub-neg27.7%
*-commutative27.7%
associate-*l*24.9%
*-commutative24.9%
Simplified24.9%
Taylor expanded in t around inf 27.6%
if -5.5e19 < y < 2.7000000000000001e-19Initial program 95.0%
Taylor expanded in y around 0 83.3%
Taylor expanded in a around 0 35.6%
if 2.7000000000000001e-19 < y < 1.04999999999999999e181Initial program 97.7%
Taylor expanded in y around 0 40.5%
Taylor expanded in b around 0 6.1%
Taylor expanded in z around 0 6.2%
mul-1-neg6.2%
unsub-neg6.2%
Simplified6.2%
Taylor expanded in a around inf 30.9%
mul-1-neg30.9%
associate-*r*33.0%
Simplified33.0%
if 1.04999999999999999e181 < y < 4.5999999999999996e230Initial program 100.0%
fma-def100.0%
sub-neg100.0%
log1p-def100.0%
Simplified100.0%
Taylor expanded in a around 0 100.0%
Taylor expanded in t around inf 74.3%
mul-1-neg74.3%
distribute-lft-neg-out74.3%
*-commutative74.3%
Simplified74.3%
Taylor expanded in y around 0 35.5%
mul-1-neg35.5%
unsub-neg35.5%
*-commutative35.5%
associate-*l*42.0%
*-commutative42.0%
Simplified42.0%
Taylor expanded in t around inf 41.6%
mul-1-neg41.6%
associate-*r*41.6%
*-commutative41.6%
distribute-rgt-neg-in41.6%
associate-*r*48.0%
Simplified48.0%
if 4.5999999999999996e230 < y Initial program 100.0%
Taylor expanded in y around 0 27.3%
Taylor expanded in b around 0 3.8%
Taylor expanded in z around 0 3.8%
mul-1-neg3.8%
unsub-neg3.8%
Simplified3.8%
Taylor expanded in a around inf 32.3%
mul-1-neg32.3%
*-commutative32.3%
distribute-rgt-neg-in32.3%
Simplified32.3%
Final simplification33.7%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -2.4e-21)
(* t (* x (- y)))
(if (<= y 2.7e-13)
(* x (- 1.0 (* z a)))
(if (<= y 3e+182)
(* z (* x (- a)))
(if (<= y 1.75e+230) (* x (* y (- t))) (* a (* x (- z))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.4e-21) {
tmp = t * (x * -y);
} else if (y <= 2.7e-13) {
tmp = x * (1.0 - (z * a));
} else if (y <= 3e+182) {
tmp = z * (x * -a);
} else if (y <= 1.75e+230) {
tmp = x * (y * -t);
} else {
tmp = a * (x * -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 <= (-2.4d-21)) then
tmp = t * (x * -y)
else if (y <= 2.7d-13) then
tmp = x * (1.0d0 - (z * a))
else if (y <= 3d+182) then
tmp = z * (x * -a)
else if (y <= 1.75d+230) then
tmp = x * (y * -t)
else
tmp = a * (x * -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 <= -2.4e-21) {
tmp = t * (x * -y);
} else if (y <= 2.7e-13) {
tmp = x * (1.0 - (z * a));
} else if (y <= 3e+182) {
tmp = z * (x * -a);
} else if (y <= 1.75e+230) {
tmp = x * (y * -t);
} else {
tmp = a * (x * -z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2.4e-21: tmp = t * (x * -y) elif y <= 2.7e-13: tmp = x * (1.0 - (z * a)) elif y <= 3e+182: tmp = z * (x * -a) elif y <= 1.75e+230: tmp = x * (y * -t) else: tmp = a * (x * -z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2.4e-21) tmp = Float64(t * Float64(x * Float64(-y))); elseif (y <= 2.7e-13) tmp = Float64(x * Float64(1.0 - Float64(z * a))); elseif (y <= 3e+182) tmp = Float64(z * Float64(x * Float64(-a))); elseif (y <= 1.75e+230) tmp = Float64(x * Float64(y * Float64(-t))); else tmp = Float64(a * Float64(x * Float64(-z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -2.4e-21) tmp = t * (x * -y); elseif (y <= 2.7e-13) tmp = x * (1.0 - (z * a)); elseif (y <= 3e+182) tmp = z * (x * -a); elseif (y <= 1.75e+230) tmp = x * (y * -t); else tmp = a * (x * -z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.4e-21], N[(t * N[(x * (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.7e-13], N[(x * N[(1.0 - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3e+182], N[(z * N[(x * (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.75e+230], N[(x * N[(y * (-t)), $MachinePrecision]), $MachinePrecision], N[(a * N[(x * (-z)), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.4 \cdot 10^{-21}:\\
\;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{-13}:\\
\;\;\;\;x \cdot \left(1 - z \cdot a\right)\\
\mathbf{elif}\;y \leq 3 \cdot 10^{+182}:\\
\;\;\;\;z \cdot \left(x \cdot \left(-a\right)\right)\\
\mathbf{elif}\;y \leq 1.75 \cdot 10^{+230}:\\
\;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-z\right)\right)\\
\end{array}
\end{array}
if y < -2.3999999999999999e-21Initial program 100.0%
fma-def100.0%
sub-neg100.0%
log1p-def100.0%
Simplified100.0%
Taylor expanded in a around 0 88.8%
Taylor expanded in t around inf 62.7%
mul-1-neg62.7%
distribute-lft-neg-out62.7%
*-commutative62.7%
Simplified62.7%
Taylor expanded in y around 0 24.9%
mul-1-neg24.9%
unsub-neg24.9%
*-commutative24.9%
associate-*l*22.4%
*-commutative22.4%
Simplified22.4%
Taylor expanded in t around inf 24.8%
if -2.3999999999999999e-21 < y < 2.70000000000000011e-13Initial program 94.6%
Taylor expanded in y around 0 84.7%
Taylor expanded in b around 0 41.5%
Taylor expanded in z around 0 40.3%
mul-1-neg40.3%
unsub-neg40.3%
Simplified40.3%
if 2.70000000000000011e-13 < y < 3.0000000000000002e182Initial program 97.7%
Taylor expanded in y around 0 40.5%
Taylor expanded in b around 0 6.1%
Taylor expanded in z around 0 6.2%
mul-1-neg6.2%
unsub-neg6.2%
Simplified6.2%
Taylor expanded in a around inf 30.9%
mul-1-neg30.9%
associate-*r*33.0%
Simplified33.0%
if 3.0000000000000002e182 < y < 1.75e230Initial program 100.0%
fma-def100.0%
sub-neg100.0%
log1p-def100.0%
Simplified100.0%
Taylor expanded in a around 0 100.0%
Taylor expanded in t around inf 74.3%
mul-1-neg74.3%
distribute-lft-neg-out74.3%
*-commutative74.3%
Simplified74.3%
Taylor expanded in y around 0 35.5%
mul-1-neg35.5%
unsub-neg35.5%
*-commutative35.5%
associate-*l*42.0%
*-commutative42.0%
Simplified42.0%
Taylor expanded in t around inf 41.6%
mul-1-neg41.6%
associate-*r*41.6%
*-commutative41.6%
distribute-rgt-neg-in41.6%
associate-*r*48.0%
Simplified48.0%
if 1.75e230 < y Initial program 100.0%
Taylor expanded in y around 0 27.3%
Taylor expanded in b around 0 3.8%
Taylor expanded in z around 0 3.8%
mul-1-neg3.8%
unsub-neg3.8%
Simplified3.8%
Taylor expanded in a around inf 32.3%
mul-1-neg32.3%
*-commutative32.3%
distribute-rgt-neg-in32.3%
Simplified32.3%
Final simplification34.7%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -3.1e+68)
(* t (* x (- y)))
(if (<= y 6.8e-12)
(- x (* b (* x a)))
(if (<= y 5e+182)
(* z (* x (- a)))
(if (<= y 2.5e+230) (* x (* y (- t))) (* a (* x (- z))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -3.1e+68) {
tmp = t * (x * -y);
} else if (y <= 6.8e-12) {
tmp = x - (b * (x * a));
} else if (y <= 5e+182) {
tmp = z * (x * -a);
} else if (y <= 2.5e+230) {
tmp = x * (y * -t);
} else {
tmp = a * (x * -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 <= (-3.1d+68)) then
tmp = t * (x * -y)
else if (y <= 6.8d-12) then
tmp = x - (b * (x * a))
else if (y <= 5d+182) then
tmp = z * (x * -a)
else if (y <= 2.5d+230) then
tmp = x * (y * -t)
else
tmp = a * (x * -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 <= -3.1e+68) {
tmp = t * (x * -y);
} else if (y <= 6.8e-12) {
tmp = x - (b * (x * a));
} else if (y <= 5e+182) {
tmp = z * (x * -a);
} else if (y <= 2.5e+230) {
tmp = x * (y * -t);
} else {
tmp = a * (x * -z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -3.1e+68: tmp = t * (x * -y) elif y <= 6.8e-12: tmp = x - (b * (x * a)) elif y <= 5e+182: tmp = z * (x * -a) elif y <= 2.5e+230: tmp = x * (y * -t) else: tmp = a * (x * -z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -3.1e+68) tmp = Float64(t * Float64(x * Float64(-y))); elseif (y <= 6.8e-12) tmp = Float64(x - Float64(b * Float64(x * a))); elseif (y <= 5e+182) tmp = Float64(z * Float64(x * Float64(-a))); elseif (y <= 2.5e+230) tmp = Float64(x * Float64(y * Float64(-t))); else tmp = Float64(a * Float64(x * Float64(-z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -3.1e+68) tmp = t * (x * -y); elseif (y <= 6.8e-12) tmp = x - (b * (x * a)); elseif (y <= 5e+182) tmp = z * (x * -a); elseif (y <= 2.5e+230) tmp = x * (y * -t); else tmp = a * (x * -z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -3.1e+68], N[(t * N[(x * (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.8e-12], N[(x - N[(b * N[(x * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5e+182], N[(z * N[(x * (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.5e+230], N[(x * N[(y * (-t)), $MachinePrecision]), $MachinePrecision], N[(a * N[(x * (-z)), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.1 \cdot 10^{+68}:\\
\;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\
\mathbf{elif}\;y \leq 6.8 \cdot 10^{-12}:\\
\;\;\;\;x - b \cdot \left(x \cdot a\right)\\
\mathbf{elif}\;y \leq 5 \cdot 10^{+182}:\\
\;\;\;\;z \cdot \left(x \cdot \left(-a\right)\right)\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{+230}:\\
\;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-z\right)\right)\\
\end{array}
\end{array}
if y < -3.0999999999999998e68Initial program 100.0%
fma-def100.0%
sub-neg100.0%
log1p-def100.0%
Simplified100.0%
Taylor expanded in a around 0 90.7%
Taylor expanded in t around inf 61.6%
mul-1-neg61.6%
distribute-lft-neg-out61.6%
*-commutative61.6%
Simplified61.6%
Taylor expanded in y around 0 30.0%
mul-1-neg30.0%
unsub-neg30.0%
*-commutative30.0%
associate-*l*24.9%
*-commutative24.9%
Simplified24.9%
Taylor expanded in t around inf 29.9%
if -3.0999999999999998e68 < y < 6.8000000000000001e-12Initial program 95.3%
fma-def95.3%
sub-neg95.3%
log1p-def100.0%
Simplified100.0%
add-log-exp100.0%
add-cube-cbrt99.9%
log-prod99.9%
Applied egg-rr91.3%
log-pow91.3%
distribute-lft1-in91.3%
metadata-eval91.3%
Simplified91.3%
Taylor expanded in b around inf 77.6%
mul-1-neg77.6%
*-commutative77.6%
distribute-rgt-neg-in77.6%
Simplified77.6%
Taylor expanded in b around 0 44.3%
mul-1-neg44.3%
unsub-neg44.3%
associate-*r*46.6%
*-commutative46.6%
associate-*l*45.6%
Simplified45.6%
if 6.8000000000000001e-12 < y < 4.99999999999999973e182Initial program 97.7%
Taylor expanded in y around 0 40.5%
Taylor expanded in b around 0 6.1%
Taylor expanded in z around 0 6.2%
mul-1-neg6.2%
unsub-neg6.2%
Simplified6.2%
Taylor expanded in a around inf 30.9%
mul-1-neg30.9%
associate-*r*33.0%
Simplified33.0%
if 4.99999999999999973e182 < y < 2.5000000000000001e230Initial program 100.0%
fma-def100.0%
sub-neg100.0%
log1p-def100.0%
Simplified100.0%
Taylor expanded in a around 0 100.0%
Taylor expanded in t around inf 74.3%
mul-1-neg74.3%
distribute-lft-neg-out74.3%
*-commutative74.3%
Simplified74.3%
Taylor expanded in y around 0 35.5%
mul-1-neg35.5%
unsub-neg35.5%
*-commutative35.5%
associate-*l*42.0%
*-commutative42.0%
Simplified42.0%
Taylor expanded in t around inf 41.6%
mul-1-neg41.6%
associate-*r*41.6%
*-commutative41.6%
distribute-rgt-neg-in41.6%
associate-*r*48.0%
Simplified48.0%
if 2.5000000000000001e230 < y Initial program 100.0%
Taylor expanded in y around 0 27.3%
Taylor expanded in b around 0 3.8%
Taylor expanded in z around 0 3.8%
mul-1-neg3.8%
unsub-neg3.8%
Simplified3.8%
Taylor expanded in a around inf 32.3%
mul-1-neg32.3%
*-commutative32.3%
distribute-rgt-neg-in32.3%
Simplified32.3%
Final simplification39.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -6.6e+72)
(- x (* t (* x y)))
(if (<= y 6e-15)
(- x (* b (* x a)))
(if (<= y 6.5e+179)
(* z (* x (- a)))
(if (<= y 8.5e+229) (* x (* y (- t))) (* a (* x (- z))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -6.6e+72) {
tmp = x - (t * (x * y));
} else if (y <= 6e-15) {
tmp = x - (b * (x * a));
} else if (y <= 6.5e+179) {
tmp = z * (x * -a);
} else if (y <= 8.5e+229) {
tmp = x * (y * -t);
} else {
tmp = a * (x * -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 <= (-6.6d+72)) then
tmp = x - (t * (x * y))
else if (y <= 6d-15) then
tmp = x - (b * (x * a))
else if (y <= 6.5d+179) then
tmp = z * (x * -a)
else if (y <= 8.5d+229) then
tmp = x * (y * -t)
else
tmp = a * (x * -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 <= -6.6e+72) {
tmp = x - (t * (x * y));
} else if (y <= 6e-15) {
tmp = x - (b * (x * a));
} else if (y <= 6.5e+179) {
tmp = z * (x * -a);
} else if (y <= 8.5e+229) {
tmp = x * (y * -t);
} else {
tmp = a * (x * -z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -6.6e+72: tmp = x - (t * (x * y)) elif y <= 6e-15: tmp = x - (b * (x * a)) elif y <= 6.5e+179: tmp = z * (x * -a) elif y <= 8.5e+229: tmp = x * (y * -t) else: tmp = a * (x * -z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -6.6e+72) tmp = Float64(x - Float64(t * Float64(x * y))); elseif (y <= 6e-15) tmp = Float64(x - Float64(b * Float64(x * a))); elseif (y <= 6.5e+179) tmp = Float64(z * Float64(x * Float64(-a))); elseif (y <= 8.5e+229) tmp = Float64(x * Float64(y * Float64(-t))); else tmp = Float64(a * Float64(x * Float64(-z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -6.6e+72) tmp = x - (t * (x * y)); elseif (y <= 6e-15) tmp = x - (b * (x * a)); elseif (y <= 6.5e+179) tmp = z * (x * -a); elseif (y <= 8.5e+229) tmp = x * (y * -t); else tmp = a * (x * -z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -6.6e+72], N[(x - N[(t * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6e-15], N[(x - N[(b * N[(x * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.5e+179], N[(z * N[(x * (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.5e+229], N[(x * N[(y * (-t)), $MachinePrecision]), $MachinePrecision], N[(a * N[(x * (-z)), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.6 \cdot 10^{+72}:\\
\;\;\;\;x - t \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;y \leq 6 \cdot 10^{-15}:\\
\;\;\;\;x - b \cdot \left(x \cdot a\right)\\
\mathbf{elif}\;y \leq 6.5 \cdot 10^{+179}:\\
\;\;\;\;z \cdot \left(x \cdot \left(-a\right)\right)\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{+229}:\\
\;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-z\right)\right)\\
\end{array}
\end{array}
if y < -6.6e72Initial program 100.0%
fma-def100.0%
sub-neg100.0%
log1p-def100.0%
Simplified100.0%
Taylor expanded in a around 0 90.7%
Taylor expanded in t around inf 61.6%
mul-1-neg61.6%
distribute-lft-neg-out61.6%
*-commutative61.6%
Simplified61.6%
Taylor expanded in y around 0 30.0%
mul-1-neg30.0%
unsub-neg30.0%
*-commutative30.0%
associate-*l*24.9%
*-commutative24.9%
Simplified24.9%
Taylor expanded in x around 0 30.0%
if -6.6e72 < y < 6e-15Initial program 95.3%
fma-def95.3%
sub-neg95.3%
log1p-def100.0%
Simplified100.0%
add-log-exp100.0%
add-cube-cbrt99.9%
log-prod99.9%
Applied egg-rr91.3%
log-pow91.3%
distribute-lft1-in91.3%
metadata-eval91.3%
Simplified91.3%
Taylor expanded in b around inf 77.6%
mul-1-neg77.6%
*-commutative77.6%
distribute-rgt-neg-in77.6%
Simplified77.6%
Taylor expanded in b around 0 44.3%
mul-1-neg44.3%
unsub-neg44.3%
associate-*r*46.6%
*-commutative46.6%
associate-*l*45.6%
Simplified45.6%
if 6e-15 < y < 6.50000000000000052e179Initial program 97.7%
Taylor expanded in y around 0 40.5%
Taylor expanded in b around 0 6.1%
Taylor expanded in z around 0 6.2%
mul-1-neg6.2%
unsub-neg6.2%
Simplified6.2%
Taylor expanded in a around inf 30.9%
mul-1-neg30.9%
associate-*r*33.0%
Simplified33.0%
if 6.50000000000000052e179 < y < 8.49999999999999966e229Initial program 100.0%
fma-def100.0%
sub-neg100.0%
log1p-def100.0%
Simplified100.0%
Taylor expanded in a around 0 100.0%
Taylor expanded in t around inf 74.3%
mul-1-neg74.3%
distribute-lft-neg-out74.3%
*-commutative74.3%
Simplified74.3%
Taylor expanded in y around 0 35.5%
mul-1-neg35.5%
unsub-neg35.5%
*-commutative35.5%
associate-*l*42.0%
*-commutative42.0%
Simplified42.0%
Taylor expanded in t around inf 41.6%
mul-1-neg41.6%
associate-*r*41.6%
*-commutative41.6%
distribute-rgt-neg-in41.6%
associate-*r*48.0%
Simplified48.0%
if 8.49999999999999966e229 < y Initial program 100.0%
Taylor expanded in y around 0 27.3%
Taylor expanded in b around 0 3.8%
Taylor expanded in z around 0 3.8%
mul-1-neg3.8%
unsub-neg3.8%
Simplified3.8%
Taylor expanded in a around inf 32.3%
mul-1-neg32.3%
*-commutative32.3%
distribute-rgt-neg-in32.3%
Simplified32.3%
Final simplification39.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -2.6e+70)
(- x (* t (* x y)))
(if (<= y 3.5e-11)
(- x (* x (* a b)))
(if (<= y 4e+186)
(* z (* x (- a)))
(if (<= y 9.5e+229) (* x (* y (- t))) (* a (* x (- z))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.6e+70) {
tmp = x - (t * (x * y));
} else if (y <= 3.5e-11) {
tmp = x - (x * (a * b));
} else if (y <= 4e+186) {
tmp = z * (x * -a);
} else if (y <= 9.5e+229) {
tmp = x * (y * -t);
} else {
tmp = a * (x * -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 <= (-2.6d+70)) then
tmp = x - (t * (x * y))
else if (y <= 3.5d-11) then
tmp = x - (x * (a * b))
else if (y <= 4d+186) then
tmp = z * (x * -a)
else if (y <= 9.5d+229) then
tmp = x * (y * -t)
else
tmp = a * (x * -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 <= -2.6e+70) {
tmp = x - (t * (x * y));
} else if (y <= 3.5e-11) {
tmp = x - (x * (a * b));
} else if (y <= 4e+186) {
tmp = z * (x * -a);
} else if (y <= 9.5e+229) {
tmp = x * (y * -t);
} else {
tmp = a * (x * -z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2.6e+70: tmp = x - (t * (x * y)) elif y <= 3.5e-11: tmp = x - (x * (a * b)) elif y <= 4e+186: tmp = z * (x * -a) elif y <= 9.5e+229: tmp = x * (y * -t) else: tmp = a * (x * -z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2.6e+70) tmp = Float64(x - Float64(t * Float64(x * y))); elseif (y <= 3.5e-11) tmp = Float64(x - Float64(x * Float64(a * b))); elseif (y <= 4e+186) tmp = Float64(z * Float64(x * Float64(-a))); elseif (y <= 9.5e+229) tmp = Float64(x * Float64(y * Float64(-t))); else tmp = Float64(a * Float64(x * Float64(-z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -2.6e+70) tmp = x - (t * (x * y)); elseif (y <= 3.5e-11) tmp = x - (x * (a * b)); elseif (y <= 4e+186) tmp = z * (x * -a); elseif (y <= 9.5e+229) tmp = x * (y * -t); else tmp = a * (x * -z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.6e+70], N[(x - N[(t * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.5e-11], N[(x - N[(x * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4e+186], N[(z * N[(x * (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.5e+229], N[(x * N[(y * (-t)), $MachinePrecision]), $MachinePrecision], N[(a * N[(x * (-z)), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.6 \cdot 10^{+70}:\\
\;\;\;\;x - t \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{-11}:\\
\;\;\;\;x - x \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;y \leq 4 \cdot 10^{+186}:\\
\;\;\;\;z \cdot \left(x \cdot \left(-a\right)\right)\\
\mathbf{elif}\;y \leq 9.5 \cdot 10^{+229}:\\
\;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-z\right)\right)\\
\end{array}
\end{array}
if y < -2.6e70Initial program 100.0%
fma-def100.0%
sub-neg100.0%
log1p-def100.0%
Simplified100.0%
Taylor expanded in a around 0 90.7%
Taylor expanded in t around inf 61.6%
mul-1-neg61.6%
distribute-lft-neg-out61.6%
*-commutative61.6%
Simplified61.6%
Taylor expanded in y around 0 30.0%
mul-1-neg30.0%
unsub-neg30.0%
*-commutative30.0%
associate-*l*24.9%
*-commutative24.9%
Simplified24.9%
Taylor expanded in x around 0 30.0%
if -2.6e70 < y < 3.50000000000000019e-11Initial program 95.3%
Taylor expanded in y around 0 80.7%
Taylor expanded in z around 0 77.6%
mul-1-neg77.6%
*-commutative77.6%
distribute-rgt-neg-in77.6%
Simplified77.6%
Taylor expanded in b around 0 44.3%
mul-1-neg44.3%
unsub-neg44.3%
associate-*r*46.6%
*-commutative46.6%
Simplified46.6%
if 3.50000000000000019e-11 < y < 3.99999999999999992e186Initial program 97.7%
Taylor expanded in y around 0 40.5%
Taylor expanded in b around 0 6.1%
Taylor expanded in z around 0 6.2%
mul-1-neg6.2%
unsub-neg6.2%
Simplified6.2%
Taylor expanded in a around inf 30.9%
mul-1-neg30.9%
associate-*r*33.0%
Simplified33.0%
if 3.99999999999999992e186 < y < 9.5e229Initial program 100.0%
fma-def100.0%
sub-neg100.0%
log1p-def100.0%
Simplified100.0%
Taylor expanded in a around 0 100.0%
Taylor expanded in t around inf 74.3%
mul-1-neg74.3%
distribute-lft-neg-out74.3%
*-commutative74.3%
Simplified74.3%
Taylor expanded in y around 0 35.5%
mul-1-neg35.5%
unsub-neg35.5%
*-commutative35.5%
associate-*l*42.0%
*-commutative42.0%
Simplified42.0%
Taylor expanded in t around inf 41.6%
mul-1-neg41.6%
associate-*r*41.6%
*-commutative41.6%
distribute-rgt-neg-in41.6%
associate-*r*48.0%
Simplified48.0%
if 9.5e229 < y Initial program 100.0%
Taylor expanded in y around 0 27.3%
Taylor expanded in b around 0 3.8%
Taylor expanded in z around 0 3.8%
mul-1-neg3.8%
unsub-neg3.8%
Simplified3.8%
Taylor expanded in a around inf 32.3%
mul-1-neg32.3%
*-commutative32.3%
distribute-rgt-neg-in32.3%
Simplified32.3%
Final simplification39.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2.8e-11) (not (<= y 1.8e-11))) (* z (* x (- a))) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.8e-11) || !(y <= 1.8e-11)) {
tmp = z * (x * -a);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-2.8d-11)) .or. (.not. (y <= 1.8d-11))) then
tmp = z * (x * -a)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.8e-11) || !(y <= 1.8e-11)) {
tmp = z * (x * -a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2.8e-11) or not (y <= 1.8e-11): tmp = z * (x * -a) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -2.8e-11) || !(y <= 1.8e-11)) tmp = Float64(z * Float64(x * Float64(-a))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -2.8e-11) || ~((y <= 1.8e-11))) tmp = z * (x * -a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2.8e-11], N[Not[LessEqual[y, 1.8e-11]], $MachinePrecision]], N[(z * N[(x * (-a)), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.8 \cdot 10^{-11} \lor \neg \left(y \leq 1.8 \cdot 10^{-11}\right):\\
\;\;\;\;z \cdot \left(x \cdot \left(-a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -2.8e-11 or 1.79999999999999992e-11 < y Initial program 99.3%
Taylor expanded in y around 0 37.0%
Taylor expanded in b around 0 4.7%
Taylor expanded in z around 0 4.6%
mul-1-neg4.6%
unsub-neg4.6%
Simplified4.6%
Taylor expanded in a around inf 21.9%
mul-1-neg21.9%
associate-*r*23.5%
Simplified23.5%
if -2.8e-11 < y < 1.79999999999999992e-11Initial program 94.8%
Taylor expanded in y around 0 84.3%
Taylor expanded in a around 0 37.0%
Final simplification29.4%
(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.3%
Taylor expanded in y around 0 57.7%
Taylor expanded in a around 0 18.5%
Final simplification18.5%
herbie shell --seed 2023320
(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))))))