
(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 19 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.3%
+-commutative97.3%
fma-def97.7%
sub-neg97.7%
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.3%
Final simplification97.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.8e+33) (not (<= y 1.95e+58))) (* x (exp (* y (- (log z) t)))) (* x (exp (- (* a (- b)) (* y t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.8e+33) || !(y <= 1.95e+58)) {
tmp = x * exp((y * (log(z) - t)));
} else {
tmp = x * exp(((a * -b) - (y * t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-1.8d+33)) .or. (.not. (y <= 1.95d+58))) then
tmp = x * exp((y * (log(z) - t)))
else
tmp = x * exp(((a * -b) - (y * t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.8e+33) || !(y <= 1.95e+58)) {
tmp = x * Math.exp((y * (Math.log(z) - t)));
} else {
tmp = x * Math.exp(((a * -b) - (y * t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.8e+33) or not (y <= 1.95e+58): tmp = x * math.exp((y * (math.log(z) - t))) else: tmp = x * math.exp(((a * -b) - (y * t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.8e+33) || !(y <= 1.95e+58)) tmp = Float64(x * exp(Float64(y * Float64(log(z) - t)))); else tmp = Float64(x * exp(Float64(Float64(a * Float64(-b)) - Float64(y * t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.8e+33) || ~((y <= 1.95e+58))) tmp = x * exp((y * (log(z) - t))); else tmp = x * exp(((a * -b) - (y * t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.8e+33], N[Not[LessEqual[y, 1.95e+58]], $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[(y * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{+33} \lor \neg \left(y \leq 1.95 \cdot 10^{+58}\right):\\
\;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right) - y \cdot t}\\
\end{array}
\end{array}
if y < -1.8000000000000001e33 or 1.95000000000000005e58 < y Initial program 99.2%
Taylor expanded in y around inf 95.1%
if -1.8000000000000001e33 < y < 1.95000000000000005e58Initial program 95.7%
Taylor expanded in z around 0 94.9%
Taylor expanded in t around inf 93.5%
neg-mul-193.5%
Simplified93.5%
Final simplification94.3%
(FPCore (x y z t a b) :precision binary64 (* x (exp (- (* y (- (log z) t)) (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(((y * (log(z) - t)) - (a * 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 * 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 * b)));
}
def code(x, y, z, t, a, b): return x * math.exp(((y * (math.log(z) - t)) - (a * b)))
function code(x, y, z, t, a, b) return Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) - Float64(a * b)))) end
function tmp = code(x, y, z, t, a, b) tmp = x * exp(((y * (log(z) - t)) - (a * 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 * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{y \cdot \left(\log z - t\right) - a \cdot b}
\end{array}
Initial program 97.3%
Taylor expanded in z around 0 96.9%
Final simplification96.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (exp (* a (- b)))))
(t_2 (* x (exp (* y (- t)))))
(t_3 (* x (pow z y))))
(if (<= t -2.6e+48)
t_2
(if (<= t -1.6e-13)
t_1
(if (<= t -2.25e-166)
t_3
(if (<= t -3.5e-242) t_1 (if (<= t 2.5e+37) t_3 t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * exp((a * -b));
double t_2 = x * exp((y * -t));
double t_3 = x * pow(z, y);
double tmp;
if (t <= -2.6e+48) {
tmp = t_2;
} else if (t <= -1.6e-13) {
tmp = t_1;
} else if (t <= -2.25e-166) {
tmp = t_3;
} else if (t <= -3.5e-242) {
tmp = t_1;
} else if (t <= 2.5e+37) {
tmp = t_3;
} else {
tmp = t_2;
}
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) :: t_3
real(8) :: tmp
t_1 = x * exp((a * -b))
t_2 = x * exp((y * -t))
t_3 = x * (z ** y)
if (t <= (-2.6d+48)) then
tmp = t_2
else if (t <= (-1.6d-13)) then
tmp = t_1
else if (t <= (-2.25d-166)) then
tmp = t_3
else if (t <= (-3.5d-242)) then
tmp = t_1
else if (t <= 2.5d+37) then
tmp = t_3
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * Math.exp((a * -b));
double t_2 = x * Math.exp((y * -t));
double t_3 = x * Math.pow(z, y);
double tmp;
if (t <= -2.6e+48) {
tmp = t_2;
} else if (t <= -1.6e-13) {
tmp = t_1;
} else if (t <= -2.25e-166) {
tmp = t_3;
} else if (t <= -3.5e-242) {
tmp = t_1;
} else if (t <= 2.5e+37) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * math.exp((a * -b)) t_2 = x * math.exp((y * -t)) t_3 = x * math.pow(z, y) tmp = 0 if t <= -2.6e+48: tmp = t_2 elif t <= -1.6e-13: tmp = t_1 elif t <= -2.25e-166: tmp = t_3 elif t <= -3.5e-242: tmp = t_1 elif t <= 2.5e+37: tmp = t_3 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * exp(Float64(a * Float64(-b)))) t_2 = Float64(x * exp(Float64(y * Float64(-t)))) t_3 = Float64(x * (z ^ y)) tmp = 0.0 if (t <= -2.6e+48) tmp = t_2; elseif (t <= -1.6e-13) tmp = t_1; elseif (t <= -2.25e-166) tmp = t_3; elseif (t <= -3.5e-242) tmp = t_1; elseif (t <= 2.5e+37) tmp = t_3; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * exp((a * -b)); t_2 = x * exp((y * -t)); t_3 = x * (z ^ y); tmp = 0.0; if (t <= -2.6e+48) tmp = t_2; elseif (t <= -1.6e-13) tmp = t_1; elseif (t <= -2.25e-166) tmp = t_3; elseif (t <= -3.5e-242) tmp = t_1; elseif (t <= 2.5e+37) tmp = t_3; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Exp[N[(a * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[Exp[N[(y * (-t)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.6e+48], t$95$2, If[LessEqual[t, -1.6e-13], t$95$1, If[LessEqual[t, -2.25e-166], t$95$3, If[LessEqual[t, -3.5e-242], t$95$1, If[LessEqual[t, 2.5e+37], t$95$3, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot e^{a \cdot \left(-b\right)}\\
t_2 := x \cdot e^{y \cdot \left(-t\right)}\\
t_3 := x \cdot {z}^{y}\\
\mathbf{if}\;t \leq -2.6 \cdot 10^{+48}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -1.6 \cdot 10^{-13}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -2.25 \cdot 10^{-166}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq -3.5 \cdot 10^{-242}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2.5 \cdot 10^{+37}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -2.59999999999999995e48 or 2.49999999999999994e37 < t Initial program 97.5%
Taylor expanded in t around inf 87.9%
mul-1-neg87.9%
distribute-rgt-neg-out87.9%
Simplified87.9%
if -2.59999999999999995e48 < t < -1.6e-13 or -2.2499999999999999e-166 < t < -3.4999999999999999e-242Initial program 99.9%
Taylor expanded in b around inf 88.9%
associate-*r*88.9%
neg-mul-188.9%
*-commutative88.9%
Simplified88.9%
if -1.6e-13 < t < -2.2499999999999999e-166 or -3.4999999999999999e-242 < t < 2.49999999999999994e37Initial program 96.5%
Taylor expanded in y around inf 71.3%
Taylor expanded in t around 0 71.3%
Final simplification80.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (pow z y))) (t_2 (* x (exp (* y (- t))))))
(if (<= y -9e+129)
t_2
(if (<= y -330.0)
t_1
(if (<= y 1.3e-25)
(* x (exp (* a (- (- z) b))))
(if (<= y 6.6e+194) t_2 t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * pow(z, y);
double t_2 = x * exp((y * -t));
double tmp;
if (y <= -9e+129) {
tmp = t_2;
} else if (y <= -330.0) {
tmp = t_1;
} else if (y <= 1.3e-25) {
tmp = x * exp((a * (-z - b)));
} else if (y <= 6.6e+194) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = x * (z ** y)
t_2 = x * exp((y * -t))
if (y <= (-9d+129)) then
tmp = t_2
else if (y <= (-330.0d0)) then
tmp = t_1
else if (y <= 1.3d-25) then
tmp = x * exp((a * (-z - b)))
else if (y <= 6.6d+194) then
tmp = t_2
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 t_2 = x * Math.exp((y * -t));
double tmp;
if (y <= -9e+129) {
tmp = t_2;
} else if (y <= -330.0) {
tmp = t_1;
} else if (y <= 1.3e-25) {
tmp = x * Math.exp((a * (-z - b)));
} else if (y <= 6.6e+194) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * math.pow(z, y) t_2 = x * math.exp((y * -t)) tmp = 0 if y <= -9e+129: tmp = t_2 elif y <= -330.0: tmp = t_1 elif y <= 1.3e-25: tmp = x * math.exp((a * (-z - b))) elif y <= 6.6e+194: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * (z ^ y)) t_2 = Float64(x * exp(Float64(y * Float64(-t)))) tmp = 0.0 if (y <= -9e+129) tmp = t_2; elseif (y <= -330.0) tmp = t_1; elseif (y <= 1.3e-25) tmp = Float64(x * exp(Float64(a * Float64(Float64(-z) - b)))); elseif (y <= 6.6e+194) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * (z ^ y); t_2 = x * exp((y * -t)); tmp = 0.0; if (y <= -9e+129) tmp = t_2; elseif (y <= -330.0) tmp = t_1; elseif (y <= 1.3e-25) tmp = x * exp((a * (-z - b))); elseif (y <= 6.6e+194) tmp = t_2; 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]}, Block[{t$95$2 = N[(x * N[Exp[N[(y * (-t)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -9e+129], t$95$2, If[LessEqual[y, -330.0], t$95$1, If[LessEqual[y, 1.3e-25], N[(x * N[Exp[N[(a * N[((-z) - b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.6e+194], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot {z}^{y}\\
t_2 := x \cdot e^{y \cdot \left(-t\right)}\\
\mathbf{if}\;y \leq -9 \cdot 10^{+129}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -330:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{-25}:\\
\;\;\;\;x \cdot e^{a \cdot \left(\left(-z\right) - b\right)}\\
\mathbf{elif}\;y \leq 6.6 \cdot 10^{+194}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -9.0000000000000003e129 or 1.3e-25 < y < 6.59999999999999967e194Initial program 98.8%
Taylor expanded in t around inf 78.2%
mul-1-neg78.2%
distribute-rgt-neg-out78.2%
Simplified78.2%
if -9.0000000000000003e129 < y < -330 or 6.59999999999999967e194 < y Initial program 100.0%
Taylor expanded in y around inf 93.9%
Taylor expanded in t around 0 78.8%
if -330 < y < 1.3e-25Initial program 94.7%
Taylor expanded in y around 0 79.0%
sub-neg79.0%
neg-mul-179.0%
log1p-def84.2%
neg-mul-184.2%
Simplified84.2%
Taylor expanded in z around 0 84.2%
+-commutative84.2%
associate-*r*84.2%
associate-*r*84.2%
distribute-lft-out84.2%
neg-mul-184.2%
Simplified84.2%
Final simplification81.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -6.6) (not (<= y 9.8e+58))) (* 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 <= -6.6) || !(y <= 9.8e+58)) {
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 <= (-6.6d0)) .or. (.not. (y <= 9.8d+58))) 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 <= -6.6) || !(y <= 9.8e+58)) {
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 <= -6.6) or not (y <= 9.8e+58): 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 <= -6.6) || !(y <= 9.8e+58)) 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 <= -6.6) || ~((y <= 9.8e+58))) 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, -6.6], N[Not[LessEqual[y, 9.8e+58]], $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 -6.6 \lor \neg \left(y \leq 9.8 \cdot 10^{+58}\right):\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\
\end{array}
\end{array}
if y < -6.5999999999999996 or 9.80000000000000037e58 < y Initial program 99.2%
Taylor expanded in y around inf 93.9%
Taylor expanded in t around 0 71.0%
if -6.5999999999999996 < y < 9.80000000000000037e58Initial program 95.4%
Taylor expanded in b around inf 74.0%
associate-*r*74.0%
neg-mul-174.0%
*-commutative74.0%
Simplified74.0%
Final simplification72.5%
(FPCore (x y z t a b) :precision binary64 (* x (exp (- (* a (- b)) (* y t)))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(((a * -b) - (y * t)));
}
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(((a * -b) - (y * t)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x * Math.exp(((a * -b) - (y * t)));
}
def code(x, y, z, t, a, b): return x * math.exp(((a * -b) - (y * t)))
function code(x, y, z, t, a, b) return Float64(x * exp(Float64(Float64(a * Float64(-b)) - Float64(y * t)))) end
function tmp = code(x, y, z, t, a, b) tmp = x * exp(((a * -b) - (y * t))); end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(N[(a * (-b)), $MachinePrecision] - N[(y * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{a \cdot \left(-b\right) - y \cdot t}
\end{array}
Initial program 97.3%
Taylor expanded in z around 0 96.9%
Taylor expanded in t around inf 84.4%
neg-mul-184.4%
Simplified84.4%
Final simplification84.4%
(FPCore (x y z t a b) :precision binary64 (if (<= t -3e-13) (* x (* y (- t))) (* x (pow z y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -3e-13) {
tmp = x * (y * -t);
} else {
tmp = x * pow(z, y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-3d-13)) then
tmp = x * (y * -t)
else
tmp = x * (z ** y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -3e-13) {
tmp = x * (y * -t);
} else {
tmp = x * Math.pow(z, y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -3e-13: tmp = x * (y * -t) else: tmp = x * math.pow(z, y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -3e-13) tmp = Float64(x * Float64(y * Float64(-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 <= -3e-13) tmp = x * (y * -t); else tmp = x * (z ^ y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -3e-13], N[(x * N[(y * (-t)), $MachinePrecision]), $MachinePrecision], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3 \cdot 10^{-13}:\\
\;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot {z}^{y}\\
\end{array}
\end{array}
if t < -2.99999999999999984e-13Initial program 97.1%
Taylor expanded in t around inf 80.9%
mul-1-neg80.9%
distribute-rgt-neg-out80.9%
Simplified80.9%
Taylor expanded in y around 0 26.7%
Taylor expanded in y around inf 28.6%
neg-mul-128.6%
associate-*r*31.5%
distribute-rgt-neg-in31.5%
Simplified31.5%
if -2.99999999999999984e-13 < t Initial program 97.4%
Taylor expanded in y around inf 75.3%
Taylor expanded in t around 0 67.3%
Final simplification57.5%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1.15e+50) (* x (* y (- t))) (if (<= y 4.6e-14) (* x (- 1.0 (* a b))) (* (- y) (* x t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.15e+50) {
tmp = x * (y * -t);
} else if (y <= 4.6e-14) {
tmp = x * (1.0 - (a * b));
} else {
tmp = -y * (x * t);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-1.15d+50)) then
tmp = x * (y * -t)
else if (y <= 4.6d-14) then
tmp = x * (1.0d0 - (a * b))
else
tmp = -y * (x * t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.15e+50) {
tmp = x * (y * -t);
} else if (y <= 4.6e-14) {
tmp = x * (1.0 - (a * b));
} else {
tmp = -y * (x * t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.15e+50: tmp = x * (y * -t) elif y <= 4.6e-14: tmp = x * (1.0 - (a * b)) else: tmp = -y * (x * t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.15e+50) tmp = Float64(x * Float64(y * Float64(-t))); elseif (y <= 4.6e-14) tmp = Float64(x * Float64(1.0 - Float64(a * b))); else tmp = Float64(Float64(-y) * Float64(x * t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.15e+50) tmp = x * (y * -t); elseif (y <= 4.6e-14) tmp = x * (1.0 - (a * b)); else tmp = -y * (x * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.15e+50], N[(x * N[(y * (-t)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.6e-14], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-y) * N[(x * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.15 \cdot 10^{+50}:\\
\;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\
\mathbf{elif}\;y \leq 4.6 \cdot 10^{-14}:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(-y\right) \cdot \left(x \cdot t\right)\\
\end{array}
\end{array}
if y < -1.14999999999999998e50Initial program 98.2%
Taylor expanded in t around inf 72.2%
mul-1-neg72.2%
distribute-rgt-neg-out72.2%
Simplified72.2%
Taylor expanded in y around 0 20.5%
Taylor expanded in y around inf 23.6%
neg-mul-123.6%
associate-*r*27.1%
distribute-rgt-neg-in27.1%
Simplified27.1%
if -1.14999999999999998e50 < y < 4.59999999999999996e-14Initial program 95.4%
Taylor expanded in b around inf 71.9%
associate-*r*71.9%
neg-mul-171.9%
*-commutative71.9%
Simplified71.9%
Taylor expanded in b around 0 37.3%
+-commutative37.3%
mul-1-neg37.3%
unsub-neg37.3%
Simplified37.3%
Taylor expanded in x around 0 37.8%
if 4.59999999999999996e-14 < y Initial program 100.0%
Taylor expanded in t around inf 69.1%
mul-1-neg69.1%
distribute-rgt-neg-out69.1%
Simplified69.1%
Taylor expanded in y around 0 23.6%
Taylor expanded in y around inf 39.1%
neg-mul-139.1%
distribute-lft-neg-in39.1%
Simplified39.1%
Final simplification35.9%
(FPCore (x y z t a b) :precision binary64 (if (<= y -7.4e-171) (* x (- 1.0 (* y t))) (if (<= y 4.8e-14) (* x (- 1.0 (* a b))) (* (- y) (* x t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -7.4e-171) {
tmp = x * (1.0 - (y * t));
} else if (y <= 4.8e-14) {
tmp = x * (1.0 - (a * b));
} else {
tmp = -y * (x * t);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-7.4d-171)) then
tmp = x * (1.0d0 - (y * t))
else if (y <= 4.8d-14) then
tmp = x * (1.0d0 - (a * b))
else
tmp = -y * (x * t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -7.4e-171) {
tmp = x * (1.0 - (y * t));
} else if (y <= 4.8e-14) {
tmp = x * (1.0 - (a * b));
} else {
tmp = -y * (x * t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -7.4e-171: tmp = x * (1.0 - (y * t)) elif y <= 4.8e-14: tmp = x * (1.0 - (a * b)) else: tmp = -y * (x * t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -7.4e-171) tmp = Float64(x * Float64(1.0 - Float64(y * t))); elseif (y <= 4.8e-14) tmp = Float64(x * Float64(1.0 - Float64(a * b))); else tmp = Float64(Float64(-y) * Float64(x * t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -7.4e-171) tmp = x * (1.0 - (y * t)); elseif (y <= 4.8e-14) tmp = x * (1.0 - (a * b)); else tmp = -y * (x * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -7.4e-171], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.8e-14], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-y) * N[(x * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.4 \cdot 10^{-171}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{-14}:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(-y\right) \cdot \left(x \cdot t\right)\\
\end{array}
\end{array}
if y < -7.40000000000000024e-171Initial program 97.2%
Taylor expanded in t around inf 65.3%
mul-1-neg65.3%
distribute-rgt-neg-out65.3%
Simplified65.3%
Taylor expanded in y around 0 19.2%
+-commutative19.2%
mul-1-neg19.2%
unsub-neg19.2%
associate-*r*22.7%
*-commutative22.7%
associate-*l*23.6%
Simplified23.6%
Taylor expanded in x around 0 22.7%
if -7.40000000000000024e-171 < y < 4.8e-14Initial program 94.9%
Taylor expanded in b around inf 84.8%
associate-*r*84.8%
neg-mul-184.8%
*-commutative84.8%
Simplified84.8%
Taylor expanded in b around 0 51.1%
+-commutative51.1%
mul-1-neg51.1%
unsub-neg51.1%
Simplified51.1%
Taylor expanded in x around 0 52.1%
if 4.8e-14 < y Initial program 100.0%
Taylor expanded in t around inf 69.1%
mul-1-neg69.1%
distribute-rgt-neg-out69.1%
Simplified69.1%
Taylor expanded in y around 0 23.6%
Taylor expanded in y around inf 39.1%
neg-mul-139.1%
distribute-lft-neg-in39.1%
Simplified39.1%
Final simplification36.2%
(FPCore (x y z t a b) :precision binary64 (if (<= y -2.8e-173) (- x (* t (* x y))) (if (<= y 4.8e-14) (* x (- 1.0 (* a b))) (* (- y) (* x t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.8e-173) {
tmp = x - (t * (x * y));
} else if (y <= 4.8e-14) {
tmp = x * (1.0 - (a * b));
} else {
tmp = -y * (x * t);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-2.8d-173)) then
tmp = x - (t * (x * y))
else if (y <= 4.8d-14) then
tmp = x * (1.0d0 - (a * b))
else
tmp = -y * (x * t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.8e-173) {
tmp = x - (t * (x * y));
} else if (y <= 4.8e-14) {
tmp = x * (1.0 - (a * b));
} else {
tmp = -y * (x * t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2.8e-173: tmp = x - (t * (x * y)) elif y <= 4.8e-14: tmp = x * (1.0 - (a * b)) else: tmp = -y * (x * t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2.8e-173) tmp = Float64(x - Float64(t * Float64(x * y))); elseif (y <= 4.8e-14) tmp = Float64(x * Float64(1.0 - Float64(a * b))); else tmp = Float64(Float64(-y) * Float64(x * t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -2.8e-173) tmp = x - (t * (x * y)); elseif (y <= 4.8e-14) tmp = x * (1.0 - (a * b)); else tmp = -y * (x * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.8e-173], N[(x - N[(t * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.8e-14], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-y) * N[(x * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.8 \cdot 10^{-173}:\\
\;\;\;\;x - t \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{-14}:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(-y\right) \cdot \left(x \cdot t\right)\\
\end{array}
\end{array}
if y < -2.7999999999999999e-173Initial program 97.2%
Taylor expanded in t around inf 65.3%
mul-1-neg65.3%
distribute-rgt-neg-out65.3%
Simplified65.3%
Taylor expanded in y around 0 19.2%
+-commutative19.2%
mul-1-neg19.2%
unsub-neg19.2%
associate-*r*22.7%
*-commutative22.7%
associate-*l*23.6%
Simplified23.6%
if -2.7999999999999999e-173 < y < 4.8e-14Initial program 94.9%
Taylor expanded in b around inf 84.8%
associate-*r*84.8%
neg-mul-184.8%
*-commutative84.8%
Simplified84.8%
Taylor expanded in b around 0 51.1%
+-commutative51.1%
mul-1-neg51.1%
unsub-neg51.1%
Simplified51.1%
Taylor expanded in x around 0 52.1%
if 4.8e-14 < y Initial program 100.0%
Taylor expanded in t around inf 69.1%
mul-1-neg69.1%
distribute-rgt-neg-out69.1%
Simplified69.1%
Taylor expanded in y around 0 23.6%
Taylor expanded in y around inf 39.1%
neg-mul-139.1%
distribute-lft-neg-in39.1%
Simplified39.1%
Final simplification36.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -3.2e-94) (not (<= y 2.45e-63))) (* (* a b) (- x)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.2e-94) || !(y <= 2.45e-63)) {
tmp = (a * b) * -x;
} 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 <= (-3.2d-94)) .or. (.not. (y <= 2.45d-63))) then
tmp = (a * b) * -x
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 <= -3.2e-94) || !(y <= 2.45e-63)) {
tmp = (a * b) * -x;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -3.2e-94) or not (y <= 2.45e-63): tmp = (a * b) * -x else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -3.2e-94) || !(y <= 2.45e-63)) tmp = Float64(Float64(a * b) * Float64(-x)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -3.2e-94) || ~((y <= 2.45e-63))) tmp = (a * b) * -x; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -3.2e-94], N[Not[LessEqual[y, 2.45e-63]], $MachinePrecision]], N[(N[(a * b), $MachinePrecision] * (-x)), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{-94} \lor \neg \left(y \leq 2.45 \cdot 10^{-63}\right):\\
\;\;\;\;\left(a \cdot b\right) \cdot \left(-x\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -3.19999999999999997e-94 or 2.45000000000000008e-63 < y Initial program 98.3%
Taylor expanded in b around inf 38.1%
associate-*r*38.1%
neg-mul-138.1%
*-commutative38.1%
Simplified38.1%
Taylor expanded in b around 0 10.7%
+-commutative10.7%
mul-1-neg10.7%
unsub-neg10.7%
Simplified10.7%
Taylor expanded in a around inf 15.6%
neg-mul-115.6%
distribute-rgt-neg-in15.6%
*-commutative15.6%
distribute-rgt-neg-in15.6%
Simplified15.6%
associate-*r*18.8%
distribute-rgt-neg-out18.8%
add-sqr-sqrt10.7%
sqrt-unprod20.8%
sqr-neg20.8%
sqrt-unprod4.5%
add-sqr-sqrt11.8%
associate-*r*12.4%
*-commutative12.4%
associate-*l*11.8%
add-sqr-sqrt3.0%
sqrt-unprod21.1%
sqr-neg21.1%
sqrt-unprod10.6%
add-sqr-sqrt17.1%
Applied egg-rr17.1%
if -3.19999999999999997e-94 < y < 2.45000000000000008e-63Initial program 95.1%
Taylor expanded in b around inf 86.1%
associate-*r*86.1%
neg-mul-186.1%
*-commutative86.1%
Simplified86.1%
Taylor expanded in b around 0 41.8%
Final simplification24.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -6.2e+34) (not (<= y 4.6e-14))) (* (- y) (* x t)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -6.2e+34) || !(y <= 4.6e-14)) {
tmp = -y * (x * 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 ((y <= (-6.2d+34)) .or. (.not. (y <= 4.6d-14))) then
tmp = -y * (x * 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 ((y <= -6.2e+34) || !(y <= 4.6e-14)) {
tmp = -y * (x * t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -6.2e+34) or not (y <= 4.6e-14): tmp = -y * (x * t) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -6.2e+34) || !(y <= 4.6e-14)) tmp = Float64(Float64(-y) * Float64(x * t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -6.2e+34) || ~((y <= 4.6e-14))) tmp = -y * (x * t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -6.2e+34], N[Not[LessEqual[y, 4.6e-14]], $MachinePrecision]], N[((-y) * N[(x * t), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.2 \cdot 10^{+34} \lor \neg \left(y \leq 4.6 \cdot 10^{-14}\right):\\
\;\;\;\;\left(-y\right) \cdot \left(x \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -6.19999999999999955e34 or 4.59999999999999996e-14 < y Initial program 99.2%
Taylor expanded in t around inf 69.4%
mul-1-neg69.4%
distribute-rgt-neg-out69.4%
Simplified69.4%
Taylor expanded in y around 0 22.2%
Taylor expanded in y around inf 31.9%
neg-mul-131.9%
distribute-lft-neg-in31.9%
Simplified31.9%
if -6.19999999999999955e34 < y < 4.59999999999999996e-14Initial program 95.2%
Taylor expanded in b around inf 73.2%
associate-*r*73.2%
neg-mul-173.2%
*-commutative73.2%
Simplified73.2%
Taylor expanded in b around 0 30.4%
Final simplification31.2%
(FPCore (x y z t a b) :precision binary64 (if (<= y -6.2e+34) (* x (* y (- t))) (if (<= y 4.5e-14) x (* (- y) (* x t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -6.2e+34) {
tmp = x * (y * -t);
} else if (y <= 4.5e-14) {
tmp = x;
} else {
tmp = -y * (x * t);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-6.2d+34)) then
tmp = x * (y * -t)
else if (y <= 4.5d-14) then
tmp = x
else
tmp = -y * (x * t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -6.2e+34) {
tmp = x * (y * -t);
} else if (y <= 4.5e-14) {
tmp = x;
} else {
tmp = -y * (x * t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -6.2e+34: tmp = x * (y * -t) elif y <= 4.5e-14: tmp = x else: tmp = -y * (x * t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -6.2e+34) tmp = Float64(x * Float64(y * Float64(-t))); elseif (y <= 4.5e-14) tmp = x; else tmp = Float64(Float64(-y) * Float64(x * t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -6.2e+34) tmp = x * (y * -t); elseif (y <= 4.5e-14) tmp = x; else tmp = -y * (x * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -6.2e+34], N[(x * N[(y * (-t)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.5e-14], x, N[((-y) * N[(x * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.2 \cdot 10^{+34}:\\
\;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{-14}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\left(-y\right) \cdot \left(x \cdot t\right)\\
\end{array}
\end{array}
if y < -6.19999999999999955e34Initial program 98.4%
Taylor expanded in t around inf 69.7%
mul-1-neg69.7%
distribute-rgt-neg-out69.7%
Simplified69.7%
Taylor expanded in y around 0 20.6%
Taylor expanded in y around inf 23.4%
neg-mul-123.4%
associate-*r*26.6%
distribute-rgt-neg-in26.6%
Simplified26.6%
if -6.19999999999999955e34 < y < 4.4999999999999998e-14Initial program 95.2%
Taylor expanded in b around inf 73.2%
associate-*r*73.2%
neg-mul-173.2%
*-commutative73.2%
Simplified73.2%
Taylor expanded in b around 0 30.4%
if 4.4999999999999998e-14 < y Initial program 100.0%
Taylor expanded in t around inf 69.1%
mul-1-neg69.1%
distribute-rgt-neg-out69.1%
Simplified69.1%
Taylor expanded in y around 0 23.6%
Taylor expanded in y around inf 39.1%
neg-mul-139.1%
distribute-lft-neg-in39.1%
Simplified39.1%
Final simplification32.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -60000.0) (not (<= y 3.8e+28))) (* a (* x b)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -60000.0) || !(y <= 3.8e+28)) {
tmp = a * (x * b);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-60000.0d0)) .or. (.not. (y <= 3.8d+28))) then
tmp = a * (x * b)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -60000.0) || !(y <= 3.8e+28)) {
tmp = a * (x * b);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -60000.0) or not (y <= 3.8e+28): tmp = a * (x * b) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -60000.0) || !(y <= 3.8e+28)) tmp = Float64(a * Float64(x * b)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -60000.0) || ~((y <= 3.8e+28))) tmp = a * (x * b); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -60000.0], N[Not[LessEqual[y, 3.8e+28]], $MachinePrecision]], N[(a * N[(x * b), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -60000 \lor \neg \left(y \leq 3.8 \cdot 10^{+28}\right):\\
\;\;\;\;a \cdot \left(x \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -6e4 or 3.7999999999999999e28 < y Initial program 99.2%
Taylor expanded in b around inf 33.2%
associate-*r*33.2%
neg-mul-133.2%
*-commutative33.2%
Simplified33.2%
Taylor expanded in b around 0 9.2%
+-commutative9.2%
mul-1-neg9.2%
unsub-neg9.2%
Simplified9.2%
Taylor expanded in a around inf 16.0%
neg-mul-116.0%
distribute-rgt-neg-in16.0%
*-commutative16.0%
distribute-rgt-neg-in16.0%
Simplified16.0%
expm1-log1p-u12.5%
expm1-udef28.1%
*-commutative28.1%
associate-*l*28.8%
add-sqr-sqrt12.6%
sqrt-unprod29.3%
sqr-neg29.3%
sqrt-unprod14.7%
add-sqr-sqrt25.1%
Applied egg-rr25.1%
expm1-def11.6%
expm1-log1p13.4%
associate-*r*14.1%
*-commutative14.1%
Simplified14.1%
if -6e4 < y < 3.7999999999999999e28Initial program 95.2%
Taylor expanded in b around inf 74.7%
associate-*r*74.7%
neg-mul-174.7%
*-commutative74.7%
Simplified74.7%
Taylor expanded in b around 0 30.2%
Final simplification21.9%
(FPCore (x y z t a b) :precision binary64 (if (<= y -56000.0) (* a (* x b)) (if (<= y 5.2e+108) x (* x (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -56000.0) {
tmp = a * (x * b);
} else if (y <= 5.2e+108) {
tmp = x;
} else {
tmp = x * (a * b);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-56000.0d0)) then
tmp = a * (x * b)
else if (y <= 5.2d+108) then
tmp = x
else
tmp = x * (a * b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -56000.0) {
tmp = a * (x * b);
} else if (y <= 5.2e+108) {
tmp = x;
} else {
tmp = x * (a * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -56000.0: tmp = a * (x * b) elif y <= 5.2e+108: tmp = x else: tmp = x * (a * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -56000.0) tmp = Float64(a * Float64(x * b)); elseif (y <= 5.2e+108) tmp = x; else tmp = Float64(x * Float64(a * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -56000.0) tmp = a * (x * b); elseif (y <= 5.2e+108) tmp = x; else tmp = x * (a * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -56000.0], N[(a * N[(x * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.2e+108], x, N[(x * N[(a * b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -56000:\\
\;\;\;\;a \cdot \left(x \cdot b\right)\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{+108}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(a \cdot b\right)\\
\end{array}
\end{array}
if y < -56000Initial program 98.6%
Taylor expanded in b around inf 32.3%
associate-*r*32.3%
neg-mul-132.3%
*-commutative32.3%
Simplified32.3%
Taylor expanded in b around 0 7.2%
+-commutative7.2%
mul-1-neg7.2%
unsub-neg7.2%
Simplified7.2%
Taylor expanded in a around inf 9.2%
neg-mul-19.2%
distribute-rgt-neg-in9.2%
*-commutative9.2%
distribute-rgt-neg-in9.2%
Simplified9.2%
expm1-log1p-u7.2%
expm1-udef15.4%
*-commutative15.4%
associate-*l*15.4%
add-sqr-sqrt4.9%
sqrt-unprod19.4%
sqr-neg19.4%
sqrt-unprod9.2%
add-sqr-sqrt12.7%
Applied egg-rr12.7%
expm1-def7.3%
expm1-log1p9.0%
associate-*r*10.3%
*-commutative10.3%
Simplified10.3%
if -56000 < y < 5.2000000000000005e108Initial program 95.8%
Taylor expanded in b around inf 70.7%
associate-*r*70.7%
neg-mul-170.7%
*-commutative70.7%
Simplified70.7%
Taylor expanded in b around 0 27.2%
if 5.2000000000000005e108 < y Initial program 100.0%
Taylor expanded in b around inf 32.2%
associate-*r*32.2%
neg-mul-132.2%
*-commutative32.2%
Simplified32.2%
Taylor expanded in b around 0 10.1%
+-commutative10.1%
mul-1-neg10.1%
unsub-neg10.1%
Simplified10.1%
Taylor expanded in a around inf 26.6%
neg-mul-126.6%
distribute-rgt-neg-in26.6%
*-commutative26.6%
distribute-rgt-neg-in26.6%
Simplified26.6%
expm1-log1p-u22.0%
expm1-udef47.8%
*-commutative47.8%
associate-*l*51.7%
add-sqr-sqrt25.9%
sqrt-unprod47.3%
sqr-neg47.3%
sqrt-unprod23.6%
add-sqr-sqrt45.4%
Applied egg-rr45.4%
expm1-def21.4%
expm1-log1p23.6%
*-commutative23.6%
Simplified23.6%
Final simplification21.9%
(FPCore (x y z t a b) :precision binary64 (if (<= y -60000.0) (* a (* x b)) (if (<= y 3.6e+93) x (* y (* x t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -60000.0) {
tmp = a * (x * b);
} else if (y <= 3.6e+93) {
tmp = x;
} else {
tmp = y * (x * t);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-60000.0d0)) then
tmp = a * (x * b)
else if (y <= 3.6d+93) then
tmp = x
else
tmp = y * (x * t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -60000.0) {
tmp = a * (x * b);
} else if (y <= 3.6e+93) {
tmp = x;
} else {
tmp = y * (x * t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -60000.0: tmp = a * (x * b) elif y <= 3.6e+93: tmp = x else: tmp = y * (x * t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -60000.0) tmp = Float64(a * Float64(x * b)); elseif (y <= 3.6e+93) tmp = x; else tmp = Float64(y * Float64(x * t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -60000.0) tmp = a * (x * b); elseif (y <= 3.6e+93) tmp = x; else tmp = y * (x * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -60000.0], N[(a * N[(x * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.6e+93], x, N[(y * N[(x * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -60000:\\
\;\;\;\;a \cdot \left(x \cdot b\right)\\
\mathbf{elif}\;y \leq 3.6 \cdot 10^{+93}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(x \cdot t\right)\\
\end{array}
\end{array}
if y < -6e4Initial program 98.6%
Taylor expanded in b around inf 32.3%
associate-*r*32.3%
neg-mul-132.3%
*-commutative32.3%
Simplified32.3%
Taylor expanded in b around 0 7.2%
+-commutative7.2%
mul-1-neg7.2%
unsub-neg7.2%
Simplified7.2%
Taylor expanded in a around inf 9.2%
neg-mul-19.2%
distribute-rgt-neg-in9.2%
*-commutative9.2%
distribute-rgt-neg-in9.2%
Simplified9.2%
expm1-log1p-u7.2%
expm1-udef15.4%
*-commutative15.4%
associate-*l*15.4%
add-sqr-sqrt4.9%
sqrt-unprod19.4%
sqr-neg19.4%
sqrt-unprod9.2%
add-sqr-sqrt12.7%
Applied egg-rr12.7%
expm1-def7.3%
expm1-log1p9.0%
associate-*r*10.3%
*-commutative10.3%
Simplified10.3%
if -6e4 < y < 3.5999999999999999e93Initial program 95.7%
Taylor expanded in b around inf 71.4%
associate-*r*71.4%
neg-mul-171.4%
*-commutative71.4%
Simplified71.4%
Taylor expanded in b around 0 27.7%
if 3.5999999999999999e93 < y Initial program 100.0%
Taylor expanded in t around inf 67.2%
mul-1-neg67.2%
distribute-rgt-neg-out67.2%
Simplified67.2%
Taylor expanded in y around 0 22.8%
expm1-log1p-u10.4%
expm1-udef34.8%
+-commutative34.8%
add-sqr-sqrt34.7%
sqrt-unprod38.9%
mul-1-neg38.9%
mul-1-neg38.9%
sqr-neg38.9%
sqrt-unprod24.4%
add-sqr-sqrt26.4%
Applied egg-rr26.4%
expm1-def2.1%
expm1-log1p2.6%
Simplified2.6%
Taylor expanded in y around inf 25.1%
*-commutative25.1%
Simplified25.1%
Final simplification22.4%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 97.3%
Taylor expanded in b around inf 53.1%
associate-*r*53.1%
neg-mul-153.1%
*-commutative53.1%
Simplified53.1%
Taylor expanded in b around 0 16.6%
Final simplification16.6%
herbie shell --seed 2023187
(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))))))