
(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 95.5%
fma-def95.9%
sub-neg95.9%
log1p-def99.2%
Simplified99.2%
Final simplification99.2%
(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 95.5%
Final simplification95.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -6.8e-44) (not (<= y 1.3e+18))) (* 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 <= -6.8e-44) || !(y <= 1.3e+18)) {
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 <= (-6.8d-44)) .or. (.not. (y <= 1.3d+18))) 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 <= -6.8e-44) || !(y <= 1.3e+18)) {
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 <= -6.8e-44) or not (y <= 1.3e+18): 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 <= -6.8e-44) || !(y <= 1.3e+18)) 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 <= -6.8e-44) || ~((y <= 1.3e+18))) 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, -6.8e-44], N[Not[LessEqual[y, 1.3e+18]], $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 -6.8 \cdot 10^{-44} \lor \neg \left(y \leq 1.3 \cdot 10^{+18}\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 < -6.80000000000000033e-44 or 1.3e18 < y Initial program 97.7%
Taylor expanded in y around inf 91.9%
if -6.80000000000000033e-44 < y < 1.3e18Initial program 93.0%
Taylor expanded in y around 0 80.4%
sub-neg80.4%
neg-mul-180.4%
log1p-def88.2%
neg-mul-188.2%
Simplified88.2%
Taylor expanded in z around 0 88.2%
associate-*r*88.2%
associate-*r*88.2%
distribute-lft-out88.2%
neg-mul-188.2%
Simplified88.2%
Final simplification90.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (exp (* a (- b))))) (t_2 (* x (pow z y))))
(if (<= y -1.5e+27)
t_2
(if (<= y 305.0)
t_1
(if (<= y 2.75e+104)
t_2
(if (<= y 8.5e+134)
t_1
(if (or (<= y 5.4e+154) (not (<= y 1.7e+179)))
t_2
(* (- y) (* x t)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * exp((a * -b));
double t_2 = x * pow(z, y);
double tmp;
if (y <= -1.5e+27) {
tmp = t_2;
} else if (y <= 305.0) {
tmp = t_1;
} else if (y <= 2.75e+104) {
tmp = t_2;
} else if (y <= 8.5e+134) {
tmp = t_1;
} else if ((y <= 5.4e+154) || !(y <= 1.7e+179)) {
tmp = t_2;
} else {
tmp = -y * (x * 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * exp((a * -b))
t_2 = x * (z ** y)
if (y <= (-1.5d+27)) then
tmp = t_2
else if (y <= 305.0d0) then
tmp = t_1
else if (y <= 2.75d+104) then
tmp = t_2
else if (y <= 8.5d+134) then
tmp = t_1
else if ((y <= 5.4d+154) .or. (.not. (y <= 1.7d+179))) then
tmp = t_2
else
tmp = -y * (x * t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * Math.exp((a * -b));
double t_2 = x * Math.pow(z, y);
double tmp;
if (y <= -1.5e+27) {
tmp = t_2;
} else if (y <= 305.0) {
tmp = t_1;
} else if (y <= 2.75e+104) {
tmp = t_2;
} else if (y <= 8.5e+134) {
tmp = t_1;
} else if ((y <= 5.4e+154) || !(y <= 1.7e+179)) {
tmp = t_2;
} else {
tmp = -y * (x * t);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * math.exp((a * -b)) t_2 = x * math.pow(z, y) tmp = 0 if y <= -1.5e+27: tmp = t_2 elif y <= 305.0: tmp = t_1 elif y <= 2.75e+104: tmp = t_2 elif y <= 8.5e+134: tmp = t_1 elif (y <= 5.4e+154) or not (y <= 1.7e+179): tmp = t_2 else: tmp = -y * (x * t) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * exp(Float64(a * Float64(-b)))) t_2 = Float64(x * (z ^ y)) tmp = 0.0 if (y <= -1.5e+27) tmp = t_2; elseif (y <= 305.0) tmp = t_1; elseif (y <= 2.75e+104) tmp = t_2; elseif (y <= 8.5e+134) tmp = t_1; elseif ((y <= 5.4e+154) || !(y <= 1.7e+179)) tmp = t_2; else tmp = Float64(Float64(-y) * Float64(x * t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * exp((a * -b)); t_2 = x * (z ^ y); tmp = 0.0; if (y <= -1.5e+27) tmp = t_2; elseif (y <= 305.0) tmp = t_1; elseif (y <= 2.75e+104) tmp = t_2; elseif (y <= 8.5e+134) tmp = t_1; elseif ((y <= 5.4e+154) || ~((y <= 1.7e+179))) tmp = t_2; else tmp = -y * (x * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Exp[N[(a * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.5e+27], t$95$2, If[LessEqual[y, 305.0], t$95$1, If[LessEqual[y, 2.75e+104], t$95$2, If[LessEqual[y, 8.5e+134], t$95$1, If[Or[LessEqual[y, 5.4e+154], N[Not[LessEqual[y, 1.7e+179]], $MachinePrecision]], t$95$2, N[((-y) * N[(x * t), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot e^{a \cdot \left(-b\right)}\\
t_2 := x \cdot {z}^{y}\\
\mathbf{if}\;y \leq -1.5 \cdot 10^{+27}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 305:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.75 \cdot 10^{+104}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{+134}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 5.4 \cdot 10^{+154} \lor \neg \left(y \leq 1.7 \cdot 10^{+179}\right):\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\left(-y\right) \cdot \left(x \cdot t\right)\\
\end{array}
\end{array}
if y < -1.49999999999999988e27 or 305 < y < 2.75000000000000008e104 or 8.50000000000000024e134 < y < 5.40000000000000011e154 or 1.69999999999999998e179 < y Initial program 96.3%
Taylor expanded in y around inf 94.5%
Taylor expanded in t around 0 77.9%
if -1.49999999999999988e27 < y < 305 or 2.75000000000000008e104 < y < 8.50000000000000024e134Initial program 94.6%
Taylor expanded in b around inf 78.5%
mul-1-neg78.5%
distribute-rgt-neg-out78.5%
Simplified78.5%
if 5.40000000000000011e154 < y < 1.69999999999999998e179Initial program 100.0%
Taylor expanded in t around inf 85.9%
mul-1-neg85.9%
distribute-rgt-neg-in85.9%
Simplified85.9%
Taylor expanded in t around 0 72.8%
mul-1-neg72.8%
unsub-neg72.8%
Simplified72.8%
Taylor expanded in t around inf 72.8%
mul-1-neg72.8%
associate-*r*100.0%
*-commutative100.0%
distribute-lft-neg-in100.0%
Simplified100.0%
Final simplification78.8%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1.5e+27) (* x (pow z y)) (if (<= y 3e+65) (* x (exp (* a (- (- b) z)))) (* x (exp (* t (- y)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.5e+27) {
tmp = x * pow(z, y);
} else if (y <= 3e+65) {
tmp = x * exp((a * (-b - z)));
} else {
tmp = x * exp((t * -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 (y <= (-1.5d+27)) then
tmp = x * (z ** y)
else if (y <= 3d+65) then
tmp = x * exp((a * (-b - z)))
else
tmp = x * exp((t * -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 (y <= -1.5e+27) {
tmp = x * Math.pow(z, y);
} else if (y <= 3e+65) {
tmp = x * Math.exp((a * (-b - z)));
} else {
tmp = x * Math.exp((t * -y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.5e+27: tmp = x * math.pow(z, y) elif y <= 3e+65: tmp = x * math.exp((a * (-b - z))) else: tmp = x * math.exp((t * -y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.5e+27) tmp = Float64(x * (z ^ y)); elseif (y <= 3e+65) tmp = Float64(x * exp(Float64(a * Float64(Float64(-b) - z)))); else tmp = Float64(x * exp(Float64(t * Float64(-y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.5e+27) tmp = x * (z ^ y); elseif (y <= 3e+65) tmp = x * exp((a * (-b - z))); else tmp = x * exp((t * -y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.5e+27], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3e+65], N[(x * N[Exp[N[(a * N[((-b) - z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(t * (-y)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.5 \cdot 10^{+27}:\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{elif}\;y \leq 3 \cdot 10^{+65}:\\
\;\;\;\;x \cdot e^{a \cdot \left(\left(-b\right) - z\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{t \cdot \left(-y\right)}\\
\end{array}
\end{array}
if y < -1.49999999999999988e27Initial program 96.5%
Taylor expanded in y around inf 96.5%
Taylor expanded in t around 0 84.5%
if -1.49999999999999988e27 < y < 3.0000000000000002e65Initial program 94.0%
Taylor expanded in y around 0 76.8%
sub-neg76.8%
neg-mul-176.8%
log1p-def84.7%
neg-mul-184.7%
Simplified84.7%
Taylor expanded in z around 0 84.7%
associate-*r*84.7%
associate-*r*84.7%
distribute-lft-out84.7%
neg-mul-184.7%
Simplified84.7%
if 3.0000000000000002e65 < y Initial program 98.2%
Taylor expanded in t around inf 73.5%
mul-1-neg73.5%
distribute-rgt-neg-in73.5%
Simplified73.5%
Final simplification82.2%
(FPCore (x y z t a b) :precision binary64 (if (<= y -2.1e+27) (* x (pow z y)) (if (<= y 2750.0) (* x (exp (* a (- b)))) (* x (exp (* t (- y)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.1e+27) {
tmp = x * pow(z, y);
} else if (y <= 2750.0) {
tmp = x * exp((a * -b));
} else {
tmp = x * exp((t * -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 (y <= (-2.1d+27)) then
tmp = x * (z ** y)
else if (y <= 2750.0d0) then
tmp = x * exp((a * -b))
else
tmp = x * exp((t * -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 (y <= -2.1e+27) {
tmp = x * Math.pow(z, y);
} else if (y <= 2750.0) {
tmp = x * Math.exp((a * -b));
} else {
tmp = x * Math.exp((t * -y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2.1e+27: tmp = x * math.pow(z, y) elif y <= 2750.0: tmp = x * math.exp((a * -b)) else: tmp = x * math.exp((t * -y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2.1e+27) tmp = Float64(x * (z ^ y)); elseif (y <= 2750.0) tmp = Float64(x * exp(Float64(a * Float64(-b)))); else tmp = Float64(x * exp(Float64(t * Float64(-y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -2.1e+27) tmp = x * (z ^ y); elseif (y <= 2750.0) tmp = x * exp((a * -b)); else tmp = x * exp((t * -y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.1e+27], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2750.0], N[(x * N[Exp[N[(a * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(t * (-y)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.1 \cdot 10^{+27}:\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{elif}\;y \leq 2750:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{t \cdot \left(-y\right)}\\
\end{array}
\end{array}
if y < -2.09999999999999995e27Initial program 96.5%
Taylor expanded in y around inf 96.5%
Taylor expanded in t around 0 84.5%
if -2.09999999999999995e27 < y < 2750Initial program 94.3%
Taylor expanded in b around inf 79.3%
mul-1-neg79.3%
distribute-rgt-neg-out79.3%
Simplified79.3%
if 2750 < y Initial program 96.9%
Taylor expanded in t around inf 68.7%
mul-1-neg68.7%
distribute-rgt-neg-in68.7%
Simplified68.7%
Final simplification77.7%
(FPCore (x y z t a b) :precision binary64 (if (<= t -125000000.0) (- x (* x (* y t))) (* x (pow z y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -125000000.0) {
tmp = x - (x * (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 <= (-125000000.0d0)) then
tmp = x - (x * (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 <= -125000000.0) {
tmp = x - (x * (y * t));
} else {
tmp = x * Math.pow(z, y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -125000000.0: tmp = x - (x * (y * t)) else: tmp = x * math.pow(z, y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -125000000.0) tmp = Float64(x - Float64(x * 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 <= -125000000.0) tmp = x - (x * (y * t)); else tmp = x * (z ^ y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -125000000.0], N[(x - N[(x * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -125000000:\\
\;\;\;\;x - x \cdot \left(y \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot {z}^{y}\\
\end{array}
\end{array}
if t < -1.25e8Initial program 96.8%
Taylor expanded in t around inf 80.9%
mul-1-neg80.9%
distribute-rgt-neg-in80.9%
Simplified80.9%
Taylor expanded in t around 0 41.2%
mul-1-neg41.2%
unsub-neg41.2%
Simplified41.2%
expm1-log1p-u21.0%
expm1-udef21.0%
*-commutative21.0%
associate-*l*22.6%
Applied egg-rr22.6%
expm1-def22.6%
expm1-log1p42.7%
*-commutative42.7%
Simplified42.7%
if -1.25e8 < t Initial program 95.0%
Taylor expanded in y around inf 69.0%
Taylor expanded in t around 0 62.5%
Final simplification57.8%
(FPCore (x y z t a b) :precision binary64 (if (<= y -9.2e+172) (* t (* x (- y))) (if (<= y 5.6e+89) (* x (- 1.0 (* a (+ z b)))) (* (- y) (* x t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -9.2e+172) {
tmp = t * (x * -y);
} else if (y <= 5.6e+89) {
tmp = x * (1.0 - (a * (z + b)));
} else {
tmp = -y * (x * 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 <= (-9.2d+172)) then
tmp = t * (x * -y)
else if (y <= 5.6d+89) then
tmp = x * (1.0d0 - (a * (z + b)))
else
tmp = -y * (x * 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 <= -9.2e+172) {
tmp = t * (x * -y);
} else if (y <= 5.6e+89) {
tmp = x * (1.0 - (a * (z + b)));
} else {
tmp = -y * (x * t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -9.2e+172: tmp = t * (x * -y) elif y <= 5.6e+89: tmp = x * (1.0 - (a * (z + b))) else: tmp = -y * (x * t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -9.2e+172) tmp = Float64(t * Float64(x * Float64(-y))); elseif (y <= 5.6e+89) tmp = Float64(x * Float64(1.0 - Float64(a * Float64(z + b)))); else tmp = Float64(Float64(-y) * Float64(x * t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -9.2e+172) tmp = t * (x * -y); elseif (y <= 5.6e+89) tmp = x * (1.0 - (a * (z + b))); else tmp = -y * (x * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -9.2e+172], N[(t * N[(x * (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.6e+89], N[(x * N[(1.0 - N[(a * N[(z + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-y) * N[(x * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.2 \cdot 10^{+172}:\\
\;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\
\mathbf{elif}\;y \leq 5.6 \cdot 10^{+89}:\\
\;\;\;\;x \cdot \left(1 - a \cdot \left(z + b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(-y\right) \cdot \left(x \cdot t\right)\\
\end{array}
\end{array}
if y < -9.2000000000000003e172Initial program 96.8%
Taylor expanded in t around inf 77.9%
mul-1-neg77.9%
distribute-rgt-neg-in77.9%
Simplified77.9%
Taylor expanded in t around 0 40.3%
mul-1-neg40.3%
unsub-neg40.3%
Simplified40.3%
Taylor expanded in t around inf 40.3%
mul-1-neg40.3%
associate-*r*28.2%
*-commutative28.2%
distribute-lft-neg-in28.2%
Simplified28.2%
Taylor expanded in x around 0 40.3%
mul-1-neg40.3%
distribute-rgt-neg-in40.3%
*-commutative40.3%
distribute-rgt-neg-in40.3%
Simplified40.3%
if -9.2000000000000003e172 < y < 5.5999999999999996e89Initial program 94.5%
Taylor expanded in y around 0 69.7%
sub-neg69.7%
neg-mul-169.7%
log1p-def76.3%
neg-mul-176.3%
Simplified76.3%
Taylor expanded in z around 0 76.3%
associate-*r*76.3%
associate-*r*76.3%
distribute-lft-out76.3%
neg-mul-176.3%
Simplified76.3%
Taylor expanded in a around 0 37.3%
mul-1-neg37.3%
unsub-neg37.3%
Simplified37.3%
if 5.5999999999999996e89 < y Initial program 98.0%
Taylor expanded in t around inf 73.3%
mul-1-neg73.3%
distribute-rgt-neg-in73.3%
Simplified73.3%
Taylor expanded in t around 0 31.3%
mul-1-neg31.3%
unsub-neg31.3%
Simplified31.3%
Taylor expanded in t around inf 33.2%
mul-1-neg33.2%
associate-*r*38.8%
*-commutative38.8%
distribute-lft-neg-in38.8%
Simplified38.8%
Final simplification38.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (* x (- y)))))
(if (<= y -9500.0)
t_1
(if (<= y 2.3e-81) x (if (<= y 1e+108) (* x (* a (- b))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * (x * -y);
double tmp;
if (y <= -9500.0) {
tmp = t_1;
} else if (y <= 2.3e-81) {
tmp = x;
} else if (y <= 1e+108) {
tmp = x * (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 = t * (x * -y)
if (y <= (-9500.0d0)) then
tmp = t_1
else if (y <= 2.3d-81) then
tmp = x
else if (y <= 1d+108) then
tmp = x * (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 = t * (x * -y);
double tmp;
if (y <= -9500.0) {
tmp = t_1;
} else if (y <= 2.3e-81) {
tmp = x;
} else if (y <= 1e+108) {
tmp = x * (a * -b);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t * (x * -y) tmp = 0 if y <= -9500.0: tmp = t_1 elif y <= 2.3e-81: tmp = x elif y <= 1e+108: tmp = x * (a * -b) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t * Float64(x * Float64(-y))) tmp = 0.0 if (y <= -9500.0) tmp = t_1; elseif (y <= 2.3e-81) tmp = x; elseif (y <= 1e+108) tmp = Float64(x * Float64(a * Float64(-b))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t * (x * -y); tmp = 0.0; if (y <= -9500.0) tmp = t_1; elseif (y <= 2.3e-81) tmp = x; elseif (y <= 1e+108) tmp = x * (a * -b); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(x * (-y)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -9500.0], t$95$1, If[LessEqual[y, 2.3e-81], x, If[LessEqual[y, 1e+108], N[(x * N[(a * (-b)), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(x \cdot \left(-y\right)\right)\\
\mathbf{if}\;y \leq -9500:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.3 \cdot 10^{-81}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 10^{+108}:\\
\;\;\;\;x \cdot \left(a \cdot \left(-b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -9500 or 1e108 < y Initial program 97.1%
Taylor expanded in t around inf 67.9%
mul-1-neg67.9%
distribute-rgt-neg-in67.9%
Simplified67.9%
Taylor expanded in t around 0 29.3%
mul-1-neg29.3%
unsub-neg29.3%
Simplified29.3%
Taylor expanded in t around inf 30.9%
mul-1-neg30.9%
associate-*r*30.0%
*-commutative30.0%
distribute-lft-neg-in30.0%
Simplified30.0%
Taylor expanded in x around 0 30.9%
mul-1-neg30.9%
distribute-rgt-neg-in30.9%
*-commutative30.9%
distribute-rgt-neg-in30.9%
Simplified30.9%
if -9500 < y < 2.29999999999999991e-81Initial program 93.1%
Taylor expanded in y around inf 51.7%
Taylor expanded in y around 0 32.6%
if 2.29999999999999991e-81 < y < 1e108Initial program 97.7%
Taylor expanded in b around inf 54.8%
mul-1-neg54.8%
distribute-rgt-neg-out54.8%
Simplified54.8%
Taylor expanded in a around 0 36.2%
mul-1-neg36.2%
unsub-neg36.2%
Simplified36.2%
Taylor expanded in a around inf 40.3%
mul-1-neg40.3%
*-commutative40.3%
distribute-rgt-neg-in40.3%
Simplified40.3%
Final simplification33.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -9500.0)
(* t (* x (- y)))
(if (<= y 4e-87)
x
(if (<= y 6.2e+107) (* x (* a (- b))) (* x (* t (- y)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -9500.0) {
tmp = t * (x * -y);
} else if (y <= 4e-87) {
tmp = x;
} else if (y <= 6.2e+107) {
tmp = x * (a * -b);
} else {
tmp = x * (t * -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 (y <= (-9500.0d0)) then
tmp = t * (x * -y)
else if (y <= 4d-87) then
tmp = x
else if (y <= 6.2d+107) then
tmp = x * (a * -b)
else
tmp = x * (t * -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 (y <= -9500.0) {
tmp = t * (x * -y);
} else if (y <= 4e-87) {
tmp = x;
} else if (y <= 6.2e+107) {
tmp = x * (a * -b);
} else {
tmp = x * (t * -y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -9500.0: tmp = t * (x * -y) elif y <= 4e-87: tmp = x elif y <= 6.2e+107: tmp = x * (a * -b) else: tmp = x * (t * -y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -9500.0) tmp = Float64(t * Float64(x * Float64(-y))); elseif (y <= 4e-87) tmp = x; elseif (y <= 6.2e+107) tmp = Float64(x * Float64(a * Float64(-b))); else tmp = Float64(x * Float64(t * Float64(-y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -9500.0) tmp = t * (x * -y); elseif (y <= 4e-87) tmp = x; elseif (y <= 6.2e+107) tmp = x * (a * -b); else tmp = x * (t * -y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -9500.0], N[(t * N[(x * (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4e-87], x, If[LessEqual[y, 6.2e+107], N[(x * N[(a * (-b)), $MachinePrecision]), $MachinePrecision], N[(x * N[(t * (-y)), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9500:\\
\;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\
\mathbf{elif}\;y \leq 4 \cdot 10^{-87}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{+107}:\\
\;\;\;\;x \cdot \left(a \cdot \left(-b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(t \cdot \left(-y\right)\right)\\
\end{array}
\end{array}
if y < -9500Initial program 96.7%
Taylor expanded in t around inf 61.1%
mul-1-neg61.1%
distribute-rgt-neg-in61.1%
Simplified61.1%
Taylor expanded in t around 0 27.2%
mul-1-neg27.2%
unsub-neg27.2%
Simplified27.2%
Taylor expanded in t around inf 28.3%
mul-1-neg28.3%
associate-*r*22.1%
*-commutative22.1%
distribute-lft-neg-in22.1%
Simplified22.1%
Taylor expanded in x around 0 28.3%
mul-1-neg28.3%
distribute-rgt-neg-in28.3%
*-commutative28.3%
distribute-rgt-neg-in28.3%
Simplified28.3%
if -9500 < y < 4.00000000000000007e-87Initial program 93.1%
Taylor expanded in y around inf 51.7%
Taylor expanded in y around 0 32.6%
if 4.00000000000000007e-87 < y < 6.20000000000000052e107Initial program 97.7%
Taylor expanded in b around inf 54.8%
mul-1-neg54.8%
distribute-rgt-neg-out54.8%
Simplified54.8%
Taylor expanded in a around 0 36.2%
mul-1-neg36.2%
unsub-neg36.2%
Simplified36.2%
Taylor expanded in a around inf 40.3%
mul-1-neg40.3%
*-commutative40.3%
distribute-rgt-neg-in40.3%
Simplified40.3%
if 6.20000000000000052e107 < y Initial program 97.7%
Taylor expanded in t around inf 77.4%
mul-1-neg77.4%
distribute-rgt-neg-in77.4%
Simplified77.4%
Taylor expanded in t around 0 32.2%
mul-1-neg32.2%
unsub-neg32.2%
Simplified32.2%
Taylor expanded in t around inf 34.4%
mul-1-neg34.4%
*-commutative34.4%
associate-*r*36.7%
distribute-lft-neg-in36.7%
*-commutative36.7%
Simplified36.7%
Final simplification33.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -9600.0)
(* t (* x (- y)))
(if (<= y 1.45e-81)
x
(if (<= y 1.1e+108) (* x (* a (- b))) (* (- y) (* x t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -9600.0) {
tmp = t * (x * -y);
} else if (y <= 1.45e-81) {
tmp = x;
} else if (y <= 1.1e+108) {
tmp = x * (a * -b);
} else {
tmp = -y * (x * 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 <= (-9600.0d0)) then
tmp = t * (x * -y)
else if (y <= 1.45d-81) then
tmp = x
else if (y <= 1.1d+108) then
tmp = x * (a * -b)
else
tmp = -y * (x * 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 <= -9600.0) {
tmp = t * (x * -y);
} else if (y <= 1.45e-81) {
tmp = x;
} else if (y <= 1.1e+108) {
tmp = x * (a * -b);
} else {
tmp = -y * (x * t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -9600.0: tmp = t * (x * -y) elif y <= 1.45e-81: tmp = x elif y <= 1.1e+108: tmp = x * (a * -b) else: tmp = -y * (x * t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -9600.0) tmp = Float64(t * Float64(x * Float64(-y))); elseif (y <= 1.45e-81) tmp = x; elseif (y <= 1.1e+108) tmp = Float64(x * Float64(a * Float64(-b))); else tmp = Float64(Float64(-y) * Float64(x * t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -9600.0) tmp = t * (x * -y); elseif (y <= 1.45e-81) tmp = x; elseif (y <= 1.1e+108) tmp = x * (a * -b); else tmp = -y * (x * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -9600.0], N[(t * N[(x * (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.45e-81], x, If[LessEqual[y, 1.1e+108], N[(x * N[(a * (-b)), $MachinePrecision]), $MachinePrecision], N[((-y) * N[(x * t), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9600:\\
\;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{-81}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{+108}:\\
\;\;\;\;x \cdot \left(a \cdot \left(-b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(-y\right) \cdot \left(x \cdot t\right)\\
\end{array}
\end{array}
if y < -9600Initial program 96.7%
Taylor expanded in t around inf 61.1%
mul-1-neg61.1%
distribute-rgt-neg-in61.1%
Simplified61.1%
Taylor expanded in t around 0 27.2%
mul-1-neg27.2%
unsub-neg27.2%
Simplified27.2%
Taylor expanded in t around inf 28.3%
mul-1-neg28.3%
associate-*r*22.1%
*-commutative22.1%
distribute-lft-neg-in22.1%
Simplified22.1%
Taylor expanded in x around 0 28.3%
mul-1-neg28.3%
distribute-rgt-neg-in28.3%
*-commutative28.3%
distribute-rgt-neg-in28.3%
Simplified28.3%
if -9600 < y < 1.44999999999999994e-81Initial program 93.1%
Taylor expanded in y around inf 51.7%
Taylor expanded in y around 0 32.6%
if 1.44999999999999994e-81 < y < 1.1000000000000001e108Initial program 97.7%
Taylor expanded in b around inf 54.8%
mul-1-neg54.8%
distribute-rgt-neg-out54.8%
Simplified54.8%
Taylor expanded in a around 0 36.2%
mul-1-neg36.2%
unsub-neg36.2%
Simplified36.2%
Taylor expanded in a around inf 40.3%
mul-1-neg40.3%
*-commutative40.3%
distribute-rgt-neg-in40.3%
Simplified40.3%
if 1.1000000000000001e108 < y Initial program 97.7%
Taylor expanded in t around inf 77.4%
mul-1-neg77.4%
distribute-rgt-neg-in77.4%
Simplified77.4%
Taylor expanded in t around 0 32.2%
mul-1-neg32.2%
unsub-neg32.2%
Simplified32.2%
Taylor expanded in t around inf 34.4%
mul-1-neg34.4%
associate-*r*41.0%
*-commutative41.0%
distribute-lft-neg-in41.0%
Simplified41.0%
Final simplification34.3%
(FPCore (x y z t a b) :precision binary64 (if (<= y -5.4e+171) (* t (* x (- y))) (if (<= y 2.3e+86) (* x (- 1.0 (* a b))) (* (- y) (* x t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -5.4e+171) {
tmp = t * (x * -y);
} else if (y <= 2.3e+86) {
tmp = x * (1.0 - (a * b));
} else {
tmp = -y * (x * 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 <= (-5.4d+171)) then
tmp = t * (x * -y)
else if (y <= 2.3d+86) then
tmp = x * (1.0d0 - (a * b))
else
tmp = -y * (x * 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 <= -5.4e+171) {
tmp = t * (x * -y);
} else if (y <= 2.3e+86) {
tmp = x * (1.0 - (a * b));
} else {
tmp = -y * (x * t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -5.4e+171: tmp = t * (x * -y) elif y <= 2.3e+86: tmp = x * (1.0 - (a * b)) else: tmp = -y * (x * t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -5.4e+171) tmp = Float64(t * Float64(x * Float64(-y))); elseif (y <= 2.3e+86) tmp = Float64(x * Float64(1.0 - Float64(a * b))); else tmp = Float64(Float64(-y) * Float64(x * t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -5.4e+171) tmp = t * (x * -y); elseif (y <= 2.3e+86) tmp = x * (1.0 - (a * b)); else tmp = -y * (x * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -5.4e+171], N[(t * N[(x * (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.3e+86], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-y) * N[(x * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.4 \cdot 10^{+171}:\\
\;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\
\mathbf{elif}\;y \leq 2.3 \cdot 10^{+86}:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(-y\right) \cdot \left(x \cdot t\right)\\
\end{array}
\end{array}
if y < -5.3999999999999996e171Initial program 96.8%
Taylor expanded in t around inf 77.9%
mul-1-neg77.9%
distribute-rgt-neg-in77.9%
Simplified77.9%
Taylor expanded in t around 0 40.3%
mul-1-neg40.3%
unsub-neg40.3%
Simplified40.3%
Taylor expanded in t around inf 40.3%
mul-1-neg40.3%
associate-*r*28.2%
*-commutative28.2%
distribute-lft-neg-in28.2%
Simplified28.2%
Taylor expanded in x around 0 40.3%
mul-1-neg40.3%
distribute-rgt-neg-in40.3%
*-commutative40.3%
distribute-rgt-neg-in40.3%
Simplified40.3%
if -5.3999999999999996e171 < y < 2.2999999999999999e86Initial program 94.5%
Taylor expanded in b around inf 69.2%
mul-1-neg69.2%
distribute-rgt-neg-out69.2%
Simplified69.2%
Taylor expanded in a around 0 36.8%
mul-1-neg36.8%
unsub-neg36.8%
Simplified36.8%
if 2.2999999999999999e86 < y Initial program 98.0%
Taylor expanded in t around inf 73.3%
mul-1-neg73.3%
distribute-rgt-neg-in73.3%
Simplified73.3%
Taylor expanded in t around 0 31.3%
mul-1-neg31.3%
unsub-neg31.3%
Simplified31.3%
Taylor expanded in t around inf 33.2%
mul-1-neg33.2%
associate-*r*38.8%
*-commutative38.8%
distribute-lft-neg-in38.8%
Simplified38.8%
Final simplification37.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -9600.0) (not (<= y 4.1e-84))) (* t (* x (- y))) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -9600.0) || !(y <= 4.1e-84)) {
tmp = t * (x * -y);
} 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 <= (-9600.0d0)) .or. (.not. (y <= 4.1d-84))) then
tmp = t * (x * -y)
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 <= -9600.0) || !(y <= 4.1e-84)) {
tmp = t * (x * -y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -9600.0) or not (y <= 4.1e-84): tmp = t * (x * -y) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -9600.0) || !(y <= 4.1e-84)) tmp = Float64(t * Float64(x * Float64(-y))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -9600.0) || ~((y <= 4.1e-84))) tmp = t * (x * -y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -9600.0], N[Not[LessEqual[y, 4.1e-84]], $MachinePrecision]], N[(t * N[(x * (-y)), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9600 \lor \neg \left(y \leq 4.1 \cdot 10^{-84}\right):\\
\;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -9600 or 4.10000000000000005e-84 < y Initial program 97.3%
Taylor expanded in t around inf 63.2%
mul-1-neg63.2%
distribute-rgt-neg-in63.2%
Simplified63.2%
Taylor expanded in t around 0 26.5%
mul-1-neg26.5%
unsub-neg26.5%
Simplified26.5%
Taylor expanded in t around inf 26.8%
mul-1-neg26.8%
associate-*r*25.5%
*-commutative25.5%
distribute-lft-neg-in25.5%
Simplified25.5%
Taylor expanded in x around 0 26.8%
mul-1-neg26.8%
distribute-rgt-neg-in26.8%
*-commutative26.8%
distribute-rgt-neg-in26.8%
Simplified26.8%
if -9600 < y < 4.10000000000000005e-84Initial program 93.1%
Taylor expanded in y around inf 51.7%
Taylor expanded in y around 0 32.6%
Final simplification29.3%
(FPCore (x y z t a b) :precision binary64 (if (<= a -1.1e-123) (* (- a) (* x z)) (if (<= a 8.5e+103) x (* x (* y t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.1e-123) {
tmp = -a * (x * z);
} else if (a <= 8.5e+103) {
tmp = x;
} else {
tmp = x * (y * t);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= (-1.1d-123)) then
tmp = -a * (x * z)
else if (a <= 8.5d+103) then
tmp = x
else
tmp = x * (y * t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.1e-123) {
tmp = -a * (x * z);
} else if (a <= 8.5e+103) {
tmp = x;
} else {
tmp = x * (y * t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.1e-123: tmp = -a * (x * z) elif a <= 8.5e+103: tmp = x else: tmp = x * (y * t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.1e-123) tmp = Float64(Float64(-a) * Float64(x * z)); elseif (a <= 8.5e+103) tmp = x; else tmp = Float64(x * Float64(y * t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -1.1e-123) tmp = -a * (x * z); elseif (a <= 8.5e+103) tmp = x; else tmp = x * (y * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.1e-123], N[((-a) * N[(x * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 8.5e+103], x, N[(x * N[(y * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.1 \cdot 10^{-123}:\\
\;\;\;\;\left(-a\right) \cdot \left(x \cdot z\right)\\
\mathbf{elif}\;a \leq 8.5 \cdot 10^{+103}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot t\right)\\
\end{array}
\end{array}
if a < -1.10000000000000003e-123Initial program 91.6%
Taylor expanded in y around 0 59.0%
sub-neg59.0%
neg-mul-159.0%
log1p-def69.4%
neg-mul-169.4%
Simplified69.4%
Taylor expanded in z around 0 69.4%
associate-*r*69.4%
associate-*r*69.4%
distribute-lft-out69.4%
neg-mul-169.4%
Simplified69.4%
Taylor expanded in a around 0 21.9%
mul-1-neg21.9%
unsub-neg21.9%
Simplified21.9%
Taylor expanded in z around inf 19.0%
mul-1-neg19.0%
distribute-rgt-neg-in19.0%
*-commutative19.0%
Simplified19.0%
if -1.10000000000000003e-123 < a < 8.4999999999999992e103Initial program 99.2%
Taylor expanded in y around inf 89.5%
Taylor expanded in y around 0 30.0%
if 8.4999999999999992e103 < a Initial program 93.1%
Taylor expanded in t around inf 24.4%
mul-1-neg24.4%
distribute-rgt-neg-in24.4%
Simplified24.4%
Taylor expanded in t around 0 10.6%
mul-1-neg10.6%
unsub-neg10.6%
Simplified10.6%
Taylor expanded in t around inf 25.1%
mul-1-neg25.1%
associate-*r*25.1%
*-commutative25.1%
distribute-lft-neg-in25.1%
Simplified25.1%
expm1-log1p-u19.9%
expm1-udef41.2%
add-sqr-sqrt21.9%
sqrt-unprod41.3%
sqr-neg41.3%
sqrt-unprod28.9%
add-sqr-sqrt38.8%
associate-*l*38.8%
Applied egg-rr38.8%
expm1-def19.7%
expm1-log1p20.0%
Simplified20.0%
Final simplification24.4%
(FPCore (x y z t a b) :precision binary64 (if (<= y 1.55e+16) x (* a (* x b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 1.55e+16) {
tmp = x;
} else {
tmp = a * (x * b);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= 1.55d+16) then
tmp = x
else
tmp = a * (x * b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 1.55e+16) {
tmp = x;
} else {
tmp = a * (x * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 1.55e+16: tmp = x else: tmp = a * (x * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 1.55e+16) tmp = x; else tmp = Float64(a * Float64(x * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= 1.55e+16) tmp = x; else tmp = a * (x * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 1.55e+16], x, N[(a * N[(x * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.55 \cdot 10^{+16}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot b\right)\\
\end{array}
\end{array}
if y < 1.55e16Initial program 94.5%
Taylor expanded in y around inf 65.3%
Taylor expanded in y around 0 21.3%
if 1.55e16 < y Initial program 98.4%
Taylor expanded in b around inf 33.7%
mul-1-neg33.7%
distribute-rgt-neg-out33.7%
Simplified33.7%
Taylor expanded in a around 0 11.8%
mul-1-neg11.8%
unsub-neg11.8%
Simplified11.8%
Taylor expanded in a around inf 24.3%
mul-1-neg24.3%
*-commutative24.3%
distribute-rgt-neg-in24.3%
Simplified24.3%
associate-*r*23.4%
*-commutative23.4%
add-sqr-sqrt9.0%
sqrt-unprod32.0%
sqr-neg32.0%
sqrt-unprod15.6%
add-sqr-sqrt21.3%
expm1-log1p-u21.0%
*-commutative21.0%
expm1-udef34.7%
*-commutative34.7%
Applied egg-rr34.7%
expm1-def21.0%
expm1-log1p21.3%
Simplified21.3%
Final simplification21.3%
(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 95.5%
Taylor expanded in y around inf 71.8%
Taylor expanded in y around 0 17.2%
Final simplification17.2%
herbie shell --seed 2023310
(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))))))