
(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 18 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.1%
fma-def98.3%
sub-neg98.3%
log1p-def100.0%
Simplified100.0%
Final simplification100.0%
(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.1%
Final simplification97.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2.3e-110) (not (<= y 3.25e-38))) (* x (exp (* y (- (log z) t)))) (* x (exp (- (* a (- b)) (* z a))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.3e-110) || !(y <= 3.25e-38)) {
tmp = x * exp((y * (log(z) - t)));
} else {
tmp = x * exp(((a * -b) - (z * 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 ((y <= (-2.3d-110)) .or. (.not. (y <= 3.25d-38))) then
tmp = x * exp((y * (log(z) - t)))
else
tmp = x * exp(((a * -b) - (z * 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 ((y <= -2.3e-110) || !(y <= 3.25e-38)) {
tmp = x * Math.exp((y * (Math.log(z) - t)));
} else {
tmp = x * Math.exp(((a * -b) - (z * a)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2.3e-110) or not (y <= 3.25e-38): tmp = x * math.exp((y * (math.log(z) - t))) else: tmp = x * math.exp(((a * -b) - (z * a))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -2.3e-110) || !(y <= 3.25e-38)) tmp = Float64(x * exp(Float64(y * Float64(log(z) - t)))); else tmp = Float64(x * exp(Float64(Float64(a * Float64(-b)) - Float64(z * a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -2.3e-110) || ~((y <= 3.25e-38))) tmp = x * exp((y * (log(z) - t))); else tmp = x * exp(((a * -b) - (z * a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2.3e-110], N[Not[LessEqual[y, 3.25e-38]], $MachinePrecision]], N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(N[(a * (-b)), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.3 \cdot 10^{-110} \lor \neg \left(y \leq 3.25 \cdot 10^{-38}\right):\\
\;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right) - z \cdot a}\\
\end{array}
\end{array}
if y < -2.3000000000000001e-110 or 3.24999999999999975e-38 < y Initial program 98.1%
Taylor expanded in y around inf 84.7%
if -2.3000000000000001e-110 < y < 3.24999999999999975e-38Initial program 95.5%
Taylor expanded in y around 0 91.9%
sub-neg91.9%
sub-neg91.9%
neg-mul-191.9%
log1p-def97.3%
neg-mul-197.3%
sub-neg97.3%
Simplified97.3%
Taylor expanded in z around 0 97.3%
mul-1-neg97.3%
unsub-neg97.3%
mul-1-neg97.3%
distribute-rgt-neg-in97.3%
Simplified97.3%
Final simplification89.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (pow z y))))
(if (<= y -25000.0)
t_1
(if (<= y 1.06e+28)
(* x (exp (- (* a (- b)) (* z a))))
(if (or (<= y 7.2e+62) (not (<= y 1.3e+155)))
t_1
(* x (exp (* t (- y)))))))))
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 <= -25000.0) {
tmp = t_1;
} else if (y <= 1.06e+28) {
tmp = x * exp(((a * -b) - (z * a)));
} else if ((y <= 7.2e+62) || !(y <= 1.3e+155)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x * (z ** y)
if (y <= (-25000.0d0)) then
tmp = t_1
else if (y <= 1.06d+28) then
tmp = x * exp(((a * -b) - (z * a)))
else if ((y <= 7.2d+62) .or. (.not. (y <= 1.3d+155))) then
tmp = t_1
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 t_1 = x * Math.pow(z, y);
double tmp;
if (y <= -25000.0) {
tmp = t_1;
} else if (y <= 1.06e+28) {
tmp = x * Math.exp(((a * -b) - (z * a)));
} else if ((y <= 7.2e+62) || !(y <= 1.3e+155)) {
tmp = t_1;
} else {
tmp = x * Math.exp((t * -y));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * math.pow(z, y) tmp = 0 if y <= -25000.0: tmp = t_1 elif y <= 1.06e+28: tmp = x * math.exp(((a * -b) - (z * a))) elif (y <= 7.2e+62) or not (y <= 1.3e+155): tmp = t_1 else: tmp = x * math.exp((t * -y)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * (z ^ y)) tmp = 0.0 if (y <= -25000.0) tmp = t_1; elseif (y <= 1.06e+28) tmp = Float64(x * exp(Float64(Float64(a * Float64(-b)) - Float64(z * a)))); elseif ((y <= 7.2e+62) || !(y <= 1.3e+155)) tmp = t_1; else tmp = Float64(x * exp(Float64(t * Float64(-y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * (z ^ y); tmp = 0.0; if (y <= -25000.0) tmp = t_1; elseif (y <= 1.06e+28) tmp = x * exp(((a * -b) - (z * a))); elseif ((y <= 7.2e+62) || ~((y <= 1.3e+155))) tmp = t_1; else tmp = x * exp((t * -y)); 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, -25000.0], t$95$1, If[LessEqual[y, 1.06e+28], N[(x * N[Exp[N[(N[(a * (-b)), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 7.2e+62], N[Not[LessEqual[y, 1.3e+155]], $MachinePrecision]], t$95$1, N[(x * N[Exp[N[(t * (-y)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot {z}^{y}\\
\mathbf{if}\;y \leq -25000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.06 \cdot 10^{+28}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right) - z \cdot a}\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{+62} \lor \neg \left(y \leq 1.3 \cdot 10^{+155}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{t \cdot \left(-y\right)}\\
\end{array}
\end{array}
if y < -25000 or 1.0600000000000001e28 < y < 7.2e62 or 1.3000000000000001e155 < y Initial program 97.4%
Taylor expanded in y around inf 87.2%
Taylor expanded in t around 0 73.5%
if -25000 < y < 1.0600000000000001e28Initial program 96.6%
Taylor expanded in y around 0 84.4%
sub-neg84.4%
sub-neg84.4%
neg-mul-184.4%
log1p-def88.5%
neg-mul-188.5%
sub-neg88.5%
Simplified88.5%
Taylor expanded in z around 0 88.5%
mul-1-neg88.5%
unsub-neg88.5%
mul-1-neg88.5%
distribute-rgt-neg-in88.5%
Simplified88.5%
if 7.2e62 < y < 1.3000000000000001e155Initial program 100.0%
Taylor expanded in t around inf 66.2%
mul-1-neg66.2%
*-commutative66.2%
Simplified66.2%
Final simplification80.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -8e-6) (not (<= t 1.4e-9))) (* x (exp (* t (- y)))) (* x (pow z y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -8e-6) || !(t <= 1.4e-9)) {
tmp = x * exp((t * -y));
} 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 <= (-8d-6)) .or. (.not. (t <= 1.4d-9))) then
tmp = x * exp((t * -y))
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 <= -8e-6) || !(t <= 1.4e-9)) {
tmp = x * Math.exp((t * -y));
} else {
tmp = x * Math.pow(z, y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -8e-6) or not (t <= 1.4e-9): tmp = x * math.exp((t * -y)) else: tmp = x * math.pow(z, y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -8e-6) || !(t <= 1.4e-9)) tmp = Float64(x * exp(Float64(t * Float64(-y)))); 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 <= -8e-6) || ~((t <= 1.4e-9))) tmp = x * exp((t * -y)); else tmp = x * (z ^ y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -8e-6], N[Not[LessEqual[t, 1.4e-9]], $MachinePrecision]], N[(x * N[Exp[N[(t * (-y)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8 \cdot 10^{-6} \lor \neg \left(t \leq 1.4 \cdot 10^{-9}\right):\\
\;\;\;\;x \cdot e^{t \cdot \left(-y\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot {z}^{y}\\
\end{array}
\end{array}
if t < -7.99999999999999964e-6 or 1.39999999999999992e-9 < t Initial program 94.5%
Taylor expanded in t around inf 76.7%
mul-1-neg76.7%
*-commutative76.7%
Simplified76.7%
if -7.99999999999999964e-6 < t < 1.39999999999999992e-9Initial program 99.7%
Taylor expanded in y around inf 68.2%
Taylor expanded in t around 0 68.2%
Final simplification72.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -760.0) (not (<= y 1.4e+27))) (* 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 <= -760.0) || !(y <= 1.4e+27)) {
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 <= (-760.0d0)) .or. (.not. (y <= 1.4d+27))) 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 <= -760.0) || !(y <= 1.4e+27)) {
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 <= -760.0) or not (y <= 1.4e+27): 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 <= -760.0) || !(y <= 1.4e+27)) 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 <= -760.0) || ~((y <= 1.4e+27))) 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, -760.0], N[Not[LessEqual[y, 1.4e+27]], $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 -760 \lor \neg \left(y \leq 1.4 \cdot 10^{+27}\right):\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\
\end{array}
\end{array}
if y < -760 or 1.4e27 < y Initial program 97.7%
Taylor expanded in y around inf 87.0%
Taylor expanded in t around 0 68.7%
if -760 < y < 1.4e27Initial program 96.6%
Taylor expanded in b around inf 83.6%
mul-1-neg83.6%
distribute-rgt-neg-out83.6%
Simplified83.6%
Final simplification76.1%
(FPCore (x y z t a b) :precision binary64 (if (<= t -2.4e+42) (* x (- 1.0 (* y t))) (* x (pow z y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.4e+42) {
tmp = x * (1.0 - (y * t));
} else {
tmp = x * pow(z, y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-2.4d+42)) then
tmp = x * (1.0d0 - (y * t))
else
tmp = x * (z ** y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.4e+42) {
tmp = x * (1.0 - (y * t));
} else {
tmp = x * Math.pow(z, y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -2.4e+42: tmp = x * (1.0 - (y * t)) else: tmp = x * math.pow(z, y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -2.4e+42) tmp = Float64(x * Float64(1.0 - Float64(y * t))); else tmp = Float64(x * (z ^ y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -2.4e+42) tmp = x * (1.0 - (y * t)); else tmp = x * (z ^ y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -2.4e+42], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.4 \cdot 10^{+42}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot {z}^{y}\\
\end{array}
\end{array}
if t < -2.3999999999999999e42Initial program 96.1%
Taylor expanded in t around inf 84.6%
mul-1-neg84.6%
*-commutative84.6%
Simplified84.6%
Taylor expanded in y around 0 34.4%
neg-mul-134.4%
unsub-neg34.4%
*-commutative34.4%
Simplified34.4%
if -2.3999999999999999e42 < t Initial program 97.4%
Taylor expanded in y around inf 68.9%
Taylor expanded in t around 0 63.8%
Final simplification57.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -1.8e+150) (not (<= b 5e+23))) (- x (* a (* x b))) (* x (- 1.0 (* y t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.8e+150) || !(b <= 5e+23)) {
tmp = x - (a * (x * b));
} else {
tmp = x * (1.0 - (y * t));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-1.8d+150)) .or. (.not. (b <= 5d+23))) then
tmp = x - (a * (x * b))
else
tmp = x * (1.0d0 - (y * t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.8e+150) || !(b <= 5e+23)) {
tmp = x - (a * (x * b));
} else {
tmp = x * (1.0 - (y * t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -1.8e+150) or not (b <= 5e+23): tmp = x - (a * (x * b)) else: tmp = x * (1.0 - (y * t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -1.8e+150) || !(b <= 5e+23)) tmp = Float64(x - Float64(a * Float64(x * b))); else tmp = Float64(x * Float64(1.0 - Float64(y * t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -1.8e+150) || ~((b <= 5e+23))) tmp = x - (a * (x * b)); else tmp = x * (1.0 - (y * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -1.8e+150], N[Not[LessEqual[b, 5e+23]], $MachinePrecision]], N[(x - N[(a * N[(x * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.8 \cdot 10^{+150} \lor \neg \left(b \leq 5 \cdot 10^{+23}\right):\\
\;\;\;\;x - a \cdot \left(x \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\end{array}
\end{array}
if b < -1.79999999999999993e150 or 4.9999999999999999e23 < b Initial program 96.8%
Taylor expanded in b around inf 82.2%
mul-1-neg82.2%
distribute-rgt-neg-out82.2%
Simplified82.2%
Taylor expanded in a around 0 34.7%
mul-1-neg34.7%
unsub-neg34.7%
*-commutative34.7%
Simplified34.7%
if -1.79999999999999993e150 < b < 4.9999999999999999e23Initial program 97.3%
Taylor expanded in t around inf 66.3%
mul-1-neg66.3%
*-commutative66.3%
Simplified66.3%
Taylor expanded in y around 0 35.6%
neg-mul-135.6%
unsub-neg35.6%
*-commutative35.6%
Simplified35.6%
Final simplification35.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -4.6e+148) (not (<= b 3.65e+28))) (- x (* a (* x b))) (- x (* t (* x y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -4.6e+148) || !(b <= 3.65e+28)) {
tmp = x - (a * (x * b));
} else {
tmp = x - (t * (x * y));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-4.6d+148)) .or. (.not. (b <= 3.65d+28))) then
tmp = x - (a * (x * b))
else
tmp = x - (t * (x * y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -4.6e+148) || !(b <= 3.65e+28)) {
tmp = x - (a * (x * b));
} else {
tmp = x - (t * (x * y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -4.6e+148) or not (b <= 3.65e+28): tmp = x - (a * (x * b)) else: tmp = x - (t * (x * y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -4.6e+148) || !(b <= 3.65e+28)) tmp = Float64(x - Float64(a * Float64(x * b))); else tmp = Float64(x - Float64(t * Float64(x * y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -4.6e+148) || ~((b <= 3.65e+28))) tmp = x - (a * (x * b)); else tmp = x - (t * (x * y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -4.6e+148], N[Not[LessEqual[b, 3.65e+28]], $MachinePrecision]], N[(x - N[(a * N[(x * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(t * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.6 \cdot 10^{+148} \lor \neg \left(b \leq 3.65 \cdot 10^{+28}\right):\\
\;\;\;\;x - a \cdot \left(x \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x - t \cdot \left(x \cdot y\right)\\
\end{array}
\end{array}
if b < -4.6000000000000001e148 or 3.6499999999999999e28 < b Initial program 96.8%
Taylor expanded in b around inf 82.0%
mul-1-neg82.0%
distribute-rgt-neg-out82.0%
Simplified82.0%
Taylor expanded in a around 0 35.0%
mul-1-neg35.0%
unsub-neg35.0%
*-commutative35.0%
Simplified35.0%
if -4.6000000000000001e148 < b < 3.6499999999999999e28Initial program 97.4%
Taylor expanded in t around inf 66.5%
mul-1-neg66.5%
*-commutative66.5%
Simplified66.5%
Taylor expanded in y around 0 35.9%
mul-1-neg35.9%
unsub-neg35.9%
Simplified35.9%
Final simplification35.6%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1.7e+23) (* t (* x (- y))) (if (<= y 14.0) (* x (- 1.0 (* z a))) (* a (* x (- z))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.7e+23) {
tmp = t * (x * -y);
} else if (y <= 14.0) {
tmp = x * (1.0 - (z * a));
} else {
tmp = a * (x * -z);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-1.7d+23)) then
tmp = t * (x * -y)
else if (y <= 14.0d0) then
tmp = x * (1.0d0 - (z * a))
else
tmp = a * (x * -z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.7e+23) {
tmp = t * (x * -y);
} else if (y <= 14.0) {
tmp = x * (1.0 - (z * a));
} else {
tmp = a * (x * -z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.7e+23: tmp = t * (x * -y) elif y <= 14.0: tmp = x * (1.0 - (z * a)) else: tmp = a * (x * -z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.7e+23) tmp = Float64(t * Float64(x * Float64(-y))); elseif (y <= 14.0) tmp = Float64(x * Float64(1.0 - Float64(z * a))); else tmp = Float64(a * Float64(x * Float64(-z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.7e+23) tmp = t * (x * -y); elseif (y <= 14.0) tmp = x * (1.0 - (z * a)); else tmp = a * (x * -z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.7e+23], N[(t * N[(x * (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 14.0], N[(x * N[(1.0 - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(x * (-z)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.7 \cdot 10^{+23}:\\
\;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\
\mathbf{elif}\;y \leq 14:\\
\;\;\;\;x \cdot \left(1 - z \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-z\right)\right)\\
\end{array}
\end{array}
if y < -1.69999999999999996e23Initial program 98.6%
Taylor expanded in t around inf 56.8%
mul-1-neg56.8%
*-commutative56.8%
Simplified56.8%
Taylor expanded in y around 0 16.4%
neg-mul-116.4%
unsub-neg16.4%
*-commutative16.4%
Simplified16.4%
Taylor expanded in y around inf 19.9%
mul-1-neg19.9%
*-commutative19.9%
distribute-rgt-neg-in19.9%
Simplified19.9%
if -1.69999999999999996e23 < y < 14Initial program 96.6%
Taylor expanded in y around 0 82.9%
sub-neg82.9%
sub-neg82.9%
neg-mul-182.9%
log1p-def87.0%
neg-mul-187.0%
sub-neg87.0%
Simplified87.0%
Taylor expanded in b around 0 40.9%
Taylor expanded in z around 0 40.4%
neg-mul-140.4%
unsub-neg40.4%
Simplified40.4%
if 14 < y Initial program 96.5%
Taylor expanded in y around 0 35.7%
sub-neg35.7%
sub-neg35.7%
neg-mul-135.7%
log1p-def38.9%
neg-mul-138.9%
sub-neg38.9%
Simplified38.9%
Taylor expanded in b around 0 5.6%
Taylor expanded in z around 0 6.9%
neg-mul-16.9%
unsub-neg6.9%
Simplified6.9%
Taylor expanded in a around inf 35.8%
associate-*r*35.8%
neg-mul-135.8%
*-commutative35.8%
Simplified35.8%
Final simplification33.6%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1.9e+130) (- x (* t (* x y))) (if (<= y 1750.0) (- x (* x (* a b))) (* a (* x (- z))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.9e+130) {
tmp = x - (t * (x * y));
} else if (y <= 1750.0) {
tmp = x - (x * (a * b));
} else {
tmp = a * (x * -z);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-1.9d+130)) then
tmp = x - (t * (x * y))
else if (y <= 1750.0d0) then
tmp = x - (x * (a * b))
else
tmp = a * (x * -z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.9e+130) {
tmp = x - (t * (x * y));
} else if (y <= 1750.0) {
tmp = x - (x * (a * b));
} else {
tmp = a * (x * -z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.9e+130: tmp = x - (t * (x * y)) elif y <= 1750.0: tmp = x - (x * (a * b)) else: tmp = a * (x * -z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.9e+130) tmp = Float64(x - Float64(t * Float64(x * y))); elseif (y <= 1750.0) tmp = Float64(x - Float64(x * Float64(a * b))); else tmp = Float64(a * Float64(x * Float64(-z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.9e+130) tmp = x - (t * (x * y)); elseif (y <= 1750.0) tmp = x - (x * (a * b)); else tmp = a * (x * -z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.9e+130], N[(x - N[(t * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1750.0], N[(x - N[(x * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(x * (-z)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.9 \cdot 10^{+130}:\\
\;\;\;\;x - t \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;y \leq 1750:\\
\;\;\;\;x - x \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-z\right)\right)\\
\end{array}
\end{array}
if y < -1.9000000000000001e130Initial program 100.0%
Taylor expanded in t around inf 70.3%
mul-1-neg70.3%
*-commutative70.3%
Simplified70.3%
Taylor expanded in y around 0 21.6%
mul-1-neg21.6%
unsub-neg21.6%
Simplified21.6%
if -1.9000000000000001e130 < y < 1750Initial program 96.5%
Taylor expanded in b around inf 76.9%
mul-1-neg76.9%
distribute-rgt-neg-out76.9%
Simplified76.9%
Taylor expanded in a around 0 43.8%
mul-1-neg43.8%
unsub-neg43.8%
*-commutative43.8%
Simplified43.8%
Taylor expanded in a around 0 43.8%
*-commutative43.8%
*-commutative43.8%
associate-*r*44.4%
*-commutative44.4%
Simplified44.4%
if 1750 < y Initial program 96.5%
Taylor expanded in y around 0 35.7%
sub-neg35.7%
sub-neg35.7%
neg-mul-135.7%
log1p-def38.9%
neg-mul-138.9%
sub-neg38.9%
Simplified38.9%
Taylor expanded in b around 0 5.6%
Taylor expanded in z around 0 6.9%
neg-mul-16.9%
unsub-neg6.9%
Simplified6.9%
Taylor expanded in a around inf 35.8%
associate-*r*35.8%
neg-mul-135.8%
*-commutative35.8%
Simplified35.8%
Final simplification38.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2900000000000.0) (not (<= y 2.2e+28))) (* z (* x (- a))) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2900000000000.0) || !(y <= 2.2e+28)) {
tmp = z * (x * -a);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-2900000000000.0d0)) .or. (.not. (y <= 2.2d+28))) then
tmp = z * (x * -a)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2900000000000.0) || !(y <= 2.2e+28)) {
tmp = z * (x * -a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2900000000000.0) or not (y <= 2.2e+28): tmp = z * (x * -a) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -2900000000000.0) || !(y <= 2.2e+28)) tmp = Float64(z * Float64(x * Float64(-a))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -2900000000000.0) || ~((y <= 2.2e+28))) tmp = z * (x * -a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2900000000000.0], N[Not[LessEqual[y, 2.2e+28]], $MachinePrecision]], N[(z * N[(x * (-a)), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2900000000000 \lor \neg \left(y \leq 2.2 \cdot 10^{+28}\right):\\
\;\;\;\;z \cdot \left(x \cdot \left(-a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -2.9e12 or 2.19999999999999986e28 < y Initial program 97.6%
Taylor expanded in y around 0 43.9%
sub-neg43.9%
sub-neg43.9%
neg-mul-143.9%
log1p-def46.1%
neg-mul-146.1%
sub-neg46.1%
Simplified46.1%
Taylor expanded in b around 0 5.3%
Taylor expanded in z around 0 6.5%
neg-mul-16.5%
unsub-neg6.5%
Simplified6.5%
Taylor expanded in a around inf 22.5%
mul-1-neg22.5%
*-commutative22.5%
distribute-rgt-neg-in22.5%
*-commutative22.5%
associate-*l*22.9%
Simplified22.9%
if -2.9e12 < y < 2.19999999999999986e28Initial program 96.7%
Taylor expanded in t around inf 54.5%
mul-1-neg54.5%
*-commutative54.5%
Simplified54.5%
Taylor expanded in y around 0 38.0%
Final simplification30.7%
(FPCore (x y z t a b) :precision binary64 (if (<= y -2900000000000.0) (* z (* x (- a))) (if (<= y 14.0) x (* a (* x (- z))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2900000000000.0) {
tmp = z * (x * -a);
} else if (y <= 14.0) {
tmp = x;
} else {
tmp = a * (x * -z);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-2900000000000.0d0)) then
tmp = z * (x * -a)
else if (y <= 14.0d0) then
tmp = x
else
tmp = a * (x * -z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2900000000000.0) {
tmp = z * (x * -a);
} else if (y <= 14.0) {
tmp = x;
} else {
tmp = a * (x * -z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2900000000000.0: tmp = z * (x * -a) elif y <= 14.0: tmp = x else: tmp = a * (x * -z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2900000000000.0) tmp = Float64(z * Float64(x * Float64(-a))); elseif (y <= 14.0) tmp = x; else tmp = Float64(a * Float64(x * Float64(-z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -2900000000000.0) tmp = z * (x * -a); elseif (y <= 14.0) tmp = x; else tmp = a * (x * -z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2900000000000.0], N[(z * N[(x * (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 14.0], x, N[(a * N[(x * (-z)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2900000000000:\\
\;\;\;\;z \cdot \left(x \cdot \left(-a\right)\right)\\
\mathbf{elif}\;y \leq 14:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-z\right)\right)\\
\end{array}
\end{array}
if y < -2.9e12Initial program 98.6%
Taylor expanded in y around 0 52.2%
sub-neg52.2%
sub-neg52.2%
neg-mul-152.2%
log1p-def53.4%
neg-mul-153.4%
sub-neg53.4%
Simplified53.4%
Taylor expanded in b around 0 4.9%
Taylor expanded in z around 0 5.9%
neg-mul-15.9%
unsub-neg5.9%
Simplified5.9%
Taylor expanded in a around inf 11.7%
mul-1-neg11.7%
*-commutative11.7%
distribute-rgt-neg-in11.7%
*-commutative11.7%
associate-*l*16.3%
Simplified16.3%
if -2.9e12 < y < 14Initial program 96.6%
Taylor expanded in t around inf 55.4%
mul-1-neg55.4%
*-commutative55.4%
Simplified55.4%
Taylor expanded in y around 0 39.7%
if 14 < y Initial program 96.5%
Taylor expanded in y around 0 35.7%
sub-neg35.7%
sub-neg35.7%
neg-mul-135.7%
log1p-def38.9%
neg-mul-138.9%
sub-neg38.9%
Simplified38.9%
Taylor expanded in b around 0 5.6%
Taylor expanded in z around 0 6.9%
neg-mul-16.9%
unsub-neg6.9%
Simplified6.9%
Taylor expanded in a around inf 35.8%
associate-*r*35.8%
neg-mul-135.8%
*-commutative35.8%
Simplified35.8%
Final simplification32.1%
(FPCore (x y z t a b) :precision binary64 (if (<= y -3.8e+30) (* x (* t (- y))) (if (<= y 14.0) x (* a (* x (- z))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -3.8e+30) {
tmp = x * (t * -y);
} else if (y <= 14.0) {
tmp = x;
} else {
tmp = a * (x * -z);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-3.8d+30)) then
tmp = x * (t * -y)
else if (y <= 14.0d0) then
tmp = x
else
tmp = a * (x * -z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -3.8e+30) {
tmp = x * (t * -y);
} else if (y <= 14.0) {
tmp = x;
} else {
tmp = a * (x * -z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -3.8e+30: tmp = x * (t * -y) elif y <= 14.0: tmp = x else: tmp = a * (x * -z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -3.8e+30) tmp = Float64(x * Float64(t * Float64(-y))); elseif (y <= 14.0) tmp = x; else tmp = Float64(a * Float64(x * Float64(-z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -3.8e+30) tmp = x * (t * -y); elseif (y <= 14.0) tmp = x; else tmp = a * (x * -z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -3.8e+30], N[(x * N[(t * (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 14.0], x, N[(a * N[(x * (-z)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.8 \cdot 10^{+30}:\\
\;\;\;\;x \cdot \left(t \cdot \left(-y\right)\right)\\
\mathbf{elif}\;y \leq 14:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-z\right)\right)\\
\end{array}
\end{array}
if y < -3.8000000000000001e30Initial program 98.6%
Taylor expanded in t around inf 57.5%
mul-1-neg57.5%
*-commutative57.5%
Simplified57.5%
Taylor expanded in y around 0 16.5%
neg-mul-116.5%
unsub-neg16.5%
*-commutative16.5%
Simplified16.5%
Taylor expanded in y around inf 20.2%
mul-1-neg20.2%
*-commutative20.2%
associate-*r*17.6%
distribute-lft-neg-in17.6%
*-commutative17.6%
Simplified17.6%
if -3.8000000000000001e30 < y < 14Initial program 96.6%
Taylor expanded in t around inf 54.6%
mul-1-neg54.6%
*-commutative54.6%
Simplified54.6%
Taylor expanded in y around 0 39.1%
if 14 < y Initial program 96.5%
Taylor expanded in y around 0 35.7%
sub-neg35.7%
sub-neg35.7%
neg-mul-135.7%
log1p-def38.9%
neg-mul-138.9%
sub-neg38.9%
Simplified38.9%
Taylor expanded in b around 0 5.6%
Taylor expanded in z around 0 6.9%
neg-mul-16.9%
unsub-neg6.9%
Simplified6.9%
Taylor expanded in a around inf 35.8%
associate-*r*35.8%
neg-mul-135.8%
*-commutative35.8%
Simplified35.8%
Final simplification32.4%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1.8e+30) (* t (* x (- y))) (if (<= y 14.0) x (* a (* x (- z))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.8e+30) {
tmp = t * (x * -y);
} else if (y <= 14.0) {
tmp = x;
} else {
tmp = a * (x * -z);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-1.8d+30)) then
tmp = t * (x * -y)
else if (y <= 14.0d0) then
tmp = x
else
tmp = a * (x * -z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.8e+30) {
tmp = t * (x * -y);
} else if (y <= 14.0) {
tmp = x;
} else {
tmp = a * (x * -z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.8e+30: tmp = t * (x * -y) elif y <= 14.0: tmp = x else: tmp = a * (x * -z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.8e+30) tmp = Float64(t * Float64(x * Float64(-y))); elseif (y <= 14.0) tmp = x; else tmp = Float64(a * Float64(x * Float64(-z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.8e+30) tmp = t * (x * -y); elseif (y <= 14.0) tmp = x; else tmp = a * (x * -z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.8e+30], N[(t * N[(x * (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 14.0], x, N[(a * N[(x * (-z)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{+30}:\\
\;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\
\mathbf{elif}\;y \leq 14:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-z\right)\right)\\
\end{array}
\end{array}
if y < -1.8000000000000001e30Initial program 98.6%
Taylor expanded in t around inf 57.5%
mul-1-neg57.5%
*-commutative57.5%
Simplified57.5%
Taylor expanded in y around 0 16.5%
neg-mul-116.5%
unsub-neg16.5%
*-commutative16.5%
Simplified16.5%
Taylor expanded in y around inf 20.2%
mul-1-neg20.2%
*-commutative20.2%
distribute-rgt-neg-in20.2%
Simplified20.2%
if -1.8000000000000001e30 < y < 14Initial program 96.6%
Taylor expanded in t around inf 54.6%
mul-1-neg54.6%
*-commutative54.6%
Simplified54.6%
Taylor expanded in y around 0 39.1%
if 14 < y Initial program 96.5%
Taylor expanded in y around 0 35.7%
sub-neg35.7%
sub-neg35.7%
neg-mul-135.7%
log1p-def38.9%
neg-mul-138.9%
sub-neg38.9%
Simplified38.9%
Taylor expanded in b around 0 5.6%
Taylor expanded in z around 0 6.9%
neg-mul-16.9%
unsub-neg6.9%
Simplified6.9%
Taylor expanded in a around inf 35.8%
associate-*r*35.8%
neg-mul-135.8%
*-commutative35.8%
Simplified35.8%
Final simplification33.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -2.4e+77) (not (<= a 8.2e+100))) (* x (* y t)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -2.4e+77) || !(a <= 8.2e+100)) {
tmp = x * (y * t);
} 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 ((a <= (-2.4d+77)) .or. (.not. (a <= 8.2d+100))) then
tmp = x * (y * t)
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 ((a <= -2.4e+77) || !(a <= 8.2e+100)) {
tmp = x * (y * t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -2.4e+77) or not (a <= 8.2e+100): tmp = x * (y * t) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -2.4e+77) || !(a <= 8.2e+100)) tmp = Float64(x * Float64(y * t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -2.4e+77) || ~((a <= 8.2e+100))) tmp = x * (y * t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -2.4e+77], N[Not[LessEqual[a, 8.2e+100]], $MachinePrecision]], N[(x * N[(y * t), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.4 \cdot 10^{+77} \lor \neg \left(a \leq 8.2 \cdot 10^{+100}\right):\\
\;\;\;\;x \cdot \left(y \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -2.3999999999999999e77 or 8.2000000000000006e100 < a Initial program 92.2%
Taylor expanded in t around inf 32.6%
mul-1-neg32.6%
*-commutative32.6%
Simplified32.6%
Taylor expanded in y around 0 7.4%
neg-mul-17.4%
unsub-neg7.4%
*-commutative7.4%
Simplified7.4%
Taylor expanded in y around inf 16.4%
mul-1-neg16.4%
*-commutative16.4%
associate-*r*18.5%
distribute-lft-neg-in18.5%
*-commutative18.5%
Simplified18.5%
expm1-log1p-u15.6%
expm1-udef29.9%
*-commutative29.9%
associate-*l*29.9%
add-sqr-sqrt10.4%
sqrt-unprod34.3%
sqr-neg34.3%
sqrt-unprod22.9%
add-sqr-sqrt33.4%
Applied egg-rr33.4%
expm1-def16.9%
expm1-log1p18.4%
associate-*r*20.5%
*-commutative20.5%
Simplified20.5%
if -2.3999999999999999e77 < a < 8.2000000000000006e100Initial program 99.8%
Taylor expanded in t around inf 65.1%
mul-1-neg65.1%
*-commutative65.1%
Simplified65.1%
Taylor expanded in y around 0 30.9%
Final simplification27.2%
(FPCore (x y z t a b) :precision binary64 (if (<= y 16.5) (* x (- 1.0 (* y t))) (* a (* x (- z)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 16.5) {
tmp = x * (1.0 - (y * t));
} else {
tmp = a * (x * -z);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= 16.5d0) then
tmp = x * (1.0d0 - (y * t))
else
tmp = a * (x * -z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 16.5) {
tmp = x * (1.0 - (y * t));
} else {
tmp = a * (x * -z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 16.5: tmp = x * (1.0 - (y * t)) else: tmp = a * (x * -z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 16.5) tmp = Float64(x * Float64(1.0 - Float64(y * t))); else tmp = Float64(a * Float64(x * Float64(-z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= 16.5) tmp = x * (1.0 - (y * t)); else tmp = a * (x * -z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 16.5], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(x * (-z)), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 16.5:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-z\right)\right)\\
\end{array}
\end{array}
if y < 16.5Initial program 97.3%
Taylor expanded in t around inf 55.6%
mul-1-neg55.6%
*-commutative55.6%
Simplified55.6%
Taylor expanded in y around 0 32.6%
neg-mul-132.6%
unsub-neg32.6%
*-commutative32.6%
Simplified32.6%
if 16.5 < y Initial program 96.5%
Taylor expanded in y around 0 35.7%
sub-neg35.7%
sub-neg35.7%
neg-mul-135.7%
log1p-def38.9%
neg-mul-138.9%
sub-neg38.9%
Simplified38.9%
Taylor expanded in b around 0 5.6%
Taylor expanded in z around 0 6.9%
neg-mul-16.9%
unsub-neg6.9%
Simplified6.9%
Taylor expanded in a around inf 35.8%
associate-*r*35.8%
neg-mul-135.8%
*-commutative35.8%
Simplified35.8%
Final simplification33.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 97.1%
Taylor expanded in t around inf 53.8%
mul-1-neg53.8%
*-commutative53.8%
Simplified53.8%
Taylor expanded in y around 0 21.4%
Final simplification21.4%
herbie shell --seed 2023336
(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))))))