
(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 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b))));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x * exp(((y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x * Math.exp(((y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b))));
}
def code(x, y, z, t, a, b): return x * math.exp(((y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b))))
function code(x, y, z, t, a, b) return Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))))) end
function tmp = code(x, y, z, t, a, b) tmp = x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b)))); end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}
\end{array}
(FPCore (x y z t a b) :precision binary64 (* x (exp (fma y (- (log z) t) (* a (- (log1p (- z)) b))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(fma(y, (log(z) - t), (a * (log1p(-z) - b))));
}
function code(x, y, z, t, a, b) return Float64(x * exp(fma(y, Float64(log(z) - t), Float64(a * Float64(log1p(Float64(-z)) - b))))) end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] + N[(a * N[(N[Log[1 + (-z)], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{\mathsf{fma}\left(y, \log z - t, a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)\right)}
\end{array}
Initial program 97.6%
fma-define98.4%
sub-neg98.4%
log1p-define99.5%
Simplified99.5%
Final simplification99.5%
(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.6%
Final simplification97.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -1.62e+100) (not (<= a 2.3e+70))) (* x (exp (* a (- (log1p (- z)) b)))) (* x (exp (* y (- (log z) t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.62e+100) || !(a <= 2.3e+70)) {
tmp = x * exp((a * (log1p(-z) - b)));
} else {
tmp = x * exp((y * (log(z) - t)));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.62e+100) || !(a <= 2.3e+70)) {
tmp = x * Math.exp((a * (Math.log1p(-z) - b)));
} else {
tmp = x * Math.exp((y * (Math.log(z) - t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -1.62e+100) or not (a <= 2.3e+70): tmp = x * math.exp((a * (math.log1p(-z) - b))) else: tmp = x * math.exp((y * (math.log(z) - t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -1.62e+100) || !(a <= 2.3e+70)) tmp = Float64(x * exp(Float64(a * Float64(log1p(Float64(-z)) - b)))); else tmp = Float64(x * exp(Float64(y * Float64(log(z) - t)))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1.62e+100], N[Not[LessEqual[a, 2.3e+70]], $MachinePrecision]], N[(x * N[Exp[N[(a * N[(N[Log[1 + (-z)], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.62 \cdot 10^{+100} \lor \neg \left(a \leq 2.3 \cdot 10^{+70}\right):\\
\;\;\;\;x \cdot e^{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\
\end{array}
\end{array}
if a < -1.62000000000000003e100 or 2.29999999999999994e70 < a Initial program 93.1%
Taylor expanded in y around 0 83.2%
sub-neg83.2%
log1p-define87.7%
Simplified87.7%
if -1.62000000000000003e100 < a < 2.29999999999999994e70Initial program 99.9%
Taylor expanded in y around inf 90.2%
Final simplification89.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -1.25e+110) (not (<= a 1.5e+95))) (* x (exp (* a (- b)))) (* x (exp (* y (- (log z) t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.25e+110) || !(a <= 1.5e+95)) {
tmp = x * exp((a * -b));
} else {
tmp = x * exp((y * (log(z) - t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-1.25d+110)) .or. (.not. (a <= 1.5d+95))) then
tmp = x * exp((a * -b))
else
tmp = x * exp((y * (log(z) - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.25e+110) || !(a <= 1.5e+95)) {
tmp = x * Math.exp((a * -b));
} else {
tmp = x * Math.exp((y * (Math.log(z) - t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -1.25e+110) or not (a <= 1.5e+95): tmp = x * math.exp((a * -b)) else: tmp = x * math.exp((y * (math.log(z) - t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -1.25e+110) || !(a <= 1.5e+95)) tmp = Float64(x * exp(Float64(a * Float64(-b)))); else tmp = Float64(x * exp(Float64(y * Float64(log(z) - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -1.25e+110) || ~((a <= 1.5e+95))) tmp = x * exp((a * -b)); else tmp = x * exp((y * (log(z) - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1.25e+110], N[Not[LessEqual[a, 1.5e+95]], $MachinePrecision]], N[(x * N[Exp[N[(a * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.25 \cdot 10^{+110} \lor \neg \left(a \leq 1.5 \cdot 10^{+95}\right):\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\
\end{array}
\end{array}
if a < -1.24999999999999995e110 or 1.49999999999999996e95 < a Initial program 92.8%
Taylor expanded in b around inf 81.3%
associate-*r*81.3%
mul-1-neg81.3%
Simplified81.3%
if -1.24999999999999995e110 < a < 1.49999999999999996e95Initial program 99.9%
Taylor expanded in y around inf 89.3%
Final simplification86.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (exp (* a (- b))))) (t_2 (/ x (exp (* y t)))))
(if (<= t -9e+26)
t_2
(if (<= t -5.8e-164)
t_1
(if (<= t 2.2e-35) (* x (pow z y)) (if (<= t 2.25e+101) t_1 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 tmp;
if (t <= -9e+26) {
tmp = t_2;
} else if (t <= -5.8e-164) {
tmp = t_1;
} else if (t <= 2.2e-35) {
tmp = x * pow(z, y);
} else if (t <= 2.25e+101) {
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 * exp((a * -b))
t_2 = x / exp((y * t))
if (t <= (-9d+26)) then
tmp = t_2
else if (t <= (-5.8d-164)) then
tmp = t_1
else if (t <= 2.2d-35) then
tmp = x * (z ** y)
else if (t <= 2.25d+101) 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.exp((a * -b));
double t_2 = x / Math.exp((y * t));
double tmp;
if (t <= -9e+26) {
tmp = t_2;
} else if (t <= -5.8e-164) {
tmp = t_1;
} else if (t <= 2.2e-35) {
tmp = x * Math.pow(z, y);
} else if (t <= 2.25e+101) {
tmp = t_1;
} 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)) tmp = 0 if t <= -9e+26: tmp = t_2 elif t <= -5.8e-164: tmp = t_1 elif t <= 2.2e-35: tmp = x * math.pow(z, y) elif t <= 2.25e+101: tmp = t_1 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 * t))) tmp = 0.0 if (t <= -9e+26) tmp = t_2; elseif (t <= -5.8e-164) tmp = t_1; elseif (t <= 2.2e-35) tmp = Float64(x * (z ^ y)); elseif (t <= 2.25e+101) tmp = t_1; 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)); tmp = 0.0; if (t <= -9e+26) tmp = t_2; elseif (t <= -5.8e-164) tmp = t_1; elseif (t <= 2.2e-35) tmp = x * (z ^ y); elseif (t <= 2.25e+101) 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[Exp[N[(a * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[Exp[N[(y * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9e+26], t$95$2, If[LessEqual[t, -5.8e-164], t$95$1, If[LessEqual[t, 2.2e-35], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.25e+101], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot e^{a \cdot \left(-b\right)}\\
t_2 := \frac{x}{e^{y \cdot t}}\\
\mathbf{if}\;t \leq -9 \cdot 10^{+26}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -5.8 \cdot 10^{-164}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{-35}:\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{elif}\;t \leq 2.25 \cdot 10^{+101}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -8.99999999999999957e26 or 2.2500000000000001e101 < t Initial program 96.3%
Taylor expanded in t around inf 83.3%
mul-1-neg83.3%
distribute-lft-neg-out83.3%
*-commutative83.3%
Simplified83.3%
distribute-rgt-neg-out83.3%
exp-neg83.3%
Applied egg-rr83.3%
Taylor expanded in x around 0 83.4%
if -8.99999999999999957e26 < t < -5.8e-164 or 2.19999999999999994e-35 < t < 2.2500000000000001e101Initial program 98.4%
Taylor expanded in b around inf 77.4%
associate-*r*77.4%
mul-1-neg77.4%
Simplified77.4%
if -5.8e-164 < t < 2.19999999999999994e-35Initial program 98.7%
Taylor expanded in y around inf 78.6%
Taylor expanded in t around 0 78.7%
Final simplification80.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (exp (* a (- b))))))
(if (<= t -8.6e+26)
(* x (pow E (* t (- y))))
(if (<= t -5.3e-149)
t_1
(if (<= t 2.05e-35)
(* x (pow z y))
(if (<= t 2e+101) t_1 (/ x (exp (* y t)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * exp((a * -b));
double tmp;
if (t <= -8.6e+26) {
tmp = x * pow(((double) M_E), (t * -y));
} else if (t <= -5.3e-149) {
tmp = t_1;
} else if (t <= 2.05e-35) {
tmp = x * pow(z, y);
} else if (t <= 2e+101) {
tmp = t_1;
} else {
tmp = x / exp((y * t));
}
return tmp;
}
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 tmp;
if (t <= -8.6e+26) {
tmp = x * Math.pow(Math.E, (t * -y));
} else if (t <= -5.3e-149) {
tmp = t_1;
} else if (t <= 2.05e-35) {
tmp = x * Math.pow(z, y);
} else if (t <= 2e+101) {
tmp = t_1;
} else {
tmp = x / Math.exp((y * t));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * math.exp((a * -b)) tmp = 0 if t <= -8.6e+26: tmp = x * math.pow(math.e, (t * -y)) elif t <= -5.3e-149: tmp = t_1 elif t <= 2.05e-35: tmp = x * math.pow(z, y) elif t <= 2e+101: tmp = t_1 else: tmp = x / math.exp((y * t)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * exp(Float64(a * Float64(-b)))) tmp = 0.0 if (t <= -8.6e+26) tmp = Float64(x * (exp(1) ^ Float64(t * Float64(-y)))); elseif (t <= -5.3e-149) tmp = t_1; elseif (t <= 2.05e-35) tmp = Float64(x * (z ^ y)); elseif (t <= 2e+101) tmp = t_1; else tmp = Float64(x / exp(Float64(y * t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * exp((a * -b)); tmp = 0.0; if (t <= -8.6e+26) tmp = x * (2.71828182845904523536 ^ (t * -y)); elseif (t <= -5.3e-149) tmp = t_1; elseif (t <= 2.05e-35) tmp = x * (z ^ y); elseif (t <= 2e+101) 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[Exp[N[(a * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.6e+26], N[(x * N[Power[E, N[(t * (-y)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5.3e-149], t$95$1, If[LessEqual[t, 2.05e-35], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2e+101], t$95$1, N[(x / N[Exp[N[(y * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot e^{a \cdot \left(-b\right)}\\
\mathbf{if}\;t \leq -8.6 \cdot 10^{+26}:\\
\;\;\;\;x \cdot {e}^{\left(t \cdot \left(-y\right)\right)}\\
\mathbf{elif}\;t \leq -5.3 \cdot 10^{-149}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.05 \cdot 10^{-35}:\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{elif}\;t \leq 2 \cdot 10^{+101}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{e^{y \cdot t}}\\
\end{array}
\end{array}
if t < -8.5999999999999996e26Initial program 96.7%
Taylor expanded in t around inf 81.6%
mul-1-neg81.6%
distribute-lft-neg-out81.6%
*-commutative81.6%
Simplified81.6%
*-un-lft-identity81.6%
exp-prod81.7%
exp-1-e81.7%
Applied egg-rr81.7%
if -8.5999999999999996e26 < t < -5.30000000000000013e-149 or 2.05000000000000013e-35 < t < 2e101Initial program 98.4%
Taylor expanded in b around inf 77.4%
associate-*r*77.4%
mul-1-neg77.4%
Simplified77.4%
if -5.30000000000000013e-149 < t < 2.05000000000000013e-35Initial program 98.7%
Taylor expanded in y around inf 78.6%
Taylor expanded in t around 0 78.7%
if 2e101 < t Initial program 95.8%
Taylor expanded in t around inf 85.6%
mul-1-neg85.6%
distribute-lft-neg-out85.6%
*-commutative85.6%
Simplified85.6%
distribute-rgt-neg-out85.6%
exp-neg85.6%
Applied egg-rr85.6%
Taylor expanded in x around 0 85.7%
Final simplification80.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -2e-11) (not (<= t 5e-33))) (/ x (exp (* y t))) (* x (pow z y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -2e-11) || !(t <= 5e-33)) {
tmp = x / exp((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 <= (-2d-11)) .or. (.not. (t <= 5d-33))) then
tmp = x / exp((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 <= -2e-11) || !(t <= 5e-33)) {
tmp = x / Math.exp((y * t));
} else {
tmp = x * Math.pow(z, y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -2e-11) or not (t <= 5e-33): tmp = x / math.exp((y * t)) else: tmp = x * math.pow(z, y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -2e-11) || !(t <= 5e-33)) tmp = Float64(x / exp(Float64(y * t))); else tmp = Float64(x * (z ^ y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -2e-11) || ~((t <= 5e-33))) tmp = x / exp((y * t)); else tmp = x * (z ^ y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -2e-11], N[Not[LessEqual[t, 5e-33]], $MachinePrecision]], N[(x / N[Exp[N[(y * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{-11} \lor \neg \left(t \leq 5 \cdot 10^{-33}\right):\\
\;\;\;\;\frac{x}{e^{y \cdot t}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot {z}^{y}\\
\end{array}
\end{array}
if t < -1.99999999999999988e-11 or 5.00000000000000028e-33 < t Initial program 96.7%
Taylor expanded in t around inf 76.1%
mul-1-neg76.1%
distribute-lft-neg-out76.1%
*-commutative76.1%
Simplified76.1%
distribute-rgt-neg-out76.1%
exp-neg76.1%
Applied egg-rr76.1%
Taylor expanded in x around 0 76.1%
if -1.99999999999999988e-11 < t < 5.00000000000000028e-33Initial program 98.9%
Taylor expanded in y around inf 74.2%
Taylor expanded in t around 0 74.3%
Final simplification75.4%
(FPCore (x y z t a b) :precision binary64 (if (<= t -1.66e+233) (* t (/ (- x (* x (* y t))) t)) (if (<= t -4.8e+47) (* x (/ 1.0 (+ 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 <= -1.66e+233) {
tmp = t * ((x - (x * (y * t))) / t);
} else if (t <= -4.8e+47) {
tmp = x * (1.0 / (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 <= (-1.66d+233)) then
tmp = t * ((x - (x * (y * t))) / t)
else if (t <= (-4.8d+47)) then
tmp = x * (1.0d0 / (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 <= -1.66e+233) {
tmp = t * ((x - (x * (y * t))) / t);
} else if (t <= -4.8e+47) {
tmp = x * (1.0 / (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 <= -1.66e+233: tmp = t * ((x - (x * (y * t))) / t) elif t <= -4.8e+47: tmp = x * (1.0 / (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 <= -1.66e+233) tmp = Float64(t * Float64(Float64(x - Float64(x * Float64(y * t))) / t)); elseif (t <= -4.8e+47) tmp = Float64(x * Float64(1.0 / Float64(1.0 + Float64(y * t)))); else tmp = Float64(x * (z ^ y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -1.66e+233) tmp = t * ((x - (x * (y * t))) / t); elseif (t <= -4.8e+47) tmp = x * (1.0 / (1.0 + (y * t))); else tmp = x * (z ^ y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.66e+233], N[(t * N[(N[(x - N[(x * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.8e+47], N[(x * N[(1.0 / N[(1.0 + N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.66 \cdot 10^{+233}:\\
\;\;\;\;t \cdot \frac{x - x \cdot \left(y \cdot t\right)}{t}\\
\mathbf{elif}\;t \leq -4.8 \cdot 10^{+47}:\\
\;\;\;\;x \cdot \frac{1}{1 + y \cdot t}\\
\mathbf{else}:\\
\;\;\;\;x \cdot {z}^{y}\\
\end{array}
\end{array}
if t < -1.66e233Initial program 99.4%
Taylor expanded in t around inf 78.5%
mul-1-neg78.5%
distribute-lft-neg-out78.5%
*-commutative78.5%
Simplified78.5%
Taylor expanded in y around 0 24.5%
mul-1-neg24.5%
unsub-neg24.5%
associate-*r*31.2%
Simplified31.2%
Taylor expanded in t around inf 38.0%
*-commutative38.0%
Simplified38.0%
Taylor expanded in t around 0 38.0%
associate-*r*44.8%
associate-*r*44.8%
*-commutative44.8%
mul-1-neg44.8%
distribute-rgt-neg-out44.8%
associate-*r*44.9%
*-commutative44.9%
Simplified44.9%
if -1.66e233 < t < -4.80000000000000037e47Initial program 95.2%
Taylor expanded in t around inf 86.1%
mul-1-neg86.1%
distribute-lft-neg-out86.1%
*-commutative86.1%
Simplified86.1%
distribute-rgt-neg-out86.1%
exp-neg86.1%
Applied egg-rr86.1%
Taylor expanded in y around 0 44.6%
*-commutative44.6%
Simplified44.6%
if -4.80000000000000037e47 < t Initial program 98.0%
Taylor expanded in y around inf 72.4%
Taylor expanded in t around 0 64.4%
Final simplification60.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (/ x t))))
(if (<= y -6.2e-56)
t_1
(if (<= y -3.2e-116)
(* y (/ x y))
(if (<= y 7.2e+154) t_1 (* x (* t (- y))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * (x / t);
double tmp;
if (y <= -6.2e-56) {
tmp = t_1;
} else if (y <= -3.2e-116) {
tmp = y * (x / y);
} else if (y <= 7.2e+154) {
tmp = t_1;
} else {
tmp = x * (t * -y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = t * (x / t)
if (y <= (-6.2d-56)) then
tmp = t_1
else if (y <= (-3.2d-116)) then
tmp = y * (x / y)
else if (y <= 7.2d+154) then
tmp = t_1
else
tmp = x * (t * -y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * (x / t);
double tmp;
if (y <= -6.2e-56) {
tmp = t_1;
} else if (y <= -3.2e-116) {
tmp = y * (x / y);
} else if (y <= 7.2e+154) {
tmp = t_1;
} else {
tmp = x * (t * -y);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t * (x / t) tmp = 0 if y <= -6.2e-56: tmp = t_1 elif y <= -3.2e-116: tmp = y * (x / y) elif y <= 7.2e+154: tmp = t_1 else: tmp = x * (t * -y) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t * Float64(x / t)) tmp = 0.0 if (y <= -6.2e-56) tmp = t_1; elseif (y <= -3.2e-116) tmp = Float64(y * Float64(x / y)); elseif (y <= 7.2e+154) tmp = t_1; else tmp = Float64(x * Float64(t * Float64(-y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t * (x / t); tmp = 0.0; if (y <= -6.2e-56) tmp = t_1; elseif (y <= -3.2e-116) tmp = y * (x / y); elseif (y <= 7.2e+154) tmp = t_1; else tmp = x * (t * -y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(x / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.2e-56], t$95$1, If[LessEqual[y, -3.2e-116], N[(y * N[(x / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.2e+154], t$95$1, N[(x * N[(t * (-y)), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{x}{t}\\
\mathbf{if}\;y \leq -6.2 \cdot 10^{-56}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -3.2 \cdot 10^{-116}:\\
\;\;\;\;y \cdot \frac{x}{y}\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{+154}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(t \cdot \left(-y\right)\right)\\
\end{array}
\end{array}
if y < -6.19999999999999975e-56 or -3.20000000000000009e-116 < y < 7.2000000000000001e154Initial program 97.6%
Taylor expanded in t around inf 58.4%
mul-1-neg58.4%
distribute-lft-neg-out58.4%
*-commutative58.4%
Simplified58.4%
Taylor expanded in y around 0 28.9%
mul-1-neg28.9%
unsub-neg28.9%
associate-*r*28.3%
Simplified28.3%
Taylor expanded in t around inf 34.1%
*-commutative34.1%
Simplified34.1%
Taylor expanded in t around 0 34.2%
if -6.19999999999999975e-56 < y < -3.20000000000000009e-116Initial program 100.0%
Taylor expanded in t around inf 65.7%
mul-1-neg65.7%
distribute-lft-neg-out65.7%
*-commutative65.7%
Simplified65.7%
Taylor expanded in y around 0 26.9%
mul-1-neg26.9%
unsub-neg26.9%
associate-*r*42.7%
Simplified42.7%
Taylor expanded in y around inf 42.6%
Taylor expanded in y around 0 42.8%
if 7.2000000000000001e154 < y Initial program 96.4%
Taylor expanded in t around inf 75.6%
mul-1-neg75.6%
distribute-lft-neg-out75.6%
*-commutative75.6%
Simplified75.6%
Taylor expanded in y around 0 30.6%
mul-1-neg30.6%
unsub-neg30.6%
associate-*r*30.7%
Simplified30.7%
Taylor expanded in t around inf 30.7%
mul-1-neg30.7%
*-commutative30.7%
distribute-rgt-neg-in30.7%
associate-*r*37.4%
Simplified37.4%
Final simplification35.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -4.8e-55) (and (not (<= y -2.6e-117)) (<= y 3.3e+106))) (* t (/ x t)) (* y (/ x y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -4.8e-55) || (!(y <= -2.6e-117) && (y <= 3.3e+106))) {
tmp = t * (x / t);
} else {
tmp = y * (x / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-4.8d-55)) .or. (.not. (y <= (-2.6d-117))) .and. (y <= 3.3d+106)) then
tmp = t * (x / t)
else
tmp = y * (x / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -4.8e-55) || (!(y <= -2.6e-117) && (y <= 3.3e+106))) {
tmp = t * (x / t);
} else {
tmp = y * (x / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -4.8e-55) or (not (y <= -2.6e-117) and (y <= 3.3e+106)): tmp = t * (x / t) else: tmp = y * (x / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -4.8e-55) || (!(y <= -2.6e-117) && (y <= 3.3e+106))) tmp = Float64(t * Float64(x / t)); else tmp = Float64(y * Float64(x / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -4.8e-55) || (~((y <= -2.6e-117)) && (y <= 3.3e+106))) tmp = t * (x / t); else tmp = y * (x / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -4.8e-55], And[N[Not[LessEqual[y, -2.6e-117]], $MachinePrecision], LessEqual[y, 3.3e+106]]], N[(t * N[(x / t), $MachinePrecision]), $MachinePrecision], N[(y * N[(x / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.8 \cdot 10^{-55} \lor \neg \left(y \leq -2.6 \cdot 10^{-117}\right) \land y \leq 3.3 \cdot 10^{+106}:\\
\;\;\;\;t \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{y}\\
\end{array}
\end{array}
if y < -4.79999999999999983e-55 or -2.59999999999999983e-117 < y < 3.30000000000000008e106Initial program 97.9%
Taylor expanded in t around inf 57.7%
mul-1-neg57.7%
distribute-lft-neg-out57.7%
*-commutative57.7%
Simplified57.7%
Taylor expanded in y around 0 30.9%
mul-1-neg30.9%
unsub-neg30.9%
associate-*r*30.3%
Simplified30.3%
Taylor expanded in t around inf 36.5%
*-commutative36.5%
Simplified36.5%
Taylor expanded in t around 0 36.0%
if -4.79999999999999983e-55 < y < -2.59999999999999983e-117 or 3.30000000000000008e106 < y Initial program 96.7%
Taylor expanded in t around inf 70.7%
mul-1-neg70.7%
distribute-lft-neg-out70.7%
*-commutative70.7%
Simplified70.7%
Taylor expanded in y around 0 22.7%
mul-1-neg22.7%
unsub-neg22.7%
associate-*r*27.2%
Simplified27.2%
Taylor expanded in y around inf 27.2%
Taylor expanded in y around 0 28.8%
Final simplification34.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -1.16e-126) (not (<= a 1.45e+209))) (* t (/ x t)) (* x (- 1.0 (* y t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.16e-126) || !(a <= 1.45e+209)) {
tmp = t * (x / t);
} else {
tmp = x * (1.0 - (y * t));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-1.16d-126)) .or. (.not. (a <= 1.45d+209))) then
tmp = t * (x / t)
else
tmp = x * (1.0d0 - (y * t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.16e-126) || !(a <= 1.45e+209)) {
tmp = t * (x / t);
} else {
tmp = x * (1.0 - (y * t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -1.16e-126) or not (a <= 1.45e+209): tmp = t * (x / t) else: tmp = x * (1.0 - (y * t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -1.16e-126) || !(a <= 1.45e+209)) tmp = Float64(t * Float64(x / t)); else tmp = Float64(x * Float64(1.0 - Float64(y * t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -1.16e-126) || ~((a <= 1.45e+209))) tmp = t * (x / t); else tmp = x * (1.0 - (y * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1.16e-126], N[Not[LessEqual[a, 1.45e+209]], $MachinePrecision]], N[(t * N[(x / t), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.16 \cdot 10^{-126} \lor \neg \left(a \leq 1.45 \cdot 10^{+209}\right):\\
\;\;\;\;t \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\end{array}
\end{array}
if a < -1.16e-126 or 1.45e209 < a Initial program 94.9%
Taylor expanded in t around inf 37.6%
mul-1-neg37.6%
distribute-lft-neg-out37.6%
*-commutative37.6%
Simplified37.6%
Taylor expanded in y around 0 13.4%
mul-1-neg13.4%
unsub-neg13.4%
associate-*r*13.2%
Simplified13.2%
Taylor expanded in t around inf 25.0%
*-commutative25.0%
Simplified25.0%
Taylor expanded in t around 0 31.5%
if -1.16e-126 < a < 1.45e209Initial program 99.2%
Taylor expanded in t around inf 74.7%
mul-1-neg74.7%
distribute-lft-neg-out74.7%
*-commutative74.7%
Simplified74.7%
Taylor expanded in y around 0 40.0%
mul-1-neg40.0%
unsub-neg40.0%
*-commutative40.0%
Simplified40.0%
Final simplification36.8%
(FPCore (x y z t a b) :precision binary64 (if (<= y -2.55e+51) (* t (* x (- y))) (if (<= y 1.75e+148) (* t (/ x t)) (* (* x t) (- y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.55e+51) {
tmp = t * (x * -y);
} else if (y <= 1.75e+148) {
tmp = t * (x / t);
} else {
tmp = (x * t) * -y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-2.55d+51)) then
tmp = t * (x * -y)
else if (y <= 1.75d+148) then
tmp = t * (x / t)
else
tmp = (x * t) * -y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.55e+51) {
tmp = t * (x * -y);
} else if (y <= 1.75e+148) {
tmp = t * (x / t);
} else {
tmp = (x * t) * -y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2.55e+51: tmp = t * (x * -y) elif y <= 1.75e+148: tmp = t * (x / t) else: tmp = (x * t) * -y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2.55e+51) tmp = Float64(t * Float64(x * Float64(-y))); elseif (y <= 1.75e+148) tmp = Float64(t * Float64(x / t)); else tmp = Float64(Float64(x * t) * Float64(-y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -2.55e+51) tmp = t * (x * -y); elseif (y <= 1.75e+148) tmp = t * (x / t); else tmp = (x * t) * -y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.55e+51], N[(t * N[(x * (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.75e+148], N[(t * N[(x / t), $MachinePrecision]), $MachinePrecision], N[(N[(x * t), $MachinePrecision] * (-y)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.55 \cdot 10^{+51}:\\
\;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\
\mathbf{elif}\;y \leq 1.75 \cdot 10^{+148}:\\
\;\;\;\;t \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot t\right) \cdot \left(-y\right)\\
\end{array}
\end{array}
if y < -2.55000000000000005e51Initial program 98.1%
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 27.8%
mul-1-neg27.8%
unsub-neg27.8%
associate-*r*20.8%
Simplified20.8%
Taylor expanded in t around inf 27.6%
associate-*r*27.6%
neg-mul-127.6%
*-commutative27.6%
Simplified27.6%
if -2.55000000000000005e51 < y < 1.7499999999999999e148Initial program 97.6%
Taylor expanded in t around inf 57.4%
mul-1-neg57.4%
distribute-lft-neg-out57.4%
*-commutative57.4%
Simplified57.4%
Taylor expanded in y around 0 29.1%
mul-1-neg29.1%
unsub-neg29.1%
associate-*r*32.1%
Simplified32.1%
Taylor expanded in t around inf 33.2%
*-commutative33.2%
Simplified33.2%
Taylor expanded in t around 0 36.4%
if 1.7499999999999999e148 < y Initial program 96.4%
Taylor expanded in t around inf 75.6%
mul-1-neg75.6%
distribute-lft-neg-out75.6%
*-commutative75.6%
Simplified75.6%
Taylor expanded in y around 0 30.6%
mul-1-neg30.6%
unsub-neg30.6%
associate-*r*30.7%
Simplified30.7%
Taylor expanded in y around inf 30.7%
Taylor expanded in y around inf 37.6%
associate-*r*37.6%
mul-1-neg37.6%
Simplified37.6%
Final simplification34.7%
(FPCore (x y z t a b) :precision binary64 (if (<= x 1.35e+42) (* x (/ 1.0 (+ 1.0 (* y t)))) (* t (/ (- x (* x (* y t))) t))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= 1.35e+42) {
tmp = x * (1.0 / (1.0 + (y * t)));
} else {
tmp = t * ((x - (x * (y * t))) / 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 (x <= 1.35d+42) then
tmp = x * (1.0d0 / (1.0d0 + (y * t)))
else
tmp = t * ((x - (x * (y * t))) / 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 (x <= 1.35e+42) {
tmp = x * (1.0 / (1.0 + (y * t)));
} else {
tmp = t * ((x - (x * (y * t))) / t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= 1.35e+42: tmp = x * (1.0 / (1.0 + (y * t))) else: tmp = t * ((x - (x * (y * t))) / t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= 1.35e+42) tmp = Float64(x * Float64(1.0 / Float64(1.0 + Float64(y * t)))); else tmp = Float64(t * Float64(Float64(x - Float64(x * Float64(y * t))) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= 1.35e+42) tmp = x * (1.0 / (1.0 + (y * t))); else tmp = t * ((x - (x * (y * t))) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, 1.35e+42], N[(x * N[(1.0 / N[(1.0 + N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(x - N[(x * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.35 \cdot 10^{+42}:\\
\;\;\;\;x \cdot \frac{1}{1 + y \cdot t}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{x - x \cdot \left(y \cdot t\right)}{t}\\
\end{array}
\end{array}
if x < 1.35e42Initial program 98.0%
Taylor expanded in t around inf 62.4%
mul-1-neg62.4%
distribute-lft-neg-out62.4%
*-commutative62.4%
Simplified62.4%
distribute-rgt-neg-out62.4%
exp-neg62.4%
Applied egg-rr62.4%
Taylor expanded in y around 0 30.1%
*-commutative30.1%
Simplified30.1%
if 1.35e42 < x Initial program 96.2%
Taylor expanded in t around inf 54.1%
mul-1-neg54.1%
distribute-lft-neg-out54.1%
*-commutative54.1%
Simplified54.1%
Taylor expanded in y around 0 40.3%
mul-1-neg40.3%
unsub-neg40.3%
associate-*r*40.1%
Simplified40.1%
Taylor expanded in t around inf 40.2%
*-commutative40.2%
Simplified40.2%
Taylor expanded in t around 0 40.2%
associate-*r*49.3%
associate-*r*49.3%
*-commutative49.3%
mul-1-neg49.3%
distribute-rgt-neg-out49.3%
associate-*r*42.2%
*-commutative42.2%
Simplified42.2%
Final simplification32.5%
(FPCore (x y z t a b) :precision binary64 (if (<= x 1.5e-77) (* t (/ x t)) (* t (* x (- (/ 1.0 t) y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= 1.5e-77) {
tmp = t * (x / t);
} else {
tmp = t * (x * ((1.0 / t) - y));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (x <= 1.5d-77) then
tmp = t * (x / t)
else
tmp = t * (x * ((1.0d0 / t) - y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= 1.5e-77) {
tmp = t * (x / t);
} else {
tmp = t * (x * ((1.0 / t) - y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= 1.5e-77: tmp = t * (x / t) else: tmp = t * (x * ((1.0 / t) - y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= 1.5e-77) tmp = Float64(t * Float64(x / t)); else tmp = Float64(t * Float64(x * Float64(Float64(1.0 / t) - y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= 1.5e-77) tmp = t * (x / t); else tmp = t * (x * ((1.0 / t) - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, 1.5e-77], N[(t * N[(x / t), $MachinePrecision]), $MachinePrecision], N[(t * N[(x * N[(N[(1.0 / t), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.5 \cdot 10^{-77}:\\
\;\;\;\;t \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(x \cdot \left(\frac{1}{t} - y\right)\right)\\
\end{array}
\end{array}
if x < 1.50000000000000008e-77Initial program 97.7%
Taylor expanded in t around inf 63.3%
mul-1-neg63.3%
distribute-lft-neg-out63.3%
*-commutative63.3%
Simplified63.3%
Taylor expanded in y around 0 28.0%
mul-1-neg28.0%
unsub-neg28.0%
associate-*r*28.9%
Simplified28.9%
Taylor expanded in t around inf 33.1%
*-commutative33.1%
Simplified33.1%
Taylor expanded in t around 0 31.7%
if 1.50000000000000008e-77 < x Initial program 97.4%
Taylor expanded in t around inf 54.9%
mul-1-neg54.9%
distribute-lft-neg-out54.9%
*-commutative54.9%
Simplified54.9%
Taylor expanded in y around 0 31.1%
mul-1-neg31.1%
unsub-neg31.1%
associate-*r*31.0%
Simplified31.0%
Taylor expanded in t around inf 31.0%
*-commutative31.0%
Simplified31.0%
Taylor expanded in x around 0 32.3%
Final simplification31.9%
(FPCore (x y z t a b) :precision binary64 (if (<= x 2.1e+43) (* x (/ 1.0 (+ 1.0 (* y t)))) (* t (* x (- (/ 1.0 t) y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= 2.1e+43) {
tmp = x * (1.0 / (1.0 + (y * t)));
} else {
tmp = t * (x * ((1.0 / t) - y));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (x <= 2.1d+43) then
tmp = x * (1.0d0 / (1.0d0 + (y * t)))
else
tmp = t * (x * ((1.0d0 / t) - y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= 2.1e+43) {
tmp = x * (1.0 / (1.0 + (y * t)));
} else {
tmp = t * (x * ((1.0 / t) - y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= 2.1e+43: tmp = x * (1.0 / (1.0 + (y * t))) else: tmp = t * (x * ((1.0 / t) - y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= 2.1e+43) tmp = Float64(x * Float64(1.0 / Float64(1.0 + Float64(y * t)))); else tmp = Float64(t * Float64(x * Float64(Float64(1.0 / t) - y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= 2.1e+43) tmp = x * (1.0 / (1.0 + (y * t))); else tmp = t * (x * ((1.0 / t) - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, 2.1e+43], N[(x * N[(1.0 / N[(1.0 + N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(x * N[(N[(1.0 / t), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2.1 \cdot 10^{+43}:\\
\;\;\;\;x \cdot \frac{1}{1 + y \cdot t}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(x \cdot \left(\frac{1}{t} - y\right)\right)\\
\end{array}
\end{array}
if x < 2.10000000000000002e43Initial program 98.0%
Taylor expanded in t around inf 62.4%
mul-1-neg62.4%
distribute-lft-neg-out62.4%
*-commutative62.4%
Simplified62.4%
distribute-rgt-neg-out62.4%
exp-neg62.4%
Applied egg-rr62.4%
Taylor expanded in y around 0 30.1%
*-commutative30.1%
Simplified30.1%
if 2.10000000000000002e43 < x Initial program 96.2%
Taylor expanded in t around inf 54.1%
mul-1-neg54.1%
distribute-lft-neg-out54.1%
*-commutative54.1%
Simplified54.1%
Taylor expanded in y around 0 40.3%
mul-1-neg40.3%
unsub-neg40.3%
associate-*r*40.1%
Simplified40.1%
Taylor expanded in t around inf 40.2%
*-commutative40.2%
Simplified40.2%
Taylor expanded in x around 0 42.2%
Final simplification32.5%
(FPCore (x y z t a b) :precision binary64 (if (<= x 2.85e-77) (* t (/ x t)) (- x (* y (* x t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= 2.85e-77) {
tmp = t * (x / t);
} else {
tmp = x - (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 (x <= 2.85d-77) then
tmp = t * (x / t)
else
tmp = x - (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 (x <= 2.85e-77) {
tmp = t * (x / t);
} else {
tmp = x - (y * (x * t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= 2.85e-77: tmp = t * (x / t) else: tmp = x - (y * (x * t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= 2.85e-77) tmp = Float64(t * Float64(x / t)); else tmp = Float64(x - Float64(y * Float64(x * t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= 2.85e-77) tmp = t * (x / t); else tmp = x - (y * (x * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, 2.85e-77], N[(t * N[(x / t), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2.85 \cdot 10^{-77}:\\
\;\;\;\;t \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \left(x \cdot t\right)\\
\end{array}
\end{array}
if x < 2.84999999999999991e-77Initial program 97.7%
Taylor expanded in t around inf 63.3%
mul-1-neg63.3%
distribute-lft-neg-out63.3%
*-commutative63.3%
Simplified63.3%
Taylor expanded in y around 0 28.0%
mul-1-neg28.0%
unsub-neg28.0%
associate-*r*28.9%
Simplified28.9%
Taylor expanded in t around inf 33.1%
*-commutative33.1%
Simplified33.1%
Taylor expanded in t around 0 31.7%
if 2.84999999999999991e-77 < x Initial program 97.4%
Taylor expanded in t around inf 54.9%
mul-1-neg54.9%
distribute-lft-neg-out54.9%
*-commutative54.9%
Simplified54.9%
Taylor expanded in y around 0 31.1%
mul-1-neg31.1%
unsub-neg31.1%
associate-*r*31.0%
Simplified31.0%
Final simplification31.5%
(FPCore (x y z t a b) :precision binary64 (if (<= t 6.2e+78) (* t (/ x t)) (* (* x t) (- y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= 6.2e+78) {
tmp = t * (x / t);
} else {
tmp = (x * t) * -y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= 6.2d+78) then
tmp = t * (x / t)
else
tmp = (x * t) * -y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= 6.2e+78) {
tmp = t * (x / t);
} else {
tmp = (x * t) * -y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= 6.2e+78: tmp = t * (x / t) else: tmp = (x * t) * -y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= 6.2e+78) tmp = Float64(t * Float64(x / t)); else tmp = Float64(Float64(x * t) * Float64(-y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= 6.2e+78) tmp = t * (x / t); else tmp = (x * t) * -y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, 6.2e+78], N[(t * N[(x / t), $MachinePrecision]), $MachinePrecision], N[(N[(x * t), $MachinePrecision] * (-y)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 6.2 \cdot 10^{+78}:\\
\;\;\;\;t \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot t\right) \cdot \left(-y\right)\\
\end{array}
\end{array}
if t < 6.2e78Initial program 97.9%
Taylor expanded in t around inf 55.5%
mul-1-neg55.5%
distribute-lft-neg-out55.5%
*-commutative55.5%
Simplified55.5%
Taylor expanded in y around 0 28.2%
mul-1-neg28.2%
unsub-neg28.2%
associate-*r*26.7%
Simplified26.7%
Taylor expanded in t around inf 30.8%
*-commutative30.8%
Simplified30.8%
Taylor expanded in t around 0 31.0%
if 6.2e78 < t Initial program 96.2%
Taylor expanded in t around inf 81.5%
mul-1-neg81.5%
distribute-lft-neg-out81.5%
*-commutative81.5%
Simplified81.5%
Taylor expanded in y around 0 31.9%
mul-1-neg31.9%
unsub-neg31.9%
associate-*r*40.6%
Simplified40.6%
Taylor expanded in y around inf 40.6%
Taylor expanded in y around inf 37.2%
associate-*r*37.2%
mul-1-neg37.2%
Simplified37.2%
Final simplification32.3%
(FPCore (x y z t a b) :precision binary64 (if (<= x 1.65e-181) (* t (* x y)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= 1.65e-181) {
tmp = t * (x * y);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (x <= 1.65d-181) then
tmp = t * (x * y)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= 1.65e-181) {
tmp = t * (x * y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= 1.65e-181: tmp = t * (x * y) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= 1.65e-181) tmp = Float64(t * 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 <= 1.65e-181) tmp = t * (x * y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, 1.65e-181], N[(t * N[(x * y), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.65 \cdot 10^{-181}:\\
\;\;\;\;t \cdot \left(x \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < 1.65000000000000004e-181Initial program 97.4%
Taylor expanded in t around inf 61.0%
mul-1-neg61.0%
distribute-lft-neg-out61.0%
*-commutative61.0%
Simplified61.0%
Taylor expanded in y around 0 27.2%
mul-1-neg27.2%
unsub-neg27.2%
associate-*r*28.2%
Simplified28.2%
Taylor expanded in t around inf 23.1%
mul-1-neg23.1%
*-commutative23.1%
distribute-rgt-neg-in23.1%
associate-*r*21.2%
Simplified21.2%
pow121.2%
*-commutative21.2%
*-commutative21.2%
associate-*l*23.1%
add-sqr-sqrt9.2%
sqrt-unprod16.8%
sqr-neg16.8%
sqrt-unprod6.8%
add-sqr-sqrt14.0%
Applied egg-rr14.0%
unpow114.0%
Simplified14.0%
if 1.65000000000000004e-181 < x Initial program 97.9%
Taylor expanded in t around inf 60.4%
mul-1-neg60.4%
distribute-lft-neg-out60.4%
*-commutative60.4%
Simplified60.4%
Taylor expanded in y around 0 21.8%
Final simplification16.9%
(FPCore (x y z t a b) :precision binary64 (* t (/ x t)))
double code(double x, double y, double z, double t, double a, double b) {
return t * (x / 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 = t * (x / t)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return t * (x / t);
}
def code(x, y, z, t, a, b): return t * (x / t)
function code(x, y, z, t, a, b) return Float64(t * Float64(x / t)) end
function tmp = code(x, y, z, t, a, b) tmp = t * (x / t); end
code[x_, y_, z_, t_, a_, b_] := N[(t * N[(x / t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
t \cdot \frac{x}{t}
\end{array}
Initial program 97.6%
Taylor expanded in t around inf 60.8%
mul-1-neg60.8%
distribute-lft-neg-out60.8%
*-commutative60.8%
Simplified60.8%
Taylor expanded in y around 0 29.0%
mul-1-neg29.0%
unsub-neg29.0%
associate-*r*29.5%
Simplified29.5%
Taylor expanded in t around inf 32.5%
*-commutative32.5%
Simplified32.5%
Taylor expanded in t around 0 29.6%
Final simplification29.6%
(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.6%
Taylor expanded in t around inf 60.8%
mul-1-neg60.8%
distribute-lft-neg-out60.8%
*-commutative60.8%
Simplified60.8%
Taylor expanded in y around 0 19.1%
Final simplification19.1%
herbie shell --seed 2024077
(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))))))