
(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 y (- (log z) t) (* a (- (log1p (- z)) b))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(fma(y, (log(z) - t), (a * (log1p(-z) - b))));
}
function code(x, y, z, t, a, b) return Float64(x * exp(fma(y, Float64(log(z) - t), Float64(a * Float64(log1p(Float64(-z)) - b))))) end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] + N[(a * N[(N[Log[1 + (-z)], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{\mathsf{fma}\left(y, \log z - t, a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)\right)}
\end{array}
Initial program 96.1%
fma-define96.5%
sub-neg96.5%
log1p-define100.0%
Simplified100.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 96.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -3.3e-48) (not (<= y 1.22e-85))) (* x (pow (/ z (exp t)) y)) (* x (exp (* a (- (+ z b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.3e-48) || !(y <= 1.22e-85)) {
tmp = x * pow((z / exp(t)), y);
} 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 <= (-3.3d-48)) .or. (.not. (y <= 1.22d-85))) then
tmp = x * ((z / exp(t)) ** y)
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 <= -3.3e-48) || !(y <= 1.22e-85)) {
tmp = x * Math.pow((z / Math.exp(t)), y);
} else {
tmp = x * Math.exp((a * -(z + b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -3.3e-48) or not (y <= 1.22e-85): tmp = x * math.pow((z / math.exp(t)), y) else: tmp = x * math.exp((a * -(z + b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -3.3e-48) || !(y <= 1.22e-85)) tmp = Float64(x * (Float64(z / exp(t)) ^ y)); 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 <= -3.3e-48) || ~((y <= 1.22e-85))) tmp = x * ((z / exp(t)) ^ y); else tmp = x * exp((a * -(z + b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -3.3e-48], N[Not[LessEqual[y, 1.22e-85]], $MachinePrecision]], N[(x * N[Power[N[(z / N[Exp[t], $MachinePrecision]), $MachinePrecision], y], $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 -3.3 \cdot 10^{-48} \lor \neg \left(y \leq 1.22 \cdot 10^{-85}\right):\\
\;\;\;\;x \cdot {\left(\frac{z}{e^{t}}\right)}^{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-\left(z + b\right)\right)}\\
\end{array}
\end{array}
if y < -3.3e-48 or 1.22000000000000006e-85 < y Initial program 99.3%
Taylor expanded in a around 0 90.4%
*-commutative90.4%
exp-prod90.4%
exp-diff90.4%
rem-exp-log90.4%
Simplified90.4%
if -3.3e-48 < y < 1.22000000000000006e-85Initial program 91.9%
Taylor expanded in y around 0 81.0%
sub-neg81.0%
log1p-define89.1%
Simplified89.1%
Taylor expanded in z around 0 89.1%
+-commutative89.1%
associate-*r*89.1%
associate-*r*89.1%
distribute-lft-out89.1%
mul-1-neg89.1%
Simplified89.1%
Final simplification89.9%
(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 96.1%
Taylor expanded in z around 0 95.0%
Final simplification95.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (pow z y))) (t_2 (* x (exp (* y (- t))))))
(if (<= t -2e+18)
t_2
(if (<= t -2.26e-175)
t_1
(if (<= t 1.05e-197)
(* x (exp (* a (- b))))
(if (<= t 5e-58) t_1 t_2))))))
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 (t <= -2e+18) {
tmp = t_2;
} else if (t <= -2.26e-175) {
tmp = t_1;
} else if (t <= 1.05e-197) {
tmp = x * exp((a * -b));
} else if (t <= 5e-58) {
tmp = t_1;
} 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) :: tmp
t_1 = x * (z ** y)
t_2 = x * exp((y * -t))
if (t <= (-2d+18)) then
tmp = t_2
else if (t <= (-2.26d-175)) then
tmp = t_1
else if (t <= 1.05d-197) then
tmp = x * exp((a * -b))
else if (t <= 5d-58) then
tmp = t_1
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.pow(z, y);
double t_2 = x * Math.exp((y * -t));
double tmp;
if (t <= -2e+18) {
tmp = t_2;
} else if (t <= -2.26e-175) {
tmp = t_1;
} else if (t <= 1.05e-197) {
tmp = x * Math.exp((a * -b));
} else if (t <= 5e-58) {
tmp = t_1;
} else {
tmp = t_2;
}
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 t <= -2e+18: tmp = t_2 elif t <= -2.26e-175: tmp = t_1 elif t <= 1.05e-197: tmp = x * math.exp((a * -b)) elif t <= 5e-58: tmp = t_1 else: tmp = t_2 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 (t <= -2e+18) tmp = t_2; elseif (t <= -2.26e-175) tmp = t_1; elseif (t <= 1.05e-197) tmp = Float64(x * exp(Float64(a * Float64(-b)))); elseif (t <= 5e-58) tmp = t_1; else tmp = t_2; 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 (t <= -2e+18) tmp = t_2; elseif (t <= -2.26e-175) tmp = t_1; elseif (t <= 1.05e-197) tmp = x * exp((a * -b)); elseif (t <= 5e-58) tmp = t_1; else tmp = t_2; 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[t, -2e+18], t$95$2, If[LessEqual[t, -2.26e-175], t$95$1, If[LessEqual[t, 1.05e-197], N[(x * N[Exp[N[(a * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5e-58], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot {z}^{y}\\
t_2 := x \cdot e^{y \cdot \left(-t\right)}\\
\mathbf{if}\;t \leq -2 \cdot 10^{+18}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -2.26 \cdot 10^{-175}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{-197}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\
\mathbf{elif}\;t \leq 5 \cdot 10^{-58}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -2e18 or 4.99999999999999977e-58 < t Initial program 98.5%
Taylor expanded in t around inf 78.9%
mul-1-neg78.9%
distribute-lft-neg-out78.9%
*-commutative78.9%
Simplified78.9%
if -2e18 < t < -2.2599999999999999e-175 or 1.05e-197 < t < 4.99999999999999977e-58Initial program 92.4%
Taylor expanded in a around 0 71.2%
*-commutative71.2%
exp-prod70.0%
exp-diff70.0%
rem-exp-log70.1%
Simplified70.1%
Taylor expanded in t around 0 71.3%
if -2.2599999999999999e-175 < t < 1.05e-197Initial program 95.4%
Taylor expanded in b around inf 73.7%
mul-1-neg73.7%
distribute-rgt-neg-out73.7%
Simplified73.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (pow z y))))
(if (<= y -1.65e-17)
t_1
(if (<= y 1.32e-8)
(* x (exp (* a (- b))))
(if (or (<= y 3.8e+135) (not (<= y 4.05e+158)))
t_1
(* (* y t) (- x)))))))
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 <= -1.65e-17) {
tmp = t_1;
} else if (y <= 1.32e-8) {
tmp = x * exp((a * -b));
} else if ((y <= 3.8e+135) || !(y <= 4.05e+158)) {
tmp = t_1;
} else {
tmp = (y * t) * -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) :: t_1
real(8) :: tmp
t_1 = x * (z ** y)
if (y <= (-1.65d-17)) then
tmp = t_1
else if (y <= 1.32d-8) then
tmp = x * exp((a * -b))
else if ((y <= 3.8d+135) .or. (.not. (y <= 4.05d+158))) then
tmp = t_1
else
tmp = (y * t) * -x
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 <= -1.65e-17) {
tmp = t_1;
} else if (y <= 1.32e-8) {
tmp = x * Math.exp((a * -b));
} else if ((y <= 3.8e+135) || !(y <= 4.05e+158)) {
tmp = t_1;
} else {
tmp = (y * t) * -x;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * math.pow(z, y) tmp = 0 if y <= -1.65e-17: tmp = t_1 elif y <= 1.32e-8: tmp = x * math.exp((a * -b)) elif (y <= 3.8e+135) or not (y <= 4.05e+158): tmp = t_1 else: tmp = (y * t) * -x return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * (z ^ y)) tmp = 0.0 if (y <= -1.65e-17) tmp = t_1; elseif (y <= 1.32e-8) tmp = Float64(x * exp(Float64(a * Float64(-b)))); elseif ((y <= 3.8e+135) || !(y <= 4.05e+158)) tmp = t_1; else tmp = Float64(Float64(y * t) * Float64(-x)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * (z ^ y); tmp = 0.0; if (y <= -1.65e-17) tmp = t_1; elseif (y <= 1.32e-8) tmp = x * exp((a * -b)); elseif ((y <= 3.8e+135) || ~((y <= 4.05e+158))) tmp = t_1; else tmp = (y * t) * -x; 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, -1.65e-17], t$95$1, If[LessEqual[y, 1.32e-8], N[(x * N[Exp[N[(a * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 3.8e+135], N[Not[LessEqual[y, 4.05e+158]], $MachinePrecision]], t$95$1, N[(N[(y * t), $MachinePrecision] * (-x)), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot {z}^{y}\\
\mathbf{if}\;y \leq -1.65 \cdot 10^{-17}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.32 \cdot 10^{-8}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{+135} \lor \neg \left(y \leq 4.05 \cdot 10^{+158}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot t\right) \cdot \left(-x\right)\\
\end{array}
\end{array}
if y < -1.65e-17 or 1.32000000000000007e-8 < y < 3.8000000000000001e135 or 4.0499999999999999e158 < y Initial program 99.1%
Taylor expanded in a around 0 90.3%
*-commutative90.3%
exp-prod90.3%
exp-diff90.3%
rem-exp-log90.3%
Simplified90.3%
Taylor expanded in t around 0 67.7%
if -1.65e-17 < y < 1.32000000000000007e-8Initial program 92.9%
Taylor expanded in b around inf 77.2%
mul-1-neg77.2%
distribute-rgt-neg-out77.2%
Simplified77.2%
if 3.8000000000000001e135 < y < 4.0499999999999999e158Initial program 100.0%
Taylor expanded in t around inf 85.9%
mul-1-neg85.9%
distribute-lft-neg-out85.9%
*-commutative85.9%
Simplified85.9%
Taylor expanded in y around 0 32.9%
mul-1-neg32.9%
unsub-neg32.9%
*-commutative32.9%
*-commutative32.9%
associate-*l*32.9%
*-commutative32.9%
Simplified32.9%
Taylor expanded in y around inf 32.9%
mul-1-neg32.9%
*-commutative32.9%
associate-*r*73.3%
*-commutative73.3%
distribute-rgt-neg-in73.3%
Simplified73.3%
Final simplification72.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (pow z y))))
(if (<= y -8.6e+19)
t_1
(if (<= y 3.1e-43)
(* x (exp (* a (- (+ z b)))))
(if (<= y 6.8e+109) t_1 (* x (exp (* y (- t)))))))))
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 <= -8.6e+19) {
tmp = t_1;
} else if (y <= 3.1e-43) {
tmp = x * exp((a * -(z + b)));
} else if (y <= 6.8e+109) {
tmp = t_1;
} else {
tmp = x * exp((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) :: t_1
real(8) :: tmp
t_1 = x * (z ** y)
if (y <= (-8.6d+19)) then
tmp = t_1
else if (y <= 3.1d-43) then
tmp = x * exp((a * -(z + b)))
else if (y <= 6.8d+109) then
tmp = t_1
else
tmp = x * exp((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 t_1 = x * Math.pow(z, y);
double tmp;
if (y <= -8.6e+19) {
tmp = t_1;
} else if (y <= 3.1e-43) {
tmp = x * Math.exp((a * -(z + b)));
} else if (y <= 6.8e+109) {
tmp = t_1;
} else {
tmp = x * Math.exp((y * -t));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * math.pow(z, y) tmp = 0 if y <= -8.6e+19: tmp = t_1 elif y <= 3.1e-43: tmp = x * math.exp((a * -(z + b))) elif y <= 6.8e+109: tmp = t_1 else: tmp = x * math.exp((y * -t)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * (z ^ y)) tmp = 0.0 if (y <= -8.6e+19) tmp = t_1; elseif (y <= 3.1e-43) tmp = Float64(x * exp(Float64(a * Float64(-Float64(z + b))))); elseif (y <= 6.8e+109) tmp = t_1; else tmp = Float64(x * exp(Float64(y * Float64(-t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * (z ^ y); tmp = 0.0; if (y <= -8.6e+19) tmp = t_1; elseif (y <= 3.1e-43) tmp = x * exp((a * -(z + b))); elseif (y <= 6.8e+109) tmp = t_1; else tmp = x * exp((y * -t)); 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, -8.6e+19], t$95$1, If[LessEqual[y, 3.1e-43], N[(x * N[Exp[N[(a * (-N[(z + b), $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.8e+109], t$95$1, N[(x * N[Exp[N[(y * (-t)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot {z}^{y}\\
\mathbf{if}\;y \leq -8.6 \cdot 10^{+19}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 3.1 \cdot 10^{-43}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-\left(z + b\right)\right)}\\
\mathbf{elif}\;y \leq 6.8 \cdot 10^{+109}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{y \cdot \left(-t\right)}\\
\end{array}
\end{array}
if y < -8.6e19 or 3.0999999999999999e-43 < y < 6.80000000000000013e109Initial program 100.0%
Taylor expanded in a around 0 92.2%
*-commutative92.2%
exp-prod92.2%
exp-diff92.2%
rem-exp-log92.2%
Simplified92.2%
Taylor expanded in t around 0 67.9%
if -8.6e19 < y < 3.0999999999999999e-43Initial program 93.0%
Taylor expanded in y around 0 78.5%
sub-neg78.5%
log1p-define86.1%
Simplified86.1%
Taylor expanded in z around 0 86.1%
+-commutative86.1%
associate-*r*86.1%
associate-*r*86.1%
distribute-lft-out86.1%
mul-1-neg86.1%
Simplified86.1%
if 6.80000000000000013e109 < y Initial program 98.0%
Taylor expanded in t around inf 72.2%
mul-1-neg72.2%
distribute-lft-neg-out72.2%
*-commutative72.2%
Simplified72.2%
Final simplification77.8%
(FPCore (x y z t a b) :precision binary64 (if (<= t -2.15e+33) (* y (* x (- (/ 1.0 y) t))) (* x (pow z y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.15e+33) {
tmp = y * (x * ((1.0 / y) - t));
} else {
tmp = x * pow(z, y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-2.15d+33)) then
tmp = y * (x * ((1.0d0 / y) - t))
else
tmp = x * (z ** y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.15e+33) {
tmp = y * (x * ((1.0 / y) - t));
} else {
tmp = x * Math.pow(z, y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -2.15e+33: tmp = y * (x * ((1.0 / y) - t)) else: tmp = x * math.pow(z, y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -2.15e+33) tmp = Float64(y * Float64(x * Float64(Float64(1.0 / y) - t))); else tmp = Float64(x * (z ^ y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -2.15e+33) tmp = y * (x * ((1.0 / y) - t)); else tmp = x * (z ^ y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -2.15e+33], N[(y * N[(x * N[(N[(1.0 / y), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.15 \cdot 10^{+33}:\\
\;\;\;\;y \cdot \left(x \cdot \left(\frac{1}{y} - t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot {z}^{y}\\
\end{array}
\end{array}
if t < -2.15000000000000014e33Initial program 100.0%
Taylor expanded in t around inf 80.5%
mul-1-neg80.5%
distribute-lft-neg-out80.5%
*-commutative80.5%
Simplified80.5%
Taylor expanded in y around 0 24.7%
mul-1-neg24.7%
unsub-neg24.7%
*-commutative24.7%
*-commutative24.7%
associate-*l*27.7%
*-commutative27.7%
Simplified27.7%
Taylor expanded in y around inf 29.3%
Taylor expanded in x around 0 31.0%
if -2.15000000000000014e33 < t Initial program 95.0%
Taylor expanded in a around 0 71.0%
*-commutative71.0%
exp-prod67.2%
exp-diff67.2%
rem-exp-log67.3%
Simplified67.3%
Taylor expanded in t around 0 64.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2.7e+181) (not (<= y 1.55e-68))) (* (* y t) (- x)) (- x (* a (* x z)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.7e+181) || !(y <= 1.55e-68)) {
tmp = (y * t) * -x;
} else {
tmp = x - (a * (x * z));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-2.7d+181)) .or. (.not. (y <= 1.55d-68))) then
tmp = (y * t) * -x
else
tmp = x - (a * (x * z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.7e+181) || !(y <= 1.55e-68)) {
tmp = (y * t) * -x;
} else {
tmp = x - (a * (x * z));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2.7e+181) or not (y <= 1.55e-68): tmp = (y * t) * -x else: tmp = x - (a * (x * z)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -2.7e+181) || !(y <= 1.55e-68)) tmp = Float64(Float64(y * t) * Float64(-x)); else tmp = Float64(x - Float64(a * Float64(x * z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -2.7e+181) || ~((y <= 1.55e-68))) tmp = (y * t) * -x; else tmp = x - (a * (x * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2.7e+181], N[Not[LessEqual[y, 1.55e-68]], $MachinePrecision]], N[(N[(y * t), $MachinePrecision] * (-x)), $MachinePrecision], N[(x - N[(a * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.7 \cdot 10^{+181} \lor \neg \left(y \leq 1.55 \cdot 10^{-68}\right):\\
\;\;\;\;\left(y \cdot t\right) \cdot \left(-x\right)\\
\mathbf{else}:\\
\;\;\;\;x - a \cdot \left(x \cdot z\right)\\
\end{array}
\end{array}
if y < -2.70000000000000007e181 or 1.55e-68 < y Initial program 99.0%
Taylor expanded in t around inf 66.1%
mul-1-neg66.1%
distribute-lft-neg-out66.1%
*-commutative66.1%
Simplified66.1%
Taylor expanded in y around 0 22.0%
mul-1-neg22.0%
unsub-neg22.0%
*-commutative22.0%
*-commutative22.0%
associate-*l*20.2%
*-commutative20.2%
Simplified20.2%
Taylor expanded in y around inf 23.3%
mul-1-neg23.3%
*-commutative23.3%
associate-*r*27.2%
*-commutative27.2%
distribute-rgt-neg-in27.2%
Simplified27.2%
if -2.70000000000000007e181 < y < 1.55e-68Initial program 94.4%
Taylor expanded in y around 0 70.2%
sub-neg70.2%
log1p-define77.0%
Simplified77.0%
Taylor expanded in b around 0 31.4%
Taylor expanded in z around 0 32.4%
mul-1-neg32.4%
unsub-neg32.4%
*-commutative32.4%
Simplified32.4%
Final simplification30.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2.7e+181) (not (<= y 1.55e-68))) (* (* y t) (- x)) (* x (- 1.0 (* z a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.7e+181) || !(y <= 1.55e-68)) {
tmp = (y * t) * -x;
} else {
tmp = x * (1.0 - (z * a));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-2.7d+181)) .or. (.not. (y <= 1.55d-68))) then
tmp = (y * t) * -x
else
tmp = x * (1.0d0 - (z * a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.7e+181) || !(y <= 1.55e-68)) {
tmp = (y * t) * -x;
} else {
tmp = x * (1.0 - (z * a));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2.7e+181) or not (y <= 1.55e-68): tmp = (y * t) * -x else: tmp = x * (1.0 - (z * a)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -2.7e+181) || !(y <= 1.55e-68)) tmp = Float64(Float64(y * t) * Float64(-x)); else tmp = Float64(x * Float64(1.0 - Float64(z * a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -2.7e+181) || ~((y <= 1.55e-68))) tmp = (y * t) * -x; else tmp = x * (1.0 - (z * a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2.7e+181], N[Not[LessEqual[y, 1.55e-68]], $MachinePrecision]], N[(N[(y * t), $MachinePrecision] * (-x)), $MachinePrecision], N[(x * N[(1.0 - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.7 \cdot 10^{+181} \lor \neg \left(y \leq 1.55 \cdot 10^{-68}\right):\\
\;\;\;\;\left(y \cdot t\right) \cdot \left(-x\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - z \cdot a\right)\\
\end{array}
\end{array}
if y < -2.70000000000000007e181 or 1.55e-68 < y Initial program 99.0%
Taylor expanded in t around inf 66.1%
mul-1-neg66.1%
distribute-lft-neg-out66.1%
*-commutative66.1%
Simplified66.1%
Taylor expanded in y around 0 22.0%
mul-1-neg22.0%
unsub-neg22.0%
*-commutative22.0%
*-commutative22.0%
associate-*l*20.2%
*-commutative20.2%
Simplified20.2%
Taylor expanded in y around inf 23.3%
mul-1-neg23.3%
*-commutative23.3%
associate-*r*27.2%
*-commutative27.2%
distribute-rgt-neg-in27.2%
Simplified27.2%
if -2.70000000000000007e181 < y < 1.55e-68Initial program 94.4%
Taylor expanded in y around 0 70.2%
sub-neg70.2%
log1p-define77.0%
Simplified77.0%
Taylor expanded in b around 0 31.4%
Taylor expanded in z around 0 32.3%
mul-1-neg32.3%
unsub-neg32.3%
Simplified32.3%
Final simplification30.3%
(FPCore (x y z t a b) :precision binary64 (if (<= y -2.3e+200) (- x (* t (* x y))) (if (<= y 1.55e-68) (- x (* b (* x a))) (* (* y t) (- x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.3e+200) {
tmp = x - (t * (x * y));
} else if (y <= 1.55e-68) {
tmp = x - (b * (x * a));
} else {
tmp = (y * t) * -x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-2.3d+200)) then
tmp = x - (t * (x * y))
else if (y <= 1.55d-68) then
tmp = x - (b * (x * a))
else
tmp = (y * t) * -x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.3e+200) {
tmp = x - (t * (x * y));
} else if (y <= 1.55e-68) {
tmp = x - (b * (x * a));
} else {
tmp = (y * t) * -x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2.3e+200: tmp = x - (t * (x * y)) elif y <= 1.55e-68: tmp = x - (b * (x * a)) else: tmp = (y * t) * -x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2.3e+200) tmp = Float64(x - Float64(t * Float64(x * y))); elseif (y <= 1.55e-68) tmp = Float64(x - Float64(b * Float64(x * a))); else tmp = Float64(Float64(y * t) * Float64(-x)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -2.3e+200) tmp = x - (t * (x * y)); elseif (y <= 1.55e-68) tmp = x - (b * (x * a)); else tmp = (y * t) * -x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.3e+200], N[(x - N[(t * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.55e-68], N[(x - N[(b * N[(x * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * t), $MachinePrecision] * (-x)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.3 \cdot 10^{+200}:\\
\;\;\;\;x - t \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{-68}:\\
\;\;\;\;x - b \cdot \left(x \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot t\right) \cdot \left(-x\right)\\
\end{array}
\end{array}
if y < -2.30000000000000003e200Initial program 100.0%
Taylor expanded in t around inf 74.1%
mul-1-neg74.1%
distribute-lft-neg-out74.1%
*-commutative74.1%
Simplified74.1%
Taylor expanded in y around 0 43.3%
mul-1-neg43.3%
unsub-neg43.3%
*-commutative43.3%
*-commutative43.3%
associate-*l*38.5%
*-commutative38.5%
Simplified38.5%
Taylor expanded in y around 0 43.3%
*-commutative43.3%
Simplified43.3%
if -2.30000000000000003e200 < y < 1.55e-68Initial program 94.6%
Taylor expanded in b around inf 68.3%
mul-1-neg68.3%
distribute-rgt-neg-out68.3%
Simplified68.3%
Taylor expanded in a around 0 37.4%
mul-1-neg37.4%
unsub-neg37.4%
associate-*r*39.7%
*-commutative39.7%
associate-*l*38.9%
Simplified38.9%
if 1.55e-68 < y Initial program 98.6%
Taylor expanded in t around inf 63.9%
mul-1-neg63.9%
distribute-lft-neg-out63.9%
*-commutative63.9%
Simplified63.9%
Taylor expanded in y around 0 18.2%
mul-1-neg18.2%
unsub-neg18.2%
*-commutative18.2%
*-commutative18.2%
associate-*l*17.0%
*-commutative17.0%
Simplified17.0%
Taylor expanded in y around inf 20.0%
mul-1-neg20.0%
*-commutative20.0%
associate-*r*25.1%
*-commutative25.1%
distribute-rgt-neg-in25.1%
Simplified25.1%
Final simplification35.3%
(FPCore (x y z t a b) :precision binary64 (if (<= y -9e+198) (* t (* y (- x))) (if (<= y 1.55e-68) (- x (* b (* x a))) (* (* y t) (- x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -9e+198) {
tmp = t * (y * -x);
} else if (y <= 1.55e-68) {
tmp = x - (b * (x * a));
} else {
tmp = (y * t) * -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 <= (-9d+198)) then
tmp = t * (y * -x)
else if (y <= 1.55d-68) then
tmp = x - (b * (x * a))
else
tmp = (y * t) * -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 <= -9e+198) {
tmp = t * (y * -x);
} else if (y <= 1.55e-68) {
tmp = x - (b * (x * a));
} else {
tmp = (y * t) * -x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -9e+198: tmp = t * (y * -x) elif y <= 1.55e-68: tmp = x - (b * (x * a)) else: tmp = (y * t) * -x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -9e+198) tmp = Float64(t * Float64(y * Float64(-x))); elseif (y <= 1.55e-68) tmp = Float64(x - Float64(b * Float64(x * a))); else tmp = Float64(Float64(y * t) * Float64(-x)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -9e+198) tmp = t * (y * -x); elseif (y <= 1.55e-68) tmp = x - (b * (x * a)); else tmp = (y * t) * -x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -9e+198], N[(t * N[(y * (-x)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.55e-68], N[(x - N[(b * N[(x * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * t), $MachinePrecision] * (-x)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9 \cdot 10^{+198}:\\
\;\;\;\;t \cdot \left(y \cdot \left(-x\right)\right)\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{-68}:\\
\;\;\;\;x - b \cdot \left(x \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot t\right) \cdot \left(-x\right)\\
\end{array}
\end{array}
if y < -9.00000000000000003e198Initial program 100.0%
Taylor expanded in t around inf 74.1%
mul-1-neg74.1%
distribute-lft-neg-out74.1%
*-commutative74.1%
Simplified74.1%
Taylor expanded in y around 0 43.3%
mul-1-neg43.3%
unsub-neg43.3%
*-commutative43.3%
*-commutative43.3%
associate-*l*38.5%
*-commutative38.5%
Simplified38.5%
Taylor expanded in y around inf 43.2%
mul-1-neg43.2%
*-commutative43.2%
associate-*r*38.3%
*-commutative38.3%
distribute-rgt-neg-in38.3%
Simplified38.3%
Taylor expanded in y around 0 43.2%
associate-*r*43.2%
neg-mul-143.2%
*-commutative43.2%
Simplified43.2%
if -9.00000000000000003e198 < y < 1.55e-68Initial program 94.6%
Taylor expanded in b around inf 68.3%
mul-1-neg68.3%
distribute-rgt-neg-out68.3%
Simplified68.3%
Taylor expanded in a around 0 37.4%
mul-1-neg37.4%
unsub-neg37.4%
associate-*r*39.7%
*-commutative39.7%
associate-*l*38.9%
Simplified38.9%
if 1.55e-68 < y Initial program 98.6%
Taylor expanded in t around inf 63.9%
mul-1-neg63.9%
distribute-lft-neg-out63.9%
*-commutative63.9%
Simplified63.9%
Taylor expanded in y around 0 18.2%
mul-1-neg18.2%
unsub-neg18.2%
*-commutative18.2%
*-commutative18.2%
associate-*l*17.0%
*-commutative17.0%
Simplified17.0%
Taylor expanded in y around inf 20.0%
mul-1-neg20.0%
*-commutative20.0%
associate-*r*25.1%
*-commutative25.1%
distribute-rgt-neg-in25.1%
Simplified25.1%
Final simplification35.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -7.7e+198) (not (<= y 4.5e-69))) (* y (* t (- x))) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -7.7e+198) || !(y <= 4.5e-69)) {
tmp = y * (t * -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 <= (-7.7d+198)) .or. (.not. (y <= 4.5d-69))) then
tmp = y * (t * -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 <= -7.7e+198) || !(y <= 4.5e-69)) {
tmp = y * (t * -x);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -7.7e+198) or not (y <= 4.5e-69): tmp = y * (t * -x) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -7.7e+198) || !(y <= 4.5e-69)) tmp = Float64(y * Float64(t * Float64(-x))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -7.7e+198) || ~((y <= 4.5e-69))) tmp = y * (t * -x); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -7.7e+198], N[Not[LessEqual[y, 4.5e-69]], $MachinePrecision]], N[(y * N[(t * (-x)), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.7 \cdot 10^{+198} \lor \neg \left(y \leq 4.5 \cdot 10^{-69}\right):\\
\;\;\;\;y \cdot \left(t \cdot \left(-x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -7.70000000000000039e198 or 4.50000000000000009e-69 < y Initial program 98.9%
Taylor expanded in t around inf 66.0%
mul-1-neg66.0%
distribute-lft-neg-out66.0%
*-commutative66.0%
Simplified66.0%
Taylor expanded in y around 0 23.3%
mul-1-neg23.3%
unsub-neg23.3%
*-commutative23.3%
*-commutative23.3%
associate-*l*21.4%
*-commutative21.4%
Simplified21.4%
Taylor expanded in y around inf 23.4%
Taylor expanded in y around inf 25.9%
associate-*r*25.9%
neg-mul-125.9%
Simplified25.9%
if -7.70000000000000039e198 < y < 4.50000000000000009e-69Initial program 94.6%
Taylor expanded in b around inf 68.3%
mul-1-neg68.3%
distribute-rgt-neg-out68.3%
Simplified68.3%
Taylor expanded in a around 0 28.5%
Final simplification27.6%
(FPCore (x y z t a b) :precision binary64 (if (<= y -7.7e+198) (* t (* y (- x))) (if (<= y 1.55e-68) x (* (* y t) (- x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -7.7e+198) {
tmp = t * (y * -x);
} else if (y <= 1.55e-68) {
tmp = x;
} else {
tmp = (y * t) * -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 <= (-7.7d+198)) then
tmp = t * (y * -x)
else if (y <= 1.55d-68) then
tmp = x
else
tmp = (y * t) * -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 <= -7.7e+198) {
tmp = t * (y * -x);
} else if (y <= 1.55e-68) {
tmp = x;
} else {
tmp = (y * t) * -x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -7.7e+198: tmp = t * (y * -x) elif y <= 1.55e-68: tmp = x else: tmp = (y * t) * -x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -7.7e+198) tmp = Float64(t * Float64(y * Float64(-x))); elseif (y <= 1.55e-68) tmp = x; else tmp = Float64(Float64(y * t) * Float64(-x)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -7.7e+198) tmp = t * (y * -x); elseif (y <= 1.55e-68) tmp = x; else tmp = (y * t) * -x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -7.7e+198], N[(t * N[(y * (-x)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.55e-68], x, N[(N[(y * t), $MachinePrecision] * (-x)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.7 \cdot 10^{+198}:\\
\;\;\;\;t \cdot \left(y \cdot \left(-x\right)\right)\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{-68}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot t\right) \cdot \left(-x\right)\\
\end{array}
\end{array}
if y < -7.70000000000000039e198Initial program 100.0%
Taylor expanded in t around inf 74.1%
mul-1-neg74.1%
distribute-lft-neg-out74.1%
*-commutative74.1%
Simplified74.1%
Taylor expanded in y around 0 43.3%
mul-1-neg43.3%
unsub-neg43.3%
*-commutative43.3%
*-commutative43.3%
associate-*l*38.5%
*-commutative38.5%
Simplified38.5%
Taylor expanded in y around inf 43.2%
mul-1-neg43.2%
*-commutative43.2%
associate-*r*38.3%
*-commutative38.3%
distribute-rgt-neg-in38.3%
Simplified38.3%
Taylor expanded in y around 0 43.2%
associate-*r*43.2%
neg-mul-143.2%
*-commutative43.2%
Simplified43.2%
if -7.70000000000000039e198 < y < 1.55e-68Initial program 94.6%
Taylor expanded in b around inf 68.3%
mul-1-neg68.3%
distribute-rgt-neg-out68.3%
Simplified68.3%
Taylor expanded in a around 0 28.5%
if 1.55e-68 < y Initial program 98.6%
Taylor expanded in t around inf 63.9%
mul-1-neg63.9%
distribute-lft-neg-out63.9%
*-commutative63.9%
Simplified63.9%
Taylor expanded in y around 0 18.2%
mul-1-neg18.2%
unsub-neg18.2%
*-commutative18.2%
*-commutative18.2%
associate-*l*17.0%
*-commutative17.0%
Simplified17.0%
Taylor expanded in y around inf 20.0%
mul-1-neg20.0%
*-commutative20.0%
associate-*r*25.1%
*-commutative25.1%
distribute-rgt-neg-in25.1%
Simplified25.1%
Final simplification28.6%
(FPCore (x y z t a b) :precision binary64 (if (<= y -7.7e+198) (* t (* y (- x))) (if (<= y 1.55e-68) x (* y (* t (- x))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -7.7e+198) {
tmp = t * (y * -x);
} else if (y <= 1.55e-68) {
tmp = x;
} else {
tmp = y * (t * -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 <= (-7.7d+198)) then
tmp = t * (y * -x)
else if (y <= 1.55d-68) then
tmp = x
else
tmp = y * (t * -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 <= -7.7e+198) {
tmp = t * (y * -x);
} else if (y <= 1.55e-68) {
tmp = x;
} else {
tmp = y * (t * -x);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -7.7e+198: tmp = t * (y * -x) elif y <= 1.55e-68: tmp = x else: tmp = y * (t * -x) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -7.7e+198) tmp = Float64(t * Float64(y * Float64(-x))); elseif (y <= 1.55e-68) tmp = x; else tmp = Float64(y * Float64(t * Float64(-x))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -7.7e+198) tmp = t * (y * -x); elseif (y <= 1.55e-68) tmp = x; else tmp = y * (t * -x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -7.7e+198], N[(t * N[(y * (-x)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.55e-68], x, N[(y * N[(t * (-x)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.7 \cdot 10^{+198}:\\
\;\;\;\;t \cdot \left(y \cdot \left(-x\right)\right)\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{-68}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(t \cdot \left(-x\right)\right)\\
\end{array}
\end{array}
if y < -7.70000000000000039e198Initial program 100.0%
Taylor expanded in t around inf 74.1%
mul-1-neg74.1%
distribute-lft-neg-out74.1%
*-commutative74.1%
Simplified74.1%
Taylor expanded in y around 0 43.3%
mul-1-neg43.3%
unsub-neg43.3%
*-commutative43.3%
*-commutative43.3%
associate-*l*38.5%
*-commutative38.5%
Simplified38.5%
Taylor expanded in y around inf 43.2%
mul-1-neg43.2%
*-commutative43.2%
associate-*r*38.3%
*-commutative38.3%
distribute-rgt-neg-in38.3%
Simplified38.3%
Taylor expanded in y around 0 43.2%
associate-*r*43.2%
neg-mul-143.2%
*-commutative43.2%
Simplified43.2%
if -7.70000000000000039e198 < y < 1.55e-68Initial program 94.6%
Taylor expanded in b around inf 68.3%
mul-1-neg68.3%
distribute-rgt-neg-out68.3%
Simplified68.3%
Taylor expanded in a around 0 28.5%
if 1.55e-68 < y Initial program 98.6%
Taylor expanded in t around inf 63.9%
mul-1-neg63.9%
distribute-lft-neg-out63.9%
*-commutative63.9%
Simplified63.9%
Taylor expanded in y around 0 18.2%
mul-1-neg18.2%
unsub-neg18.2%
*-commutative18.2%
*-commutative18.2%
associate-*l*17.0%
*-commutative17.0%
Simplified17.0%
Taylor expanded in y around inf 19.5%
Taylor expanded in y around inf 22.7%
associate-*r*22.7%
neg-mul-122.7%
Simplified22.7%
Final simplification27.9%
(FPCore (x y z t a b) :precision binary64 (if (<= x 4.95e+176) (* y (/ x y)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= 4.95e+176) {
tmp = y * (x / y);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (x <= 4.95d+176) then
tmp = y * (x / y)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= 4.95e+176) {
tmp = y * (x / y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= 4.95e+176: tmp = y * (x / y) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= 4.95e+176) tmp = Float64(y * Float64(x / y)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= 4.95e+176) tmp = y * (x / y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, 4.95e+176], N[(y * N[(x / y), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 4.95 \cdot 10^{+176}:\\
\;\;\;\;y \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < 4.95000000000000009e176Initial program 96.1%
Taylor expanded in t around inf 57.1%
mul-1-neg57.1%
distribute-lft-neg-out57.1%
*-commutative57.1%
Simplified57.1%
Taylor expanded in y around 0 25.5%
mul-1-neg25.5%
unsub-neg25.5%
*-commutative25.5%
*-commutative25.5%
associate-*l*25.1%
*-commutative25.1%
Simplified25.1%
Taylor expanded in y around inf 23.4%
Taylor expanded in y around 0 18.9%
if 4.95000000000000009e176 < x Initial program 96.8%
Taylor expanded in b around inf 55.5%
mul-1-neg55.5%
distribute-rgt-neg-out55.5%
Simplified55.5%
Taylor expanded in a around 0 22.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 96.1%
Taylor expanded in b around inf 53.6%
mul-1-neg53.6%
distribute-rgt-neg-out53.6%
Simplified53.6%
Taylor expanded in a around 0 19.7%
herbie shell --seed 2024108
(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))))))