
(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 (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.3%
fma-define97.3%
sub-neg97.3%
log1p-define99.6%
Simplified99.6%
(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}
Initial program 97.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -3.4e-65) (not (<= y 4e-89))) (* x (exp (* y (- (log z) t)))) (* x (exp (* a (- (- b) z))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.4e-65) || !(y <= 4e-89)) {
tmp = x * exp((y * (log(z) - t)));
} else {
tmp = x * exp((a * (-b - 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.4d-65)) .or. (.not. (y <= 4d-89))) then
tmp = x * exp((y * (log(z) - t)))
else
tmp = x * exp((a * (-b - 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.4e-65) || !(y <= 4e-89)) {
tmp = x * Math.exp((y * (Math.log(z) - t)));
} else {
tmp = x * Math.exp((a * (-b - z)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -3.4e-65) or not (y <= 4e-89): tmp = x * math.exp((y * (math.log(z) - t))) else: tmp = x * math.exp((a * (-b - z))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -3.4e-65) || !(y <= 4e-89)) tmp = Float64(x * exp(Float64(y * Float64(log(z) - t)))); else tmp = Float64(x * exp(Float64(a * Float64(Float64(-b) - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -3.4e-65) || ~((y <= 4e-89))) tmp = x * exp((y * (log(z) - t))); else tmp = x * exp((a * (-b - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -3.4e-65], N[Not[LessEqual[y, 4e-89]], $MachinePrecision]], N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(a * N[((-b) - z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.4 \cdot 10^{-65} \lor \neg \left(y \leq 4 \cdot 10^{-89}\right):\\
\;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(\left(-b\right) - z\right)}\\
\end{array}
\end{array}
if y < -3.39999999999999987e-65 or 4.00000000000000015e-89 < y Initial program 96.3%
Taylor expanded in y around inf 86.6%
if -3.39999999999999987e-65 < y < 4.00000000000000015e-89Initial program 99.0%
Taylor expanded in y around 0 92.9%
sub-neg92.9%
log1p-define93.9%
Simplified93.9%
Taylor expanded in z around 0 93.9%
mul-1-neg93.9%
Simplified93.9%
Final simplification89.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (pow z y))))
(if (<= y -2.1e+21)
t_1
(if (<= y -1.8e-65)
(* x (exp (* t (- y))))
(if (<= y 1.5e+33) (* x (exp (* a (- b)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * pow(z, y);
double tmp;
if (y <= -2.1e+21) {
tmp = t_1;
} else if (y <= -1.8e-65) {
tmp = x * exp((t * -y));
} else if (y <= 1.5e+33) {
tmp = x * exp((a * -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) :: tmp
t_1 = x * (z ** y)
if (y <= (-2.1d+21)) then
tmp = t_1
else if (y <= (-1.8d-65)) then
tmp = x * exp((t * -y))
else if (y <= 1.5d+33) then
tmp = x * exp((a * -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 * Math.pow(z, y);
double tmp;
if (y <= -2.1e+21) {
tmp = t_1;
} else if (y <= -1.8e-65) {
tmp = x * Math.exp((t * -y));
} else if (y <= 1.5e+33) {
tmp = x * Math.exp((a * -b));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * math.pow(z, y) tmp = 0 if y <= -2.1e+21: tmp = t_1 elif y <= -1.8e-65: tmp = x * math.exp((t * -y)) elif y <= 1.5e+33: tmp = x * math.exp((a * -b)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * (z ^ y)) tmp = 0.0 if (y <= -2.1e+21) tmp = t_1; elseif (y <= -1.8e-65) tmp = Float64(x * exp(Float64(t * Float64(-y)))); elseif (y <= 1.5e+33) tmp = Float64(x * exp(Float64(a * Float64(-b)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * (z ^ y); tmp = 0.0; if (y <= -2.1e+21) tmp = t_1; elseif (y <= -1.8e-65) tmp = x * exp((t * -y)); elseif (y <= 1.5e+33) tmp = x * exp((a * -b)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.1e+21], t$95$1, If[LessEqual[y, -1.8e-65], N[(x * N[Exp[N[(t * (-y)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.5e+33], N[(x * N[Exp[N[(a * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot {z}^{y}\\
\mathbf{if}\;y \leq -2.1 \cdot 10^{+21}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.8 \cdot 10^{-65}:\\
\;\;\;\;x \cdot e^{t \cdot \left(-y\right)}\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{+33}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.1e21 or 1.49999999999999992e33 < y Initial program 98.2%
Taylor expanded in y around inf 91.9%
Taylor expanded in t around 0 72.3%
if -2.1e21 < y < -1.7999999999999999e-65Initial program 91.7%
Taylor expanded in t around inf 66.3%
mul-1-neg66.3%
distribute-lft-neg-out66.3%
*-commutative66.3%
Simplified66.3%
if -1.7999999999999999e-65 < y < 1.49999999999999992e33Initial program 97.6%
Taylor expanded in b around inf 84.4%
mul-1-neg84.4%
distribute-rgt-neg-out84.4%
Simplified84.4%
Final simplification77.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2e+21) (not (<= y 1.7e+33))) (* x (pow z y)) (* x (exp (* a (- (- b) z))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2e+21) || !(y <= 1.7e+33)) {
tmp = x * pow(z, y);
} else {
tmp = x * exp((a * (-b - 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 <= (-2d+21)) .or. (.not. (y <= 1.7d+33))) then
tmp = x * (z ** y)
else
tmp = x * exp((a * (-b - 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 <= -2e+21) || !(y <= 1.7e+33)) {
tmp = x * Math.pow(z, y);
} else {
tmp = x * Math.exp((a * (-b - z)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2e+21) or not (y <= 1.7e+33): tmp = x * math.pow(z, y) else: tmp = x * math.exp((a * (-b - z))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -2e+21) || !(y <= 1.7e+33)) tmp = Float64(x * (z ^ y)); else tmp = Float64(x * exp(Float64(a * Float64(Float64(-b) - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -2e+21) || ~((y <= 1.7e+33))) tmp = x * (z ^ y); else tmp = x * exp((a * (-b - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2e+21], N[Not[LessEqual[y, 1.7e+33]], $MachinePrecision]], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(a * N[((-b) - z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{+21} \lor \neg \left(y \leq 1.7 \cdot 10^{+33}\right):\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(\left(-b\right) - z\right)}\\
\end{array}
\end{array}
if y < -2e21 or 1.7e33 < y Initial program 98.2%
Taylor expanded in y around inf 91.9%
Taylor expanded in t around 0 72.3%
if -2e21 < y < 1.7e33Initial program 96.6%
Taylor expanded in y around 0 78.2%
sub-neg78.2%
log1p-define81.6%
Simplified81.6%
Taylor expanded in z around 0 81.6%
mul-1-neg81.6%
Simplified81.6%
Final simplification77.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -3.7e+21) (not (<= y 1.5e+33))) (* 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.7e+21) || !(y <= 1.5e+33)) {
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.7d+21)) .or. (.not. (y <= 1.5d+33))) 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.7e+21) || !(y <= 1.5e+33)) {
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.7e+21) or not (y <= 1.5e+33): 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.7e+21) || !(y <= 1.5e+33)) 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 <= -3.7e+21) || ~((y <= 1.5e+33))) 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.7e+21], N[Not[LessEqual[y, 1.5e+33]], $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.7 \cdot 10^{+21} \lor \neg \left(y \leq 1.5 \cdot 10^{+33}\right):\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\
\end{array}
\end{array}
if y < -3.7e21 or 1.49999999999999992e33 < y Initial program 98.2%
Taylor expanded in y around inf 91.9%
Taylor expanded in t around 0 72.3%
if -3.7e21 < y < 1.49999999999999992e33Initial program 96.6%
Taylor expanded in b around inf 77.6%
mul-1-neg77.6%
distribute-rgt-neg-out77.6%
Simplified77.6%
Final simplification75.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.36e-8) (not (<= y 1.45e-32))) (* x (pow z y)) (* x (- 1.0 (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.36e-8) || !(y <= 1.45e-32)) {
tmp = x * pow(z, y);
} else {
tmp = x * (1.0 - (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.36d-8)) .or. (.not. (y <= 1.45d-32))) then
tmp = x * (z ** y)
else
tmp = x * (1.0d0 - (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.36e-8) || !(y <= 1.45e-32)) {
tmp = x * Math.pow(z, y);
} else {
tmp = x * (1.0 - (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.36e-8) or not (y <= 1.45e-32): tmp = x * math.pow(z, y) else: tmp = x * (1.0 - (a * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.36e-8) || !(y <= 1.45e-32)) tmp = Float64(x * (z ^ y)); else tmp = Float64(x * Float64(1.0 - Float64(a * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.36e-8) || ~((y <= 1.45e-32))) tmp = x * (z ^ y); else tmp = x * (1.0 - (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.36e-8], N[Not[LessEqual[y, 1.45e-32]], $MachinePrecision]], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.36 \cdot 10^{-8} \lor \neg \left(y \leq 1.45 \cdot 10^{-32}\right):\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\
\end{array}
\end{array}
if y < -1.3599999999999999e-8 or 1.44999999999999998e-32 < y Initial program 97.8%
Taylor expanded in y around inf 89.7%
Taylor expanded in t around 0 67.7%
if -1.3599999999999999e-8 < y < 1.44999999999999998e-32Initial program 96.8%
Taylor expanded in b around inf 81.0%
mul-1-neg81.0%
distribute-rgt-neg-out81.0%
Simplified81.0%
Taylor expanded in a around 0 42.8%
mul-1-neg42.8%
unsub-neg42.8%
Simplified42.8%
Taylor expanded in x around 0 45.9%
Final simplification57.3%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -1.1e+179)
(* t (* x (- y)))
(if (<= y -8.5e-50)
(* (- b) (* x a))
(if (<= y 2.85e+41) (* x (- 1.0 (* a b))) (* x (* a (- b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.1e+179) {
tmp = t * (x * -y);
} else if (y <= -8.5e-50) {
tmp = -b * (x * a);
} else if (y <= 2.85e+41) {
tmp = x * (1.0 - (a * b));
} else {
tmp = x * (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.1d+179)) then
tmp = t * (x * -y)
else if (y <= (-8.5d-50)) then
tmp = -b * (x * a)
else if (y <= 2.85d+41) then
tmp = x * (1.0d0 - (a * b))
else
tmp = x * (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.1e+179) {
tmp = t * (x * -y);
} else if (y <= -8.5e-50) {
tmp = -b * (x * a);
} else if (y <= 2.85e+41) {
tmp = x * (1.0 - (a * b));
} else {
tmp = x * (a * -b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.1e+179: tmp = t * (x * -y) elif y <= -8.5e-50: tmp = -b * (x * a) elif y <= 2.85e+41: tmp = x * (1.0 - (a * b)) else: tmp = x * (a * -b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.1e+179) tmp = Float64(t * Float64(x * Float64(-y))); elseif (y <= -8.5e-50) tmp = Float64(Float64(-b) * Float64(x * a)); elseif (y <= 2.85e+41) tmp = Float64(x * Float64(1.0 - Float64(a * b))); else tmp = Float64(x * Float64(a * Float64(-b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.1e+179) tmp = t * (x * -y); elseif (y <= -8.5e-50) tmp = -b * (x * a); elseif (y <= 2.85e+41) tmp = x * (1.0 - (a * b)); else tmp = x * (a * -b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.1e+179], N[(t * N[(x * (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -8.5e-50], N[((-b) * N[(x * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.85e+41], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(a * (-b)), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.1 \cdot 10^{+179}:\\
\;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\
\mathbf{elif}\;y \leq -8.5 \cdot 10^{-50}:\\
\;\;\;\;\left(-b\right) \cdot \left(x \cdot a\right)\\
\mathbf{elif}\;y \leq 2.85 \cdot 10^{+41}:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(a \cdot \left(-b\right)\right)\\
\end{array}
\end{array}
if y < -1.1e179Initial program 95.9%
Taylor expanded in t around inf 71.8%
mul-1-neg71.8%
distribute-lft-neg-out71.8%
*-commutative71.8%
Simplified71.8%
Taylor expanded in y around 0 35.4%
mul-1-neg35.4%
unsub-neg35.4%
*-commutative35.4%
Simplified35.4%
Taylor expanded in y around inf 46.9%
if -1.1e179 < y < -8.50000000000000012e-50Initial program 98.2%
Taylor expanded in b around inf 44.0%
mul-1-neg44.0%
distribute-rgt-neg-out44.0%
Simplified44.0%
Taylor expanded in a around 0 15.1%
mul-1-neg15.1%
unsub-neg15.1%
Simplified15.1%
Taylor expanded in a around inf 24.9%
associate-*r*24.9%
neg-mul-124.9%
*-commutative24.9%
associate-*l*29.9%
distribute-rgt-neg-in29.9%
*-commutative29.9%
distribute-rgt-neg-in29.9%
Simplified29.9%
if -8.50000000000000012e-50 < y < 2.8500000000000001e41Initial program 96.9%
Taylor expanded in b around inf 81.9%
mul-1-neg81.9%
distribute-rgt-neg-out81.9%
Simplified81.9%
Taylor expanded in a around 0 42.2%
mul-1-neg42.2%
unsub-neg42.2%
Simplified42.2%
Taylor expanded in x around 0 45.9%
if 2.8500000000000001e41 < y Initial program 97.9%
Taylor expanded in b around inf 29.6%
mul-1-neg29.6%
distribute-rgt-neg-out29.6%
Simplified29.6%
Taylor expanded in a around 0 11.5%
mul-1-neg11.5%
unsub-neg11.5%
Simplified11.5%
Taylor expanded in a around inf 29.1%
associate-*r*29.1%
neg-mul-129.1%
*-commutative29.1%
associate-*l*27.3%
distribute-rgt-neg-in27.3%
*-commutative27.3%
distribute-rgt-neg-in27.3%
Simplified27.3%
Taylor expanded in b around 0 29.1%
associate-*r*29.1%
associate-*r*31.3%
mul-1-neg31.3%
distribute-lft-neg-in31.3%
distribute-rgt-neg-out31.3%
*-commutative31.3%
Simplified31.3%
Final simplification39.7%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -1.3e+182)
(* t (* x (- y)))
(if (<= y -6.2e-200)
(* (- b) (* x a))
(if (<= y 2.1e+30) x (* x (* a (- b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.3e+182) {
tmp = t * (x * -y);
} else if (y <= -6.2e-200) {
tmp = -b * (x * a);
} else if (y <= 2.1e+30) {
tmp = x;
} else {
tmp = x * (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.3d+182)) then
tmp = t * (x * -y)
else if (y <= (-6.2d-200)) then
tmp = -b * (x * a)
else if (y <= 2.1d+30) then
tmp = x
else
tmp = x * (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.3e+182) {
tmp = t * (x * -y);
} else if (y <= -6.2e-200) {
tmp = -b * (x * a);
} else if (y <= 2.1e+30) {
tmp = x;
} else {
tmp = x * (a * -b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.3e+182: tmp = t * (x * -y) elif y <= -6.2e-200: tmp = -b * (x * a) elif y <= 2.1e+30: tmp = x else: tmp = x * (a * -b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.3e+182) tmp = Float64(t * Float64(x * Float64(-y))); elseif (y <= -6.2e-200) tmp = Float64(Float64(-b) * Float64(x * a)); elseif (y <= 2.1e+30) tmp = x; else tmp = Float64(x * Float64(a * Float64(-b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.3e+182) tmp = t * (x * -y); elseif (y <= -6.2e-200) tmp = -b * (x * a); elseif (y <= 2.1e+30) tmp = x; else tmp = x * (a * -b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.3e+182], N[(t * N[(x * (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -6.2e-200], N[((-b) * N[(x * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.1e+30], x, N[(x * N[(a * (-b)), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.3 \cdot 10^{+182}:\\
\;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\
\mathbf{elif}\;y \leq -6.2 \cdot 10^{-200}:\\
\;\;\;\;\left(-b\right) \cdot \left(x \cdot a\right)\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{+30}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(a \cdot \left(-b\right)\right)\\
\end{array}
\end{array}
if y < -1.3e182Initial program 95.9%
Taylor expanded in t around inf 71.8%
mul-1-neg71.8%
distribute-lft-neg-out71.8%
*-commutative71.8%
Simplified71.8%
Taylor expanded in y around 0 35.4%
mul-1-neg35.4%
unsub-neg35.4%
*-commutative35.4%
Simplified35.4%
Taylor expanded in y around inf 46.9%
if -1.3e182 < y < -6.1999999999999998e-200Initial program 97.6%
Taylor expanded in b around inf 55.4%
mul-1-neg55.4%
distribute-rgt-neg-out55.4%
Simplified55.4%
Taylor expanded in a around 0 22.0%
mul-1-neg22.0%
unsub-neg22.0%
Simplified22.0%
Taylor expanded in a around inf 22.8%
associate-*r*22.8%
neg-mul-122.8%
*-commutative22.8%
associate-*l*28.4%
distribute-rgt-neg-in28.4%
*-commutative28.4%
distribute-rgt-neg-in28.4%
Simplified28.4%
if -6.1999999999999998e-200 < y < 2.1e30Initial program 97.0%
Taylor expanded in b around inf 84.0%
mul-1-neg84.0%
distribute-rgt-neg-out84.0%
Simplified84.0%
Taylor expanded in a around 0 35.6%
if 2.1e30 < y Initial program 98.0%
Taylor expanded in b around inf 30.0%
mul-1-neg30.0%
distribute-rgt-neg-out30.0%
Simplified30.0%
Taylor expanded in a around 0 11.1%
mul-1-neg11.1%
unsub-neg11.1%
Simplified11.1%
Taylor expanded in a around inf 27.6%
associate-*r*27.6%
neg-mul-127.6%
*-commutative27.6%
associate-*l*25.9%
distribute-rgt-neg-in25.9%
*-commutative25.9%
distribute-rgt-neg-in25.9%
Simplified25.9%
Taylor expanded in b around 0 27.6%
associate-*r*27.6%
associate-*r*31.6%
mul-1-neg31.6%
distribute-lft-neg-in31.6%
distribute-rgt-neg-out31.6%
*-commutative31.6%
Simplified31.6%
Final simplification33.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -5.3e+203)
(* y (* x (- t)))
(if (<= y -5.4e-200)
(* (- b) (* x a))
(if (<= y 2.1e+30) x (* x (* a (- b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -5.3e+203) {
tmp = y * (x * -t);
} else if (y <= -5.4e-200) {
tmp = -b * (x * a);
} else if (y <= 2.1e+30) {
tmp = x;
} else {
tmp = x * (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 <= (-5.3d+203)) then
tmp = y * (x * -t)
else if (y <= (-5.4d-200)) then
tmp = -b * (x * a)
else if (y <= 2.1d+30) then
tmp = x
else
tmp = x * (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 <= -5.3e+203) {
tmp = y * (x * -t);
} else if (y <= -5.4e-200) {
tmp = -b * (x * a);
} else if (y <= 2.1e+30) {
tmp = x;
} else {
tmp = x * (a * -b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -5.3e+203: tmp = y * (x * -t) elif y <= -5.4e-200: tmp = -b * (x * a) elif y <= 2.1e+30: tmp = x else: tmp = x * (a * -b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -5.3e+203) tmp = Float64(y * Float64(x * Float64(-t))); elseif (y <= -5.4e-200) tmp = Float64(Float64(-b) * Float64(x * a)); elseif (y <= 2.1e+30) tmp = x; else tmp = Float64(x * Float64(a * Float64(-b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -5.3e+203) tmp = y * (x * -t); elseif (y <= -5.4e-200) tmp = -b * (x * a); elseif (y <= 2.1e+30) tmp = x; else tmp = x * (a * -b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -5.3e+203], N[(y * N[(x * (-t)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -5.4e-200], N[((-b) * N[(x * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.1e+30], x, N[(x * N[(a * (-b)), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.3 \cdot 10^{+203}:\\
\;\;\;\;y \cdot \left(x \cdot \left(-t\right)\right)\\
\mathbf{elif}\;y \leq -5.4 \cdot 10^{-200}:\\
\;\;\;\;\left(-b\right) \cdot \left(x \cdot a\right)\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{+30}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(a \cdot \left(-b\right)\right)\\
\end{array}
\end{array}
if y < -5.29999999999999987e203Initial program 94.5%
Taylor expanded in t around inf 73.0%
mul-1-neg73.0%
distribute-lft-neg-out73.0%
*-commutative73.0%
Simplified73.0%
Taylor expanded in y around 0 40.5%
mul-1-neg40.5%
unsub-neg40.5%
*-commutative40.5%
Simplified40.5%
Taylor expanded in y around inf 50.8%
mul-1-neg50.8%
associate-*r*45.6%
*-commutative45.6%
distribute-lft-neg-in45.6%
*-commutative45.6%
Simplified45.6%
if -5.29999999999999987e203 < y < -5.4000000000000003e-200Initial program 97.8%
Taylor expanded in b around inf 55.1%
mul-1-neg55.1%
distribute-rgt-neg-out55.1%
Simplified55.1%
Taylor expanded in a around 0 22.9%
mul-1-neg22.9%
unsub-neg22.9%
Simplified22.9%
Taylor expanded in a around inf 23.5%
associate-*r*23.5%
neg-mul-123.5%
*-commutative23.5%
associate-*l*28.8%
distribute-rgt-neg-in28.8%
*-commutative28.8%
distribute-rgt-neg-in28.8%
Simplified28.8%
if -5.4000000000000003e-200 < y < 2.1e30Initial program 97.0%
Taylor expanded in b around inf 84.0%
mul-1-neg84.0%
distribute-rgt-neg-out84.0%
Simplified84.0%
Taylor expanded in a around 0 35.6%
if 2.1e30 < y Initial program 98.0%
Taylor expanded in b around inf 30.0%
mul-1-neg30.0%
distribute-rgt-neg-out30.0%
Simplified30.0%
Taylor expanded in a around 0 11.1%
mul-1-neg11.1%
unsub-neg11.1%
Simplified11.1%
Taylor expanded in a around inf 27.6%
associate-*r*27.6%
neg-mul-127.6%
*-commutative27.6%
associate-*l*25.9%
distribute-rgt-neg-in25.9%
*-commutative25.9%
distribute-rgt-neg-in25.9%
Simplified25.9%
Taylor expanded in b around 0 27.6%
associate-*r*27.6%
associate-*r*31.6%
mul-1-neg31.6%
distribute-lft-neg-in31.6%
distribute-rgt-neg-out31.6%
*-commutative31.6%
Simplified31.6%
Final simplification33.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -3.3e+203)
(* x (* t (- y)))
(if (<= y -6.2e-200)
(* (- b) (* x a))
(if (<= y 2.1e+30) x (* x (* a (- b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -3.3e+203) {
tmp = x * (t * -y);
} else if (y <= -6.2e-200) {
tmp = -b * (x * a);
} else if (y <= 2.1e+30) {
tmp = x;
} else {
tmp = x * (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.3d+203)) then
tmp = x * (t * -y)
else if (y <= (-6.2d-200)) then
tmp = -b * (x * a)
else if (y <= 2.1d+30) then
tmp = x
else
tmp = x * (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.3e+203) {
tmp = x * (t * -y);
} else if (y <= -6.2e-200) {
tmp = -b * (x * a);
} else if (y <= 2.1e+30) {
tmp = x;
} else {
tmp = x * (a * -b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -3.3e+203: tmp = x * (t * -y) elif y <= -6.2e-200: tmp = -b * (x * a) elif y <= 2.1e+30: tmp = x else: tmp = x * (a * -b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -3.3e+203) tmp = Float64(x * Float64(t * Float64(-y))); elseif (y <= -6.2e-200) tmp = Float64(Float64(-b) * Float64(x * a)); elseif (y <= 2.1e+30) tmp = x; else tmp = Float64(x * Float64(a * Float64(-b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -3.3e+203) tmp = x * (t * -y); elseif (y <= -6.2e-200) tmp = -b * (x * a); elseif (y <= 2.1e+30) tmp = x; else tmp = x * (a * -b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -3.3e+203], N[(x * N[(t * (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -6.2e-200], N[((-b) * N[(x * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.1e+30], x, N[(x * N[(a * (-b)), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.3 \cdot 10^{+203}:\\
\;\;\;\;x \cdot \left(t \cdot \left(-y\right)\right)\\
\mathbf{elif}\;y \leq -6.2 \cdot 10^{-200}:\\
\;\;\;\;\left(-b\right) \cdot \left(x \cdot a\right)\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{+30}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(a \cdot \left(-b\right)\right)\\
\end{array}
\end{array}
if y < -3.29999999999999989e203Initial program 94.5%
Taylor expanded in t around inf 73.0%
mul-1-neg73.0%
distribute-lft-neg-out73.0%
*-commutative73.0%
Simplified73.0%
Taylor expanded in y around 0 40.5%
mul-1-neg40.5%
unsub-neg40.5%
*-commutative40.5%
Simplified40.5%
Taylor expanded in y around inf 50.8%
mul-1-neg50.8%
distribute-lft-neg-in50.8%
*-commutative50.8%
associate-*r*40.4%
Simplified40.4%
if -3.29999999999999989e203 < y < -6.1999999999999998e-200Initial program 97.8%
Taylor expanded in b around inf 55.1%
mul-1-neg55.1%
distribute-rgt-neg-out55.1%
Simplified55.1%
Taylor expanded in a around 0 22.9%
mul-1-neg22.9%
unsub-neg22.9%
Simplified22.9%
Taylor expanded in a around inf 23.5%
associate-*r*23.5%
neg-mul-123.5%
*-commutative23.5%
associate-*l*28.8%
distribute-rgt-neg-in28.8%
*-commutative28.8%
distribute-rgt-neg-in28.8%
Simplified28.8%
if -6.1999999999999998e-200 < y < 2.1e30Initial program 97.0%
Taylor expanded in b around inf 84.0%
mul-1-neg84.0%
distribute-rgt-neg-out84.0%
Simplified84.0%
Taylor expanded in a around 0 35.6%
if 2.1e30 < y Initial program 98.0%
Taylor expanded in b around inf 30.0%
mul-1-neg30.0%
distribute-rgt-neg-out30.0%
Simplified30.0%
Taylor expanded in a around 0 11.1%
mul-1-neg11.1%
unsub-neg11.1%
Simplified11.1%
Taylor expanded in a around inf 27.6%
associate-*r*27.6%
neg-mul-127.6%
*-commutative27.6%
associate-*l*25.9%
distribute-rgt-neg-in25.9%
*-commutative25.9%
distribute-rgt-neg-in25.9%
Simplified25.9%
Taylor expanded in b around 0 27.6%
associate-*r*27.6%
associate-*r*31.6%
mul-1-neg31.6%
distribute-lft-neg-in31.6%
distribute-rgt-neg-out31.6%
*-commutative31.6%
Simplified31.6%
Final simplification32.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -6.2e-200) (not (<= y 2.85e+41))) (* (- b) (* x a)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -6.2e-200) || !(y <= 2.85e+41)) {
tmp = -b * (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 <= (-6.2d-200)) .or. (.not. (y <= 2.85d+41))) then
tmp = -b * (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 <= -6.2e-200) || !(y <= 2.85e+41)) {
tmp = -b * (x * a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -6.2e-200) or not (y <= 2.85e+41): tmp = -b * (x * a) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -6.2e-200) || !(y <= 2.85e+41)) tmp = Float64(Float64(-b) * Float64(x * a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -6.2e-200) || ~((y <= 2.85e+41))) tmp = -b * (x * a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -6.2e-200], N[Not[LessEqual[y, 2.85e+41]], $MachinePrecision]], N[((-b) * N[(x * a), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.2 \cdot 10^{-200} \lor \neg \left(y \leq 2.85 \cdot 10^{+41}\right):\\
\;\;\;\;\left(-b\right) \cdot \left(x \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -6.1999999999999998e-200 or 2.8500000000000001e41 < y Initial program 97.5%
Taylor expanded in b around inf 43.2%
mul-1-neg43.2%
distribute-rgt-neg-out43.2%
Simplified43.2%
Taylor expanded in a around 0 17.1%
mul-1-neg17.1%
unsub-neg17.1%
Simplified17.1%
Taylor expanded in a around inf 23.4%
associate-*r*23.4%
neg-mul-123.4%
*-commutative23.4%
associate-*l*25.2%
distribute-rgt-neg-in25.2%
*-commutative25.2%
distribute-rgt-neg-in25.2%
Simplified25.2%
if -6.1999999999999998e-200 < y < 2.8500000000000001e41Initial program 97.1%
Taylor expanded in b around inf 82.6%
mul-1-neg82.6%
distribute-rgt-neg-out82.6%
Simplified82.6%
Taylor expanded in a around 0 34.6%
Final simplification28.9%
(FPCore (x y z t a b) :precision binary64 (if (<= y -6.2e-200) (* (- b) (* x a)) (if (<= y 2.1e+30) x (* x (* a (- b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -6.2e-200) {
tmp = -b * (x * a);
} else if (y <= 2.1e+30) {
tmp = x;
} else {
tmp = x * (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 <= (-6.2d-200)) then
tmp = -b * (x * a)
else if (y <= 2.1d+30) then
tmp = x
else
tmp = x * (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 <= -6.2e-200) {
tmp = -b * (x * a);
} else if (y <= 2.1e+30) {
tmp = x;
} else {
tmp = x * (a * -b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -6.2e-200: tmp = -b * (x * a) elif y <= 2.1e+30: tmp = x else: tmp = x * (a * -b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -6.2e-200) tmp = Float64(Float64(-b) * Float64(x * a)); elseif (y <= 2.1e+30) tmp = x; else tmp = Float64(x * Float64(a * Float64(-b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -6.2e-200) tmp = -b * (x * a); elseif (y <= 2.1e+30) tmp = x; else tmp = x * (a * -b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -6.2e-200], N[((-b) * N[(x * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.1e+30], x, N[(x * N[(a * (-b)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.2 \cdot 10^{-200}:\\
\;\;\;\;\left(-b\right) \cdot \left(x \cdot a\right)\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{+30}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(a \cdot \left(-b\right)\right)\\
\end{array}
\end{array}
if y < -6.1999999999999998e-200Initial program 97.3%
Taylor expanded in b around inf 49.2%
mul-1-neg49.2%
distribute-rgt-neg-out49.2%
Simplified49.2%
Taylor expanded in a around 0 19.6%
mul-1-neg19.6%
unsub-neg19.6%
Simplified19.6%
Taylor expanded in a around inf 20.9%
associate-*r*20.9%
neg-mul-120.9%
*-commutative20.9%
associate-*l*24.3%
distribute-rgt-neg-in24.3%
*-commutative24.3%
distribute-rgt-neg-in24.3%
Simplified24.3%
if -6.1999999999999998e-200 < y < 2.1e30Initial program 97.0%
Taylor expanded in b around inf 84.0%
mul-1-neg84.0%
distribute-rgt-neg-out84.0%
Simplified84.0%
Taylor expanded in a around 0 35.6%
if 2.1e30 < y Initial program 98.0%
Taylor expanded in b around inf 30.0%
mul-1-neg30.0%
distribute-rgt-neg-out30.0%
Simplified30.0%
Taylor expanded in a around 0 11.1%
mul-1-neg11.1%
unsub-neg11.1%
Simplified11.1%
Taylor expanded in a around inf 27.6%
associate-*r*27.6%
neg-mul-127.6%
*-commutative27.6%
associate-*l*25.9%
distribute-rgt-neg-in25.9%
*-commutative25.9%
distribute-rgt-neg-in25.9%
Simplified25.9%
Taylor expanded in b around 0 27.6%
associate-*r*27.6%
associate-*r*31.6%
mul-1-neg31.6%
distribute-lft-neg-in31.6%
distribute-rgt-neg-out31.6%
*-commutative31.6%
Simplified31.6%
Final simplification30.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2.3e-45) (not (<= y 38000.0))) (* x (* a b)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.3e-45) || !(y <= 38000.0)) {
tmp = x * (a * b);
} 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.3d-45)) .or. (.not. (y <= 38000.0d0))) then
tmp = x * (a * b)
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.3e-45) || !(y <= 38000.0)) {
tmp = x * (a * b);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2.3e-45) or not (y <= 38000.0): tmp = x * (a * b) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -2.3e-45) || !(y <= 38000.0)) tmp = Float64(x * Float64(a * b)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -2.3e-45) || ~((y <= 38000.0))) tmp = x * (a * b); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2.3e-45], N[Not[LessEqual[y, 38000.0]], $MachinePrecision]], N[(x * N[(a * b), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.3 \cdot 10^{-45} \lor \neg \left(y \leq 38000\right):\\
\;\;\;\;x \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -2.29999999999999992e-45 or 38000 < y Initial program 97.1%
Taylor expanded in b around inf 36.5%
mul-1-neg36.5%
distribute-rgt-neg-out36.5%
Simplified36.5%
Taylor expanded in a around 0 12.5%
mul-1-neg12.5%
unsub-neg12.5%
Simplified12.5%
Taylor expanded in a around inf 23.9%
associate-*r*23.9%
neg-mul-123.9%
*-commutative23.9%
associate-*l*23.9%
distribute-rgt-neg-in23.9%
*-commutative23.9%
distribute-rgt-neg-in23.9%
Simplified23.9%
pow123.9%
*-commutative23.9%
*-commutative23.9%
associate-*l*24.0%
add-sqr-sqrt10.6%
sqrt-unprod24.2%
sqr-neg24.2%
sqrt-unprod7.6%
add-sqr-sqrt15.8%
*-commutative15.8%
Applied egg-rr15.8%
unpow115.8%
*-commutative15.8%
Simplified15.8%
if -2.29999999999999992e-45 < y < 38000Initial program 97.5%
Taylor expanded in b around inf 84.0%
mul-1-neg84.0%
distribute-rgt-neg-out84.0%
Simplified84.0%
Taylor expanded in a around 0 33.8%
Final simplification24.2%
(FPCore (x y z t a b) :precision binary64 (if (<= x 9.6e-141) (* y (- (/ x y) (* x t))) (* b (- (/ x b) (* x a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= 9.6e-141) {
tmp = y * ((x / y) - (x * t));
} else {
tmp = b * ((x / b) - (x * a));
}
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.6d-141) then
tmp = y * ((x / y) - (x * t))
else
tmp = b * ((x / b) - (x * a))
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.6e-141) {
tmp = y * ((x / y) - (x * t));
} else {
tmp = b * ((x / b) - (x * a));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= 9.6e-141: tmp = y * ((x / y) - (x * t)) else: tmp = b * ((x / b) - (x * a)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= 9.6e-141) tmp = Float64(y * Float64(Float64(x / y) - Float64(x * t))); else tmp = Float64(b * Float64(Float64(x / b) - Float64(x * a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= 9.6e-141) tmp = y * ((x / y) - (x * t)); else tmp = b * ((x / b) - (x * a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, 9.6e-141], N[(y * N[(N[(x / y), $MachinePrecision] - N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(N[(x / b), $MachinePrecision] - N[(x * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 9.6 \cdot 10^{-141}:\\
\;\;\;\;y \cdot \left(\frac{x}{y} - x \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(\frac{x}{b} - x \cdot a\right)\\
\end{array}
\end{array}
if x < 9.6000000000000004e-141Initial program 98.0%
Taylor expanded in t around inf 55.8%
mul-1-neg55.8%
distribute-lft-neg-out55.8%
*-commutative55.8%
Simplified55.8%
Taylor expanded in y around 0 23.8%
mul-1-neg23.8%
unsub-neg23.8%
*-commutative23.8%
Simplified23.8%
Taylor expanded in y around inf 28.8%
+-commutative28.8%
mul-1-neg28.8%
sub-neg28.8%
*-commutative28.8%
Simplified28.8%
if 9.6000000000000004e-141 < x Initial program 96.3%
Taylor expanded in b around inf 61.0%
mul-1-neg61.0%
distribute-rgt-neg-out61.0%
Simplified61.0%
Taylor expanded in a around 0 30.8%
mul-1-neg30.8%
unsub-neg30.8%
Simplified30.8%
Taylor expanded in b around inf 36.5%
Final simplification32.0%
(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 b around inf 58.6%
mul-1-neg58.6%
distribute-rgt-neg-out58.6%
Simplified58.6%
Taylor expanded in a around 0 18.4%
herbie shell --seed 2024100
(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))))))