
(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 17 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 a (- (log1p (- z)) b) (* y (- (log z) t))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(fma(a, (log1p(-z) - b), (y * (log(z) - t))));
}
function code(x, y, z, t, a, b) return Float64(x * exp(fma(a, Float64(log1p(Float64(-z)) - b), Float64(y * Float64(log(z) - t))))) end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(a * N[(N[Log[1 + (-z)], $MachinePrecision] - b), $MachinePrecision] + N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{\mathsf{fma}\left(a, \mathsf{log1p}\left(-z\right) - b, y \cdot \left(\log z - t\right)\right)}
\end{array}
Initial program 97.7%
+-commutative97.7%
fma-def98.1%
sub-neg98.1%
log1p-def99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y z t a b) :precision binary64 (* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b))));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x * exp(((y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x * Math.exp(((y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b))));
}
def code(x, y, z, t, a, b): return x * math.exp(((y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b))))
function code(x, y, z, t, a, b) return Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))))) end
function tmp = code(x, y, z, t, a, b) tmp = x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b)))); end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}
\end{array}
Initial program 97.7%
Final simplification97.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.05e-156) (not (<= y 3.9e-44))) (* x (exp (* y (- (log z) t)))) (* x (exp (* a (- (- z) b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.05e-156) || !(y <= 3.9e-44)) {
tmp = x * exp((y * (log(z) - t)));
} else {
tmp = x * exp((a * (-z - b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-1.05d-156)) .or. (.not. (y <= 3.9d-44))) then
tmp = x * exp((y * (log(z) - t)))
else
tmp = x * exp((a * (-z - b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.05e-156) || !(y <= 3.9e-44)) {
tmp = x * Math.exp((y * (Math.log(z) - t)));
} else {
tmp = x * Math.exp((a * (-z - b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.05e-156) or not (y <= 3.9e-44): tmp = x * math.exp((y * (math.log(z) - t))) else: tmp = x * math.exp((a * (-z - b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.05e-156) || !(y <= 3.9e-44)) tmp = Float64(x * exp(Float64(y * Float64(log(z) - t)))); else tmp = Float64(x * exp(Float64(a * Float64(Float64(-z) - b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.05e-156) || ~((y <= 3.9e-44))) tmp = x * exp((y * (log(z) - t))); else tmp = x * exp((a * (-z - b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.05e-156], N[Not[LessEqual[y, 3.9e-44]], $MachinePrecision]], N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(a * N[((-z) - b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.05 \cdot 10^{-156} \lor \neg \left(y \leq 3.9 \cdot 10^{-44}\right):\\
\;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(\left(-z\right) - b\right)}\\
\end{array}
\end{array}
if y < -1.05000000000000006e-156 or 3.9000000000000002e-44 < y Initial program 98.3%
Taylor expanded in y around inf 83.5%
if -1.05000000000000006e-156 < y < 3.9000000000000002e-44Initial program 96.2%
Taylor expanded in y around 0 89.9%
sub-neg89.9%
neg-mul-189.9%
log1p-def93.7%
neg-mul-193.7%
Simplified93.7%
Taylor expanded in z around 0 93.7%
associate-*r*93.7%
associate-*r*93.7%
distribute-lft-out93.7%
neg-mul-193.7%
Simplified93.7%
Final simplification86.5%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= y -3.8)
(and (not (<= y 1.8e+60)) (or (<= y 2.2e+142) (not (<= y 1.9e+172)))))
(* x (pow z y))
(* x (exp (- (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.8) || (!(y <= 1.8e+60) && ((y <= 2.2e+142) || !(y <= 1.9e+172)))) {
tmp = x * pow(z, y);
} else {
tmp = x * exp(-(a * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-3.8d0)) .or. (.not. (y <= 1.8d+60)) .and. (y <= 2.2d+142) .or. (.not. (y <= 1.9d+172))) then
tmp = x * (z ** y)
else
tmp = x * exp(-(a * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.8) || (!(y <= 1.8e+60) && ((y <= 2.2e+142) || !(y <= 1.9e+172)))) {
tmp = x * Math.pow(z, y);
} else {
tmp = x * Math.exp(-(a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -3.8) or (not (y <= 1.8e+60) and ((y <= 2.2e+142) or not (y <= 1.9e+172))): tmp = x * math.pow(z, y) else: tmp = x * math.exp(-(a * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -3.8) || (!(y <= 1.8e+60) && ((y <= 2.2e+142) || !(y <= 1.9e+172)))) tmp = Float64(x * (z ^ y)); else tmp = Float64(x * exp(Float64(-Float64(a * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -3.8) || (~((y <= 1.8e+60)) && ((y <= 2.2e+142) || ~((y <= 1.9e+172))))) tmp = x * (z ^ y); else tmp = x * exp(-(a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -3.8], And[N[Not[LessEqual[y, 1.8e+60]], $MachinePrecision], Or[LessEqual[y, 2.2e+142], N[Not[LessEqual[y, 1.9e+172]], $MachinePrecision]]]], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[(-N[(a * b), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.8 \lor \neg \left(y \leq 1.8 \cdot 10^{+60}\right) \land \left(y \leq 2.2 \cdot 10^{+142} \lor \neg \left(y \leq 1.9 \cdot 10^{+172}\right)\right):\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{-a \cdot b}\\
\end{array}
\end{array}
if y < -3.7999999999999998 or 1.79999999999999984e60 < y < 2.19999999999999987e142 or 1.89999999999999985e172 < y Initial program 97.5%
Taylor expanded in y around inf 87.5%
Taylor expanded in t around 0 70.8%
if -3.7999999999999998 < y < 1.79999999999999984e60 or 2.19999999999999987e142 < y < 1.89999999999999985e172Initial program 97.9%
Taylor expanded in b around inf 78.4%
associate-*r*78.4%
*-commutative78.4%
neg-mul-178.4%
Simplified78.4%
Final simplification74.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (pow z y))))
(if (<= y -220.0)
t_1
(if (<= y 2.3e-43)
(* x (exp (- (* a b))))
(if (or (<= y 6e+181) (not (<= y 4.3e+250)))
(* x (exp (* t (- y))))
t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * pow(z, y);
double tmp;
if (y <= -220.0) {
tmp = t_1;
} else if (y <= 2.3e-43) {
tmp = x * exp(-(a * b));
} else if ((y <= 6e+181) || !(y <= 4.3e+250)) {
tmp = x * exp((t * -y));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x * (z ** y)
if (y <= (-220.0d0)) then
tmp = t_1
else if (y <= 2.3d-43) then
tmp = x * exp(-(a * b))
else if ((y <= 6d+181) .or. (.not. (y <= 4.3d+250))) then
tmp = x * exp((t * -y))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * Math.pow(z, y);
double tmp;
if (y <= -220.0) {
tmp = t_1;
} else if (y <= 2.3e-43) {
tmp = x * Math.exp(-(a * b));
} else if ((y <= 6e+181) || !(y <= 4.3e+250)) {
tmp = x * Math.exp((t * -y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * math.pow(z, y) tmp = 0 if y <= -220.0: tmp = t_1 elif y <= 2.3e-43: tmp = x * math.exp(-(a * b)) elif (y <= 6e+181) or not (y <= 4.3e+250): tmp = x * math.exp((t * -y)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * (z ^ y)) tmp = 0.0 if (y <= -220.0) tmp = t_1; elseif (y <= 2.3e-43) tmp = Float64(x * exp(Float64(-Float64(a * b)))); elseif ((y <= 6e+181) || !(y <= 4.3e+250)) tmp = Float64(x * exp(Float64(t * Float64(-y)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * (z ^ y); tmp = 0.0; if (y <= -220.0) tmp = t_1; elseif (y <= 2.3e-43) tmp = x * exp(-(a * b)); elseif ((y <= 6e+181) || ~((y <= 4.3e+250))) tmp = x * exp((t * -y)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -220.0], t$95$1, If[LessEqual[y, 2.3e-43], N[(x * N[Exp[(-N[(a * b), $MachinePrecision])], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 6e+181], N[Not[LessEqual[y, 4.3e+250]], $MachinePrecision]], N[(x * N[Exp[N[(t * (-y)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot {z}^{y}\\
\mathbf{if}\;y \leq -220:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.3 \cdot 10^{-43}:\\
\;\;\;\;x \cdot e^{-a \cdot b}\\
\mathbf{elif}\;y \leq 6 \cdot 10^{+181} \lor \neg \left(y \leq 4.3 \cdot 10^{+250}\right):\\
\;\;\;\;x \cdot e^{t \cdot \left(-y\right)}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -220 or 6.00000000000000024e181 < y < 4.3e250Initial program 97.6%
Taylor expanded in y around inf 87.0%
Taylor expanded in t around 0 73.9%
if -220 < y < 2.2999999999999999e-43Initial program 97.4%
Taylor expanded in b around inf 82.0%
associate-*r*82.0%
*-commutative82.0%
neg-mul-182.0%
Simplified82.0%
if 2.2999999999999999e-43 < y < 6.00000000000000024e181 or 4.3e250 < y Initial program 98.4%
Taylor expanded in t around inf 74.1%
mul-1-neg74.1%
distribute-rgt-neg-out74.1%
Simplified74.1%
Final simplification77.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (pow z y))))
(if (<= y -23500000000000.0)
t_1
(if (<= y 2.8e-43)
(* x (exp (* a (- (- z) b))))
(if (or (<= y 9e+181) (not (<= y 9e+249)))
(* x (exp (* t (- y))))
t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * pow(z, y);
double tmp;
if (y <= -23500000000000.0) {
tmp = t_1;
} else if (y <= 2.8e-43) {
tmp = x * exp((a * (-z - b)));
} else if ((y <= 9e+181) || !(y <= 9e+249)) {
tmp = x * exp((t * -y));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x * (z ** y)
if (y <= (-23500000000000.0d0)) then
tmp = t_1
else if (y <= 2.8d-43) then
tmp = x * exp((a * (-z - b)))
else if ((y <= 9d+181) .or. (.not. (y <= 9d+249))) then
tmp = x * exp((t * -y))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * Math.pow(z, y);
double tmp;
if (y <= -23500000000000.0) {
tmp = t_1;
} else if (y <= 2.8e-43) {
tmp = x * Math.exp((a * (-z - b)));
} else if ((y <= 9e+181) || !(y <= 9e+249)) {
tmp = x * Math.exp((t * -y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * math.pow(z, y) tmp = 0 if y <= -23500000000000.0: tmp = t_1 elif y <= 2.8e-43: tmp = x * math.exp((a * (-z - b))) elif (y <= 9e+181) or not (y <= 9e+249): tmp = x * math.exp((t * -y)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * (z ^ y)) tmp = 0.0 if (y <= -23500000000000.0) tmp = t_1; elseif (y <= 2.8e-43) tmp = Float64(x * exp(Float64(a * Float64(Float64(-z) - b)))); elseif ((y <= 9e+181) || !(y <= 9e+249)) tmp = Float64(x * exp(Float64(t * Float64(-y)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * (z ^ y); tmp = 0.0; if (y <= -23500000000000.0) tmp = t_1; elseif (y <= 2.8e-43) tmp = x * exp((a * (-z - b))); elseif ((y <= 9e+181) || ~((y <= 9e+249))) tmp = x * exp((t * -y)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -23500000000000.0], t$95$1, If[LessEqual[y, 2.8e-43], N[(x * N[Exp[N[(a * N[((-z) - b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 9e+181], N[Not[LessEqual[y, 9e+249]], $MachinePrecision]], N[(x * N[Exp[N[(t * (-y)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot {z}^{y}\\
\mathbf{if}\;y \leq -23500000000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{-43}:\\
\;\;\;\;x \cdot e^{a \cdot \left(\left(-z\right) - b\right)}\\
\mathbf{elif}\;y \leq 9 \cdot 10^{+181} \lor \neg \left(y \leq 9 \cdot 10^{+249}\right):\\
\;\;\;\;x \cdot e^{t \cdot \left(-y\right)}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -2.35e13 or 9e181 < y < 8.9999999999999993e249Initial program 97.6%
Taylor expanded in y around inf 86.8%
Taylor expanded in t around 0 73.6%
if -2.35e13 < y < 2.7999999999999998e-43Initial program 97.4%
Taylor expanded in y around 0 81.3%
sub-neg81.3%
neg-mul-181.3%
log1p-def85.6%
neg-mul-185.6%
Simplified85.6%
Taylor expanded in z around 0 85.6%
associate-*r*85.6%
associate-*r*85.6%
distribute-lft-out85.6%
neg-mul-185.6%
Simplified85.6%
if 2.7999999999999998e-43 < y < 9e181 or 8.9999999999999993e249 < y Initial program 98.4%
Taylor expanded in t around inf 74.1%
mul-1-neg74.1%
distribute-rgt-neg-out74.1%
Simplified74.1%
Final simplification79.0%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -7000000000000.0)
(* x (- 1.0 (* y t)))
(if (or (<= t 4e+184) (not (<= t 1.6e+236)))
(* x (pow z y))
(/ (- 1.0 (* (* y y) (* t t))) (/ (+ (* y t) 1.0) x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -7000000000000.0) {
tmp = x * (1.0 - (y * t));
} else if ((t <= 4e+184) || !(t <= 1.6e+236)) {
tmp = x * pow(z, y);
} else {
tmp = (1.0 - ((y * y) * (t * t))) / (((y * t) + 1.0) / 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 (t <= (-7000000000000.0d0)) then
tmp = x * (1.0d0 - (y * t))
else if ((t <= 4d+184) .or. (.not. (t <= 1.6d+236))) then
tmp = x * (z ** y)
else
tmp = (1.0d0 - ((y * y) * (t * t))) / (((y * t) + 1.0d0) / 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 (t <= -7000000000000.0) {
tmp = x * (1.0 - (y * t));
} else if ((t <= 4e+184) || !(t <= 1.6e+236)) {
tmp = x * Math.pow(z, y);
} else {
tmp = (1.0 - ((y * y) * (t * t))) / (((y * t) + 1.0) / x);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -7000000000000.0: tmp = x * (1.0 - (y * t)) elif (t <= 4e+184) or not (t <= 1.6e+236): tmp = x * math.pow(z, y) else: tmp = (1.0 - ((y * y) * (t * t))) / (((y * t) + 1.0) / x) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -7000000000000.0) tmp = Float64(x * Float64(1.0 - Float64(y * t))); elseif ((t <= 4e+184) || !(t <= 1.6e+236)) tmp = Float64(x * (z ^ y)); else tmp = Float64(Float64(1.0 - Float64(Float64(y * y) * Float64(t * t))) / Float64(Float64(Float64(y * t) + 1.0) / x)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -7000000000000.0) tmp = x * (1.0 - (y * t)); elseif ((t <= 4e+184) || ~((t <= 1.6e+236))) tmp = x * (z ^ y); else tmp = (1.0 - ((y * y) * (t * t))) / (((y * t) + 1.0) / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -7000000000000.0], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 4e+184], N[Not[LessEqual[t, 1.6e+236]], $MachinePrecision]], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - N[(N[(y * y), $MachinePrecision] * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(y * t), $MachinePrecision] + 1.0), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7000000000000:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\mathbf{elif}\;t \leq 4 \cdot 10^{+184} \lor \neg \left(t \leq 1.6 \cdot 10^{+236}\right):\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - \left(y \cdot y\right) \cdot \left(t \cdot t\right)}{\frac{y \cdot t + 1}{x}}\\
\end{array}
\end{array}
if t < -7e12Initial program 98.4%
Taylor expanded in t around inf 84.1%
mul-1-neg84.1%
distribute-rgt-neg-out84.1%
Simplified84.1%
Taylor expanded in y around 0 36.7%
+-commutative36.7%
mul-1-neg36.7%
unsub-neg36.7%
*-commutative36.7%
Simplified36.7%
if -7e12 < t < 4.00000000000000007e184 or 1.6000000000000001e236 < t Initial program 97.4%
Taylor expanded in y around inf 66.9%
Taylor expanded in t around 0 61.9%
if 4.00000000000000007e184 < t < 1.6000000000000001e236Initial program 100.0%
Taylor expanded in t around inf 83.7%
mul-1-neg83.7%
distribute-rgt-neg-out83.7%
Simplified83.7%
Taylor expanded in y around 0 4.2%
+-commutative4.2%
mul-1-neg4.2%
unsub-neg4.2%
*-commutative4.2%
Simplified4.2%
distribute-rgt-out--4.2%
*-un-lft-identity4.2%
*-commutative4.2%
associate-*r*19.5%
sub-neg19.5%
flip-+18.5%
distribute-rgt-neg-in18.5%
*-commutative18.5%
distribute-rgt-neg-in18.5%
*-commutative18.5%
distribute-rgt-neg-in18.5%
*-commutative18.5%
Applied egg-rr18.5%
Taylor expanded in x around 0 83.3%
associate-/l*83.3%
sub-neg83.3%
mul-1-neg83.3%
*-commutative83.3%
remove-double-neg83.3%
*-commutative83.3%
unpow283.3%
unpow283.3%
*-commutative83.3%
*-lft-identity83.3%
metadata-eval83.3%
*-commutative83.3%
cancel-sign-sub-inv83.3%
mul-1-neg83.3%
Simplified83.3%
Final simplification56.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* y (* x t)))) (t_2 (/ (* x x) t_1)))
(if (<= b -260000000.0)
t_2
(if (<= b 9e-14)
(* x (- 1.0 (* y t)))
(if (<= b 1.16e+70)
t_2
(if (<= b 1.15e+280)
(* x (- 1.0 (* a b)))
(/ (* (* y y) (* (* t t) (- (* x x)))) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * (x * t));
double t_2 = (x * x) / t_1;
double tmp;
if (b <= -260000000.0) {
tmp = t_2;
} else if (b <= 9e-14) {
tmp = x * (1.0 - (y * t));
} else if (b <= 1.16e+70) {
tmp = t_2;
} else if (b <= 1.15e+280) {
tmp = x * (1.0 - (a * b));
} else {
tmp = ((y * y) * ((t * t) * -(x * x))) / t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + (y * (x * t))
t_2 = (x * x) / t_1
if (b <= (-260000000.0d0)) then
tmp = t_2
else if (b <= 9d-14) then
tmp = x * (1.0d0 - (y * t))
else if (b <= 1.16d+70) then
tmp = t_2
else if (b <= 1.15d+280) then
tmp = x * (1.0d0 - (a * b))
else
tmp = ((y * y) * ((t * t) * -(x * x))) / t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * (x * t));
double t_2 = (x * x) / t_1;
double tmp;
if (b <= -260000000.0) {
tmp = t_2;
} else if (b <= 9e-14) {
tmp = x * (1.0 - (y * t));
} else if (b <= 1.16e+70) {
tmp = t_2;
} else if (b <= 1.15e+280) {
tmp = x * (1.0 - (a * b));
} else {
tmp = ((y * y) * ((t * t) * -(x * x))) / t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y * (x * t)) t_2 = (x * x) / t_1 tmp = 0 if b <= -260000000.0: tmp = t_2 elif b <= 9e-14: tmp = x * (1.0 - (y * t)) elif b <= 1.16e+70: tmp = t_2 elif b <= 1.15e+280: tmp = x * (1.0 - (a * b)) else: tmp = ((y * y) * ((t * t) * -(x * x))) / t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y * Float64(x * t))) t_2 = Float64(Float64(x * x) / t_1) tmp = 0.0 if (b <= -260000000.0) tmp = t_2; elseif (b <= 9e-14) tmp = Float64(x * Float64(1.0 - Float64(y * t))); elseif (b <= 1.16e+70) tmp = t_2; elseif (b <= 1.15e+280) tmp = Float64(x * Float64(1.0 - Float64(a * b))); else tmp = Float64(Float64(Float64(y * y) * Float64(Float64(t * t) * Float64(-Float64(x * x)))) / t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y * (x * t)); t_2 = (x * x) / t_1; tmp = 0.0; if (b <= -260000000.0) tmp = t_2; elseif (b <= 9e-14) tmp = x * (1.0 - (y * t)); elseif (b <= 1.16e+70) tmp = t_2; elseif (b <= 1.15e+280) tmp = x * (1.0 - (a * b)); else tmp = ((y * y) * ((t * t) * -(x * x))) / t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * x), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[b, -260000000.0], t$95$2, If[LessEqual[b, 9e-14], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.16e+70], t$95$2, If[LessEqual[b, 1.15e+280], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * y), $MachinePrecision] * N[(N[(t * t), $MachinePrecision] * (-N[(x * x), $MachinePrecision])), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \left(x \cdot t\right)\\
t_2 := \frac{x \cdot x}{t_1}\\
\mathbf{if}\;b \leq -260000000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq 9 \cdot 10^{-14}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\mathbf{elif}\;b \leq 1.16 \cdot 10^{+70}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq 1.15 \cdot 10^{+280}:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(y \cdot y\right) \cdot \left(\left(t \cdot t\right) \cdot \left(-x \cdot x\right)\right)}{t_1}\\
\end{array}
\end{array}
if b < -2.6e8 or 8.9999999999999995e-14 < b < 1.1599999999999999e70Initial program 98.8%
Taylor expanded in t around inf 43.9%
mul-1-neg43.9%
distribute-rgt-neg-out43.9%
Simplified43.9%
Taylor expanded in y around 0 16.5%
+-commutative16.5%
mul-1-neg16.5%
unsub-neg16.5%
*-commutative16.5%
Simplified16.5%
distribute-rgt-out--16.5%
*-un-lft-identity16.5%
*-commutative16.5%
associate-*r*17.6%
sub-neg17.6%
flip-+21.2%
distribute-rgt-neg-in21.2%
*-commutative21.2%
distribute-rgt-neg-in21.2%
*-commutative21.2%
distribute-rgt-neg-in21.2%
*-commutative21.2%
Applied egg-rr21.2%
Taylor expanded in y around 0 37.4%
unpow237.4%
Simplified37.4%
if -2.6e8 < b < 8.9999999999999995e-14Initial program 96.6%
Taylor expanded in t around inf 71.0%
mul-1-neg71.0%
distribute-rgt-neg-out71.0%
Simplified71.0%
Taylor expanded in y around 0 41.7%
+-commutative41.7%
mul-1-neg41.7%
unsub-neg41.7%
*-commutative41.7%
Simplified41.7%
if 1.1599999999999999e70 < b < 1.15e280Initial program 97.8%
Taylor expanded in b around inf 77.1%
associate-*r*77.1%
*-commutative77.1%
neg-mul-177.1%
Simplified77.1%
Taylor expanded in b around 0 33.7%
mul-1-neg33.7%
unsub-neg33.7%
*-commutative33.7%
Simplified33.7%
if 1.15e280 < b Initial program 100.0%
Taylor expanded in t around inf 26.2%
mul-1-neg26.2%
distribute-rgt-neg-out26.2%
Simplified26.2%
Taylor expanded in y around 0 4.7%
+-commutative4.7%
mul-1-neg4.7%
unsub-neg4.7%
*-commutative4.7%
Simplified4.7%
distribute-rgt-out--4.7%
*-un-lft-identity4.7%
*-commutative4.7%
associate-*r*4.7%
sub-neg4.7%
flip-+46.1%
distribute-rgt-neg-in46.1%
*-commutative46.1%
distribute-rgt-neg-in46.1%
*-commutative46.1%
distribute-rgt-neg-in46.1%
*-commutative46.1%
Applied egg-rr46.1%
Taylor expanded in y around inf 66.9%
mul-1-neg66.9%
unpow266.9%
unpow266.9%
unpow266.9%
Simplified66.9%
Final simplification39.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x x) (+ x (* y (* x t))))))
(if (<= b -26000000.0)
t_1
(if (<= b 2.3e-13)
(* x (- 1.0 (* y t)))
(if (or (<= b 8e+66) (not (<= b 1.95e+277)))
t_1
(* x (- 1.0 (* a b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * x) / (x + (y * (x * t)));
double tmp;
if (b <= -26000000.0) {
tmp = t_1;
} else if (b <= 2.3e-13) {
tmp = x * (1.0 - (y * t));
} else if ((b <= 8e+66) || !(b <= 1.95e+277)) {
tmp = t_1;
} else {
tmp = x * (1.0 - (a * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (x * x) / (x + (y * (x * t)))
if (b <= (-26000000.0d0)) then
tmp = t_1
else if (b <= 2.3d-13) then
tmp = x * (1.0d0 - (y * t))
else if ((b <= 8d+66) .or. (.not. (b <= 1.95d+277))) then
tmp = t_1
else
tmp = x * (1.0d0 - (a * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * x) / (x + (y * (x * t)));
double tmp;
if (b <= -26000000.0) {
tmp = t_1;
} else if (b <= 2.3e-13) {
tmp = x * (1.0 - (y * t));
} else if ((b <= 8e+66) || !(b <= 1.95e+277)) {
tmp = t_1;
} else {
tmp = x * (1.0 - (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x * x) / (x + (y * (x * t))) tmp = 0 if b <= -26000000.0: tmp = t_1 elif b <= 2.3e-13: tmp = x * (1.0 - (y * t)) elif (b <= 8e+66) or not (b <= 1.95e+277): tmp = t_1 else: tmp = x * (1.0 - (a * b)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * x) / Float64(x + Float64(y * Float64(x * t)))) tmp = 0.0 if (b <= -26000000.0) tmp = t_1; elseif (b <= 2.3e-13) tmp = Float64(x * Float64(1.0 - Float64(y * t))); elseif ((b <= 8e+66) || !(b <= 1.95e+277)) tmp = t_1; else tmp = Float64(x * Float64(1.0 - Float64(a * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x * x) / (x + (y * (x * t))); tmp = 0.0; if (b <= -26000000.0) tmp = t_1; elseif (b <= 2.3e-13) tmp = x * (1.0 - (y * t)); elseif ((b <= 8e+66) || ~((b <= 1.95e+277))) tmp = t_1; else tmp = x * (1.0 - (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x * x), $MachinePrecision] / N[(x + N[(y * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -26000000.0], t$95$1, If[LessEqual[b, 2.3e-13], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[b, 8e+66], N[Not[LessEqual[b, 1.95e+277]], $MachinePrecision]], t$95$1, N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot x}{x + y \cdot \left(x \cdot t\right)}\\
\mathbf{if}\;b \leq -26000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 2.3 \cdot 10^{-13}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\mathbf{elif}\;b \leq 8 \cdot 10^{+66} \lor \neg \left(b \leq 1.95 \cdot 10^{+277}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\
\end{array}
\end{array}
if b < -2.6e7 or 2.29999999999999979e-13 < b < 7.99999999999999956e66 or 1.95000000000000002e277 < b Initial program 98.9%
Taylor expanded in t around inf 42.2%
mul-1-neg42.2%
distribute-rgt-neg-out42.2%
Simplified42.2%
Taylor expanded in y around 0 15.4%
+-commutative15.4%
mul-1-neg15.4%
unsub-neg15.4%
*-commutative15.4%
Simplified15.4%
distribute-rgt-out--15.4%
*-un-lft-identity15.4%
*-commutative15.4%
associate-*r*16.4%
sub-neg16.4%
flip-+23.6%
distribute-rgt-neg-in23.6%
*-commutative23.6%
distribute-rgt-neg-in23.6%
*-commutative23.6%
distribute-rgt-neg-in23.6%
*-commutative23.6%
Applied egg-rr23.6%
Taylor expanded in y around 0 39.3%
unpow239.3%
Simplified39.3%
if -2.6e7 < b < 2.29999999999999979e-13Initial program 96.6%
Taylor expanded in t around inf 71.0%
mul-1-neg71.0%
distribute-rgt-neg-out71.0%
Simplified71.0%
Taylor expanded in y around 0 41.7%
+-commutative41.7%
mul-1-neg41.7%
unsub-neg41.7%
*-commutative41.7%
Simplified41.7%
if 7.99999999999999956e66 < b < 1.95000000000000002e277Initial program 97.8%
Taylor expanded in b around inf 77.1%
associate-*r*77.1%
*-commutative77.1%
neg-mul-177.1%
Simplified77.1%
Taylor expanded in b around 0 33.7%
mul-1-neg33.7%
unsub-neg33.7%
*-commutative33.7%
Simplified33.7%
Final simplification39.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= x -6.5e+246)
(* x (* t (- y)))
(if (or (<= x -1.5e-199) (not (<= x 1.22e-63)))
(* x (- 1.0 (* a b)))
(* a (* x (- z))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -6.5e+246) {
tmp = x * (t * -y);
} else if ((x <= -1.5e-199) || !(x <= 1.22e-63)) {
tmp = x * (1.0 - (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 (x <= (-6.5d+246)) then
tmp = x * (t * -y)
else if ((x <= (-1.5d-199)) .or. (.not. (x <= 1.22d-63))) then
tmp = x * (1.0d0 - (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 (x <= -6.5e+246) {
tmp = x * (t * -y);
} else if ((x <= -1.5e-199) || !(x <= 1.22e-63)) {
tmp = x * (1.0 - (a * b));
} else {
tmp = a * (x * -z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -6.5e+246: tmp = x * (t * -y) elif (x <= -1.5e-199) or not (x <= 1.22e-63): tmp = x * (1.0 - (a * b)) else: tmp = a * (x * -z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -6.5e+246) tmp = Float64(x * Float64(t * Float64(-y))); elseif ((x <= -1.5e-199) || !(x <= 1.22e-63)) tmp = Float64(x * Float64(1.0 - 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 (x <= -6.5e+246) tmp = x * (t * -y); elseif ((x <= -1.5e-199) || ~((x <= 1.22e-63))) tmp = x * (1.0 - (a * b)); else tmp = a * (x * -z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -6.5e+246], N[(x * N[(t * (-y)), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, -1.5e-199], N[Not[LessEqual[x, 1.22e-63]], $MachinePrecision]], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(x * (-z)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.5 \cdot 10^{+246}:\\
\;\;\;\;x \cdot \left(t \cdot \left(-y\right)\right)\\
\mathbf{elif}\;x \leq -1.5 \cdot 10^{-199} \lor \neg \left(x \leq 1.22 \cdot 10^{-63}\right):\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-z\right)\right)\\
\end{array}
\end{array}
if x < -6.49999999999999977e246Initial program 91.7%
Taylor expanded in t around inf 75.4%
mul-1-neg75.4%
distribute-rgt-neg-out75.4%
Simplified75.4%
Taylor expanded in y around 0 50.8%
+-commutative50.8%
mul-1-neg50.8%
unsub-neg50.8%
*-commutative50.8%
Simplified50.8%
Taylor expanded in t around inf 51.1%
associate-*r*51.1%
*-commutative51.1%
*-commutative51.1%
neg-mul-151.1%
distribute-rgt-neg-in51.1%
*-commutative51.1%
distribute-rgt-neg-out51.1%
Simplified51.1%
if -6.49999999999999977e246 < x < -1.49999999999999992e-199 or 1.2199999999999999e-63 < x Initial program 98.2%
Taylor expanded in b around inf 58.2%
associate-*r*58.2%
*-commutative58.2%
neg-mul-158.2%
Simplified58.2%
Taylor expanded in b around 0 33.3%
mul-1-neg33.3%
unsub-neg33.3%
*-commutative33.3%
Simplified33.3%
if -1.49999999999999992e-199 < x < 1.2199999999999999e-63Initial program 97.5%
Taylor expanded in y around 0 58.5%
sub-neg58.5%
neg-mul-158.5%
log1p-def60.9%
neg-mul-160.9%
Simplified60.9%
Taylor expanded in z around 0 60.9%
associate-*r*60.9%
associate-*r*60.9%
distribute-lft-out60.9%
neg-mul-160.9%
Simplified60.9%
Taylor expanded in a around 0 9.4%
+-commutative9.4%
mul-1-neg9.4%
unsub-neg9.4%
*-commutative9.4%
+-commutative9.4%
Simplified9.4%
Taylor expanded in z around inf 35.2%
mul-1-neg35.2%
distribute-rgt-neg-in35.2%
*-commutative35.2%
Simplified35.2%
Final simplification34.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -240000.0) (not (<= b 5.2e-22))) (* x (- 1.0 (* a b))) (* x (- 1.0 (* y t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -240000.0) || !(b <= 5.2e-22)) {
tmp = x * (1.0 - (a * 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 <= (-240000.0d0)) .or. (.not. (b <= 5.2d-22))) then
tmp = x * (1.0d0 - (a * 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 <= -240000.0) || !(b <= 5.2e-22)) {
tmp = x * (1.0 - (a * b));
} else {
tmp = x * (1.0 - (y * t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -240000.0) or not (b <= 5.2e-22): tmp = x * (1.0 - (a * b)) else: tmp = x * (1.0 - (y * t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -240000.0) || !(b <= 5.2e-22)) tmp = Float64(x * Float64(1.0 - Float64(a * 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 <= -240000.0) || ~((b <= 5.2e-22))) tmp = x * (1.0 - (a * b)); else tmp = x * (1.0 - (y * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -240000.0], N[Not[LessEqual[b, 5.2e-22]], $MachinePrecision]], N[(x * N[(1.0 - N[(a * 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 -240000 \lor \neg \left(b \leq 5.2 \cdot 10^{-22}\right):\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\end{array}
\end{array}
if b < -2.4e5 or 5.2e-22 < b Initial program 98.6%
Taylor expanded in b around inf 72.6%
associate-*r*72.6%
*-commutative72.6%
neg-mul-172.6%
Simplified72.6%
Taylor expanded in b around 0 29.6%
mul-1-neg29.6%
unsub-neg29.6%
*-commutative29.6%
Simplified29.6%
if -2.4e5 < b < 5.2e-22Initial program 96.6%
Taylor expanded in t around inf 70.8%
mul-1-neg70.8%
distribute-rgt-neg-out70.8%
Simplified70.8%
Taylor expanded in y around 0 41.2%
+-commutative41.2%
mul-1-neg41.2%
unsub-neg41.2%
*-commutative41.2%
Simplified41.2%
Final simplification34.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.6e+166) (not (<= y 1e-25))) (* x (* t (- y))) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.6e+166) || !(y <= 1e-25)) {
tmp = x * (t * -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 <= (-1.6d+166)) .or. (.not. (y <= 1d-25))) then
tmp = x * (t * -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 <= -1.6e+166) || !(y <= 1e-25)) {
tmp = x * (t * -y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.6e+166) or not (y <= 1e-25): tmp = x * (t * -y) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.6e+166) || !(y <= 1e-25)) tmp = Float64(x * Float64(t * Float64(-y))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.6e+166) || ~((y <= 1e-25))) tmp = x * (t * -y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.6e+166], N[Not[LessEqual[y, 1e-25]], $MachinePrecision]], N[(x * N[(t * (-y)), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.6 \cdot 10^{+166} \lor \neg \left(y \leq 10^{-25}\right):\\
\;\;\;\;x \cdot \left(t \cdot \left(-y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.59999999999999984e166 or 1.00000000000000004e-25 < y Initial program 97.3%
Taylor expanded in t around inf 64.5%
mul-1-neg64.5%
distribute-rgt-neg-out64.5%
Simplified64.5%
Taylor expanded in y around 0 26.9%
+-commutative26.9%
mul-1-neg26.9%
unsub-neg26.9%
*-commutative26.9%
Simplified26.9%
Taylor expanded in t around inf 27.6%
associate-*r*28.5%
*-commutative28.5%
*-commutative28.5%
neg-mul-128.5%
distribute-rgt-neg-in28.5%
*-commutative28.5%
distribute-rgt-neg-out28.5%
Simplified28.5%
if -1.59999999999999984e166 < y < 1.00000000000000004e-25Initial program 98.0%
Taylor expanded in b around inf 72.8%
associate-*r*72.8%
*-commutative72.8%
neg-mul-172.8%
Simplified72.8%
Taylor expanded in b around 0 26.5%
Final simplification27.3%
(FPCore (x y z t a b) :precision binary64 (if (<= y -3.9e+15) (* a (* x (- z))) (if (<= y 6.2e-18) x (* a (* x (- b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -3.9e+15) {
tmp = a * (x * -z);
} else if (y <= 6.2e-18) {
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 <= (-3.9d+15)) then
tmp = a * (x * -z)
else if (y <= 6.2d-18) 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 <= -3.9e+15) {
tmp = a * (x * -z);
} else if (y <= 6.2e-18) {
tmp = x;
} else {
tmp = a * (x * -b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -3.9e+15: tmp = a * (x * -z) elif y <= 6.2e-18: tmp = x else: tmp = a * (x * -b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -3.9e+15) tmp = Float64(a * Float64(x * Float64(-z))); elseif (y <= 6.2e-18) tmp = x; else tmp = Float64(a * Float64(x * Float64(-b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -3.9e+15) tmp = a * (x * -z); elseif (y <= 6.2e-18) tmp = x; else tmp = a * (x * -b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -3.9e+15], N[(a * N[(x * (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.2e-18], x, N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.9 \cdot 10^{+15}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-z\right)\right)\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{-18}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\end{array}
\end{array}
if y < -3.9e15Initial program 98.4%
Taylor expanded in y around 0 32.2%
sub-neg32.2%
neg-mul-132.2%
log1p-def29.1%
neg-mul-129.1%
Simplified29.1%
Taylor expanded in z around 0 29.1%
associate-*r*29.1%
associate-*r*29.1%
distribute-lft-out29.1%
neg-mul-129.1%
Simplified29.1%
Taylor expanded in a around 0 8.8%
+-commutative8.8%
mul-1-neg8.8%
unsub-neg8.8%
*-commutative8.8%
+-commutative8.8%
Simplified8.8%
Taylor expanded in z around inf 12.8%
mul-1-neg12.8%
distribute-rgt-neg-in12.8%
*-commutative12.8%
Simplified12.8%
if -3.9e15 < y < 6.20000000000000014e-18Initial program 97.6%
Taylor expanded in b around inf 79.4%
associate-*r*79.4%
*-commutative79.4%
neg-mul-179.4%
Simplified79.4%
Taylor expanded in b around 0 31.0%
if 6.20000000000000014e-18 < y Initial program 97.2%
Taylor expanded in b around inf 41.5%
associate-*r*41.5%
*-commutative41.5%
neg-mul-141.5%
Simplified41.5%
Taylor expanded in b around 0 16.9%
mul-1-neg16.9%
unsub-neg16.9%
*-commutative16.9%
Simplified16.9%
Taylor expanded in b around inf 27.8%
mul-1-neg27.8%
distribute-rgt-neg-in27.8%
Simplified27.8%
Final simplification25.6%
(FPCore (x y z t a b) :precision binary64 (if (<= y -3.85e-16) (* y (* x (- t))) (if (<= y 2.3e-25) x (* x (* t (- y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -3.85e-16) {
tmp = y * (x * -t);
} else if (y <= 2.3e-25) {
tmp = x;
} 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 <= (-3.85d-16)) then
tmp = y * (x * -t)
else if (y <= 2.3d-25) then
tmp = x
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 <= -3.85e-16) {
tmp = y * (x * -t);
} else if (y <= 2.3e-25) {
tmp = x;
} else {
tmp = x * (t * -y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -3.85e-16: tmp = y * (x * -t) elif y <= 2.3e-25: tmp = x else: tmp = x * (t * -y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -3.85e-16) tmp = Float64(y * Float64(x * Float64(-t))); elseif (y <= 2.3e-25) tmp = x; 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 <= -3.85e-16) tmp = y * (x * -t); elseif (y <= 2.3e-25) tmp = x; else tmp = x * (t * -y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -3.85e-16], N[(y * N[(x * (-t)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.3e-25], x, N[(x * N[(t * (-y)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.85 \cdot 10^{-16}:\\
\;\;\;\;y \cdot \left(x \cdot \left(-t\right)\right)\\
\mathbf{elif}\;y \leq 2.3 \cdot 10^{-25}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(t \cdot \left(-y\right)\right)\\
\end{array}
\end{array}
if y < -3.84999999999999994e-16Initial program 98.6%
Taylor expanded in t around inf 46.4%
mul-1-neg46.4%
distribute-rgt-neg-out46.4%
Simplified46.4%
Taylor expanded in y around 0 16.9%
+-commutative16.9%
mul-1-neg16.9%
unsub-neg16.9%
*-commutative16.9%
Simplified16.9%
Taylor expanded in t around inf 17.7%
associate-*r*17.7%
neg-mul-117.7%
*-commutative17.7%
*-commutative17.7%
Simplified17.7%
if -3.84999999999999994e-16 < y < 2.2999999999999999e-25Initial program 97.4%
Taylor expanded in b around inf 83.7%
associate-*r*83.7%
*-commutative83.7%
neg-mul-183.7%
Simplified83.7%
Taylor expanded in b around 0 33.1%
if 2.2999999999999999e-25 < y Initial program 97.3%
Taylor expanded in t around inf 67.1%
mul-1-neg67.1%
distribute-rgt-neg-out67.1%
Simplified67.1%
Taylor expanded in y around 0 25.6%
+-commutative25.6%
mul-1-neg25.6%
unsub-neg25.6%
*-commutative25.6%
Simplified25.6%
Taylor expanded in t around inf 26.7%
associate-*r*28.1%
*-commutative28.1%
*-commutative28.1%
neg-mul-128.1%
distribute-rgt-neg-in28.1%
*-commutative28.1%
distribute-rgt-neg-out28.1%
Simplified28.1%
Final simplification27.5%
(FPCore (x y z t a b) :precision binary64 (if (<= y 2.5e-19) x (* a (* x (- b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 2.5e-19) {
tmp = x;
} else {
tmp = a * (x * -b);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= 2.5d-19) then
tmp = x
else
tmp = a * (x * -b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 2.5e-19) {
tmp = x;
} else {
tmp = a * (x * -b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 2.5e-19: tmp = x else: tmp = a * (x * -b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 2.5e-19) tmp = x; else tmp = Float64(a * Float64(x * Float64(-b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= 2.5e-19) tmp = x; else tmp = a * (x * -b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 2.5e-19], x, N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.5 \cdot 10^{-19}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\end{array}
\end{array}
if y < 2.5000000000000002e-19Initial program 97.9%
Taylor expanded in b around inf 62.9%
associate-*r*62.9%
*-commutative62.9%
neg-mul-162.9%
Simplified62.9%
Taylor expanded in b around 0 21.7%
if 2.5000000000000002e-19 < y Initial program 97.2%
Taylor expanded in b around inf 41.5%
associate-*r*41.5%
*-commutative41.5%
neg-mul-141.5%
Simplified41.5%
Taylor expanded in b around 0 16.9%
mul-1-neg16.9%
unsub-neg16.9%
*-commutative16.9%
Simplified16.9%
Taylor expanded in b around inf 27.8%
mul-1-neg27.8%
distribute-rgt-neg-in27.8%
Simplified27.8%
Final simplification23.4%
(FPCore (x y z t a b) :precision binary64 (if (<= a 1.95e+80) x (* x (* y t))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= 1.95e+80) {
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.95d+80) 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.95e+80) {
tmp = x;
} else {
tmp = x * (y * t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= 1.95e+80: tmp = x else: tmp = x * (y * t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= 1.95e+80) 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.95e+80) tmp = x; else tmp = x * (y * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, 1.95e+80], x, N[(x * N[(y * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.95 \cdot 10^{+80}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot t\right)\\
\end{array}
\end{array}
if a < 1.94999999999999999e80Initial program 99.0%
Taylor expanded in b around inf 51.9%
associate-*r*51.9%
*-commutative51.9%
neg-mul-151.9%
Simplified51.9%
Taylor expanded in b around 0 19.1%
if 1.94999999999999999e80 < a Initial program 91.4%
Taylor expanded in t around inf 37.6%
mul-1-neg37.6%
distribute-rgt-neg-out37.6%
Simplified37.6%
Taylor expanded in y around 0 11.9%
+-commutative11.9%
mul-1-neg11.9%
unsub-neg11.9%
*-commutative11.9%
Simplified11.9%
Taylor expanded in t around inf 24.9%
associate-*r*24.9%
neg-mul-124.9%
*-commutative24.9%
*-commutative24.9%
Simplified24.9%
*-commutative24.9%
add-sqr-sqrt14.7%
sqrt-unprod33.6%
sqr-neg33.6%
sqrt-unprod22.1%
add-sqr-sqrt22.7%
add-sqr-sqrt7.7%
sqrt-unprod28.3%
sqr-neg28.3%
sqrt-unprod17.5%
add-sqr-sqrt24.9%
expm1-log1p-u22.0%
expm1-udef25.4%
Applied egg-rr23.7%
expm1-def18.3%
expm1-log1p20.6%
*-commutative20.6%
Simplified20.6%
Final simplification19.4%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 97.7%
Taylor expanded in b around inf 56.9%
associate-*r*56.9%
*-commutative56.9%
neg-mul-156.9%
Simplified56.9%
Taylor expanded in b around 0 16.8%
Final simplification16.8%
herbie shell --seed 2023230
(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))))))