
(FPCore (x y z t a b) :precision binary64 (* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b))));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x * exp(((y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x * Math.exp(((y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b))));
}
def code(x, y, z, t, a, b): return x * math.exp(((y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b))))
function code(x, y, z, t, a, b) return Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))))) end
function tmp = code(x, y, z, t, a, b) tmp = x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b)))); end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b))));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x * exp(((y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x * Math.exp(((y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b))));
}
def code(x, y, z, t, a, b): return x * math.exp(((y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b))))
function code(x, y, z, t, a, b) return Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))))) end
function tmp = code(x, y, z, t, a, b) tmp = x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b)))); end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}
\end{array}
(FPCore (x y z t a b) :precision binary64 (* x (exp (fma 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 98.0%
fma-define98.4%
sub-neg98.4%
log1p-define99.6%
Simplified99.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -5.5e+36) (not (<= y 2.4e+36))) (* x (exp (* y (- (log z) t)))) (* x (exp (- (* a (- b)) (* y t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -5.5e+36) || !(y <= 2.4e+36)) {
tmp = x * exp((y * (log(z) - t)));
} else {
tmp = x * exp(((a * -b) - (y * t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-5.5d+36)) .or. (.not. (y <= 2.4d+36))) then
tmp = x * exp((y * (log(z) - t)))
else
tmp = x * exp(((a * -b) - (y * t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -5.5e+36) || !(y <= 2.4e+36)) {
tmp = x * Math.exp((y * (Math.log(z) - t)));
} else {
tmp = x * Math.exp(((a * -b) - (y * t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -5.5e+36) or not (y <= 2.4e+36): tmp = x * math.exp((y * (math.log(z) - t))) else: tmp = x * math.exp(((a * -b) - (y * t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -5.5e+36) || !(y <= 2.4e+36)) tmp = Float64(x * exp(Float64(y * Float64(log(z) - t)))); else tmp = Float64(x * exp(Float64(Float64(a * Float64(-b)) - Float64(y * t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -5.5e+36) || ~((y <= 2.4e+36))) tmp = x * exp((y * (log(z) - t))); else tmp = x * exp(((a * -b) - (y * t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -5.5e+36], N[Not[LessEqual[y, 2.4e+36]], $MachinePrecision]], N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(N[(a * (-b)), $MachinePrecision] - N[(y * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.5 \cdot 10^{+36} \lor \neg \left(y \leq 2.4 \cdot 10^{+36}\right):\\
\;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right) - y \cdot t}\\
\end{array}
\end{array}
if y < -5.5000000000000002e36 or 2.39999999999999992e36 < y Initial program 98.2%
Taylor expanded in y around inf 92.9%
if -5.5000000000000002e36 < y < 2.39999999999999992e36Initial program 97.8%
Taylor expanded in z around 0 97.8%
neg-mul-197.8%
Simplified97.8%
Taylor expanded in t around inf 95.9%
neg-mul-195.9%
Simplified95.9%
Final simplification94.6%
(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 98.0%
Taylor expanded in z around 0 98.0%
neg-mul-198.0%
Simplified98.0%
Final simplification98.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -4.8e-34) (not (<= a 1.08e+27))) (* x (exp (* a (- (- z) b)))) (* x (exp (* y (- t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -4.8e-34) || !(a <= 1.08e+27)) {
tmp = x * exp((a * (-z - b)));
} 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) :: tmp
if ((a <= (-4.8d-34)) .or. (.not. (a <= 1.08d+27))) then
tmp = x * exp((a * (-z - b)))
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 tmp;
if ((a <= -4.8e-34) || !(a <= 1.08e+27)) {
tmp = x * Math.exp((a * (-z - b)));
} else {
tmp = x * Math.exp((y * -t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -4.8e-34) or not (a <= 1.08e+27): tmp = x * math.exp((a * (-z - b))) else: tmp = x * math.exp((y * -t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -4.8e-34) || !(a <= 1.08e+27)) tmp = Float64(x * exp(Float64(a * Float64(Float64(-z) - b)))); else tmp = Float64(x * exp(Float64(y * Float64(-t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -4.8e-34) || ~((a <= 1.08e+27))) tmp = x * exp((a * (-z - b))); else tmp = x * exp((y * -t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -4.8e-34], N[Not[LessEqual[a, 1.08e+27]], $MachinePrecision]], N[(x * N[Exp[N[(a * N[((-z) - b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(y * (-t)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.8 \cdot 10^{-34} \lor \neg \left(a \leq 1.08 \cdot 10^{+27}\right):\\
\;\;\;\;x \cdot e^{a \cdot \left(\left(-z\right) - b\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{y \cdot \left(-t\right)}\\
\end{array}
\end{array}
if a < -4.79999999999999982e-34 or 1.08e27 < a Initial program 96.0%
Taylor expanded in y around 0 82.0%
sub-neg82.0%
sub-neg82.0%
sub-neg82.0%
mul-1-neg82.0%
log1p-define87.4%
mul-1-neg87.4%
Simplified87.4%
Taylor expanded in z around 0 87.4%
+-commutative87.4%
associate-*r*87.4%
associate-*r*87.4%
distribute-lft-out87.4%
mul-1-neg87.4%
Simplified87.4%
if -4.79999999999999982e-34 < a < 1.08e27Initial program 100.0%
Taylor expanded in t around inf 75.7%
mul-1-neg75.7%
distribute-lft-neg-out75.7%
*-commutative75.7%
Simplified75.7%
Final simplification81.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -4.6e+15) (not (<= t 1.4e+90))) (* x (exp (* y (- t)))) (* x (exp (* a (- b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -4.6e+15) || !(t <= 1.4e+90)) {
tmp = x * exp((y * -t));
} else {
tmp = x * exp((a * -b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-4.6d+15)) .or. (.not. (t <= 1.4d+90))) then
tmp = x * exp((y * -t))
else
tmp = x * exp((a * -b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -4.6e+15) || !(t <= 1.4e+90)) {
tmp = x * Math.exp((y * -t));
} else {
tmp = x * Math.exp((a * -b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -4.6e+15) or not (t <= 1.4e+90): tmp = x * math.exp((y * -t)) else: tmp = x * math.exp((a * -b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -4.6e+15) || !(t <= 1.4e+90)) tmp = Float64(x * exp(Float64(y * Float64(-t)))); else tmp = Float64(x * exp(Float64(a * Float64(-b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -4.6e+15) || ~((t <= 1.4e+90))) tmp = x * exp((y * -t)); else tmp = x * exp((a * -b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -4.6e+15], N[Not[LessEqual[t, 1.4e+90]], $MachinePrecision]], N[(x * N[Exp[N[(y * (-t)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(a * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.6 \cdot 10^{+15} \lor \neg \left(t \leq 1.4 \cdot 10^{+90}\right):\\
\;\;\;\;x \cdot e^{y \cdot \left(-t\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\
\end{array}
\end{array}
if t < -4.6e15 or 1.4e90 < t Initial program 97.2%
Taylor expanded in t around inf 84.9%
mul-1-neg84.9%
distribute-lft-neg-out84.9%
*-commutative84.9%
Simplified84.9%
if -4.6e15 < t < 1.4e90Initial program 98.5%
Taylor expanded in b around inf 75.6%
mul-1-neg75.6%
distribute-rgt-neg-out75.6%
Simplified75.6%
Final simplification79.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2.6e+46) (not (<= y 3.1))) (* x (pow z y)) (* x (exp (* a (- b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.6e+46) || !(y <= 3.1)) {
tmp = x * pow(z, y);
} else {
tmp = x * exp((a * -b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-2.6d+46)) .or. (.not. (y <= 3.1d0))) then
tmp = x * (z ** y)
else
tmp = x * exp((a * -b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.6e+46) || !(y <= 3.1)) {
tmp = x * Math.pow(z, y);
} else {
tmp = x * Math.exp((a * -b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2.6e+46) or not (y <= 3.1): tmp = x * math.pow(z, y) else: tmp = x * math.exp((a * -b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -2.6e+46) || !(y <= 3.1)) tmp = Float64(x * (z ^ y)); else tmp = Float64(x * exp(Float64(a * Float64(-b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -2.6e+46) || ~((y <= 3.1))) tmp = x * (z ^ y); else tmp = x * exp((a * -b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2.6e+46], N[Not[LessEqual[y, 3.1]], $MachinePrecision]], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(a * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.6 \cdot 10^{+46} \lor \neg \left(y \leq 3.1\right):\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\
\end{array}
\end{array}
if y < -2.60000000000000013e46 or 3.10000000000000009 < y Initial program 98.3%
Taylor expanded in y around inf 91.6%
Taylor expanded in t around 0 63.8%
if -2.60000000000000013e46 < y < 3.10000000000000009Initial program 97.7%
Taylor expanded in b around inf 82.1%
mul-1-neg82.1%
distribute-rgt-neg-out82.1%
Simplified82.1%
Final simplification73.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.3e+30) (not (<= y 2.25))) (* x (pow z y)) (* x (- 1.0 (* a (+ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.3e+30) || !(y <= 2.25)) {
tmp = x * pow(z, y);
} else {
tmp = x * (1.0 - (a * (z + b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-1.3d+30)) .or. (.not. (y <= 2.25d0))) then
tmp = x * (z ** y)
else
tmp = x * (1.0d0 - (a * (z + b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.3e+30) || !(y <= 2.25)) {
tmp = x * Math.pow(z, y);
} else {
tmp = x * (1.0 - (a * (z + b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.3e+30) or not (y <= 2.25): tmp = x * math.pow(z, y) else: tmp = x * (1.0 - (a * (z + b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.3e+30) || !(y <= 2.25)) tmp = Float64(x * (z ^ y)); else tmp = Float64(x * Float64(1.0 - Float64(a * Float64(z + b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.3e+30) || ~((y <= 2.25))) tmp = x * (z ^ y); else tmp = x * (1.0 - (a * (z + b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.3e+30], N[Not[LessEqual[y, 2.25]], $MachinePrecision]], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(a * N[(z + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.3 \cdot 10^{+30} \lor \neg \left(y \leq 2.25\right):\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - a \cdot \left(z + b\right)\right)\\
\end{array}
\end{array}
if y < -1.29999999999999994e30 or 2.25 < y Initial program 98.3%
Taylor expanded in y around inf 91.8%
Taylor expanded in t around 0 63.1%
if -1.29999999999999994e30 < y < 2.25Initial program 97.6%
Taylor expanded in y around 0 83.1%
sub-neg83.1%
sub-neg83.1%
sub-neg83.1%
mul-1-neg83.1%
log1p-define86.1%
mul-1-neg86.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%
Taylor expanded in a around 0 48.9%
mul-1-neg48.9%
+-commutative48.9%
unsub-neg48.9%
+-commutative48.9%
Simplified48.9%
Final simplification55.6%
(FPCore (x y z t a b) :precision binary64 (* x (exp (- (* a (- b)) (* y t)))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(((a * -b) - (y * t)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x * exp(((a * -b) - (y * t)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x * Math.exp(((a * -b) - (y * t)));
}
def code(x, y, z, t, a, b): return x * math.exp(((a * -b) - (y * t)))
function code(x, y, z, t, a, b) return Float64(x * exp(Float64(Float64(a * Float64(-b)) - Float64(y * t)))) end
function tmp = code(x, y, z, t, a, b) tmp = x * exp(((a * -b) - (y * t))); end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(N[(a * (-b)), $MachinePrecision] - N[(y * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{a \cdot \left(-b\right) - y \cdot t}
\end{array}
Initial program 98.0%
Taylor expanded in z around 0 98.0%
neg-mul-198.0%
Simplified98.0%
Taylor expanded in t around inf 88.2%
neg-mul-188.2%
Simplified88.2%
Final simplification88.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -45000000000000.0)
(* t (* x (- (/ 1.0 t) y)))
(if (<= y 1e+35)
(* x (- 1.0 (* a (+ z b))))
(- (* (/ 1.0 t) (* x t)) (* y (* x t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -45000000000000.0) {
tmp = t * (x * ((1.0 / t) - y));
} else if (y <= 1e+35) {
tmp = x * (1.0 - (a * (z + b)));
} else {
tmp = ((1.0 / t) * (x * t)) - (y * (x * t));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-45000000000000.0d0)) then
tmp = t * (x * ((1.0d0 / t) - y))
else if (y <= 1d+35) then
tmp = x * (1.0d0 - (a * (z + b)))
else
tmp = ((1.0d0 / t) * (x * t)) - (y * (x * t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -45000000000000.0) {
tmp = t * (x * ((1.0 / t) - y));
} else if (y <= 1e+35) {
tmp = x * (1.0 - (a * (z + b)));
} else {
tmp = ((1.0 / t) * (x * t)) - (y * (x * t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -45000000000000.0: tmp = t * (x * ((1.0 / t) - y)) elif y <= 1e+35: tmp = x * (1.0 - (a * (z + b))) else: tmp = ((1.0 / t) * (x * t)) - (y * (x * t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -45000000000000.0) tmp = Float64(t * Float64(x * Float64(Float64(1.0 / t) - y))); elseif (y <= 1e+35) tmp = Float64(x * Float64(1.0 - Float64(a * Float64(z + b)))); else tmp = Float64(Float64(Float64(1.0 / t) * Float64(x * t)) - Float64(y * Float64(x * t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -45000000000000.0) tmp = t * (x * ((1.0 / t) - y)); elseif (y <= 1e+35) tmp = x * (1.0 - (a * (z + b))); else tmp = ((1.0 / t) * (x * t)) - (y * (x * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -45000000000000.0], N[(t * N[(x * N[(N[(1.0 / t), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1e+35], N[(x * N[(1.0 - N[(a * N[(z + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 / t), $MachinePrecision] * N[(x * t), $MachinePrecision]), $MachinePrecision] - N[(y * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -45000000000000:\\
\;\;\;\;t \cdot \left(x \cdot \left(\frac{1}{t} - y\right)\right)\\
\mathbf{elif}\;y \leq 10^{+35}:\\
\;\;\;\;x \cdot \left(1 - a \cdot \left(z + b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{t} \cdot \left(x \cdot t\right) - y \cdot \left(x \cdot t\right)\\
\end{array}
\end{array}
if y < -4.5e13Initial program 98.2%
Taylor expanded in t around inf 64.2%
mul-1-neg64.2%
distribute-lft-neg-out64.2%
*-commutative64.2%
Simplified64.2%
Taylor expanded in y around 0 21.4%
mul-1-neg21.4%
*-commutative21.4%
unsub-neg21.4%
Simplified21.4%
Taylor expanded in t around inf 21.4%
Taylor expanded in x around 0 29.7%
if -4.5e13 < y < 9.9999999999999997e34Initial program 97.8%
Taylor expanded in y around 0 80.6%
sub-neg80.6%
sub-neg80.6%
sub-neg80.6%
mul-1-neg80.6%
log1p-define83.5%
mul-1-neg83.5%
Simplified83.5%
Taylor expanded in z around 0 83.5%
+-commutative83.5%
associate-*r*83.5%
associate-*r*83.5%
distribute-lft-out83.5%
mul-1-neg83.5%
Simplified83.5%
Taylor expanded in a around 0 48.1%
mul-1-neg48.1%
+-commutative48.1%
unsub-neg48.1%
+-commutative48.1%
Simplified48.1%
if 9.9999999999999997e34 < y Initial program 98.2%
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 24.1%
mul-1-neg24.1%
*-commutative24.1%
unsub-neg24.1%
Simplified24.1%
Taylor expanded in t around inf 24.1%
associate-*r*29.0%
sub-neg29.0%
distribute-rgt-in28.9%
Applied egg-rr28.9%
Final simplification39.8%
(FPCore (x y z t a b) :precision binary64 (if (<= y -30000000000000.0) (* t (* x (- (/ 1.0 t) y))) (if (<= y 6e+34) (* x (- 1.0 (* a (+ z b)))) (* x (* y (- t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -30000000000000.0) {
tmp = t * (x * ((1.0 / t) - y));
} else if (y <= 6e+34) {
tmp = x * (1.0 - (a * (z + b)));
} else {
tmp = x * (y * -t);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-30000000000000.0d0)) then
tmp = t * (x * ((1.0d0 / t) - y))
else if (y <= 6d+34) then
tmp = x * (1.0d0 - (a * (z + b)))
else
tmp = x * (y * -t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -30000000000000.0) {
tmp = t * (x * ((1.0 / t) - y));
} else if (y <= 6e+34) {
tmp = x * (1.0 - (a * (z + b)));
} else {
tmp = x * (y * -t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -30000000000000.0: tmp = t * (x * ((1.0 / t) - y)) elif y <= 6e+34: tmp = x * (1.0 - (a * (z + b))) else: tmp = x * (y * -t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -30000000000000.0) tmp = Float64(t * Float64(x * Float64(Float64(1.0 / t) - y))); elseif (y <= 6e+34) tmp = Float64(x * Float64(1.0 - Float64(a * Float64(z + b)))); else tmp = Float64(x * Float64(y * Float64(-t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -30000000000000.0) tmp = t * (x * ((1.0 / t) - y)); elseif (y <= 6e+34) tmp = x * (1.0 - (a * (z + b))); else tmp = x * (y * -t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -30000000000000.0], N[(t * N[(x * N[(N[(1.0 / t), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6e+34], N[(x * N[(1.0 - N[(a * N[(z + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(y * (-t)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -30000000000000:\\
\;\;\;\;t \cdot \left(x \cdot \left(\frac{1}{t} - y\right)\right)\\
\mathbf{elif}\;y \leq 6 \cdot 10^{+34}:\\
\;\;\;\;x \cdot \left(1 - a \cdot \left(z + b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\
\end{array}
\end{array}
if y < -3e13Initial program 98.2%
Taylor expanded in t around inf 64.2%
mul-1-neg64.2%
distribute-lft-neg-out64.2%
*-commutative64.2%
Simplified64.2%
Taylor expanded in y around 0 21.4%
mul-1-neg21.4%
*-commutative21.4%
unsub-neg21.4%
Simplified21.4%
Taylor expanded in t around inf 21.4%
Taylor expanded in x around 0 29.7%
if -3e13 < y < 6.00000000000000037e34Initial program 97.8%
Taylor expanded in y around 0 80.6%
sub-neg80.6%
sub-neg80.6%
sub-neg80.6%
mul-1-neg80.6%
log1p-define83.5%
mul-1-neg83.5%
Simplified83.5%
Taylor expanded in z around 0 83.5%
+-commutative83.5%
associate-*r*83.5%
associate-*r*83.5%
distribute-lft-out83.5%
mul-1-neg83.5%
Simplified83.5%
Taylor expanded in a around 0 48.1%
mul-1-neg48.1%
+-commutative48.1%
unsub-neg48.1%
+-commutative48.1%
Simplified48.1%
if 6.00000000000000037e34 < y Initial program 98.2%
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 24.1%
mul-1-neg24.1%
*-commutative24.1%
unsub-neg24.1%
Simplified24.1%
Taylor expanded in y around inf 25.1%
mul-1-neg25.1%
*-commutative25.1%
distribute-rgt-neg-in25.1%
distribute-rgt-neg-in25.1%
Simplified25.1%
Taylor expanded in t around 0 25.1%
mul-1-neg25.1%
associate-*r*28.8%
*-commutative28.8%
distribute-rgt-neg-out28.8%
associate-*l*28.5%
Simplified28.5%
Final simplification39.7%
(FPCore (x y z t a b) :precision binary64 (if (<= y -9.6e+14) (* t (* x (- (/ 1.0 t) y))) (if (<= y 5.2e+33) (* x (- 1.0 (* a b))) (* x (* y (- t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -9.6e+14) {
tmp = t * (x * ((1.0 / t) - y));
} else if (y <= 5.2e+33) {
tmp = x * (1.0 - (a * b));
} else {
tmp = x * (y * -t);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-9.6d+14)) then
tmp = t * (x * ((1.0d0 / t) - y))
else if (y <= 5.2d+33) then
tmp = x * (1.0d0 - (a * b))
else
tmp = x * (y * -t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -9.6e+14) {
tmp = t * (x * ((1.0 / t) - y));
} else if (y <= 5.2e+33) {
tmp = x * (1.0 - (a * b));
} else {
tmp = x * (y * -t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -9.6e+14: tmp = t * (x * ((1.0 / t) - y)) elif y <= 5.2e+33: tmp = x * (1.0 - (a * b)) else: tmp = x * (y * -t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -9.6e+14) tmp = Float64(t * Float64(x * Float64(Float64(1.0 / t) - y))); elseif (y <= 5.2e+33) tmp = Float64(x * Float64(1.0 - Float64(a * b))); else tmp = Float64(x * Float64(y * Float64(-t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -9.6e+14) tmp = t * (x * ((1.0 / t) - y)); elseif (y <= 5.2e+33) tmp = x * (1.0 - (a * b)); else tmp = x * (y * -t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -9.6e+14], N[(t * N[(x * N[(N[(1.0 / t), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.2e+33], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(y * (-t)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.6 \cdot 10^{+14}:\\
\;\;\;\;t \cdot \left(x \cdot \left(\frac{1}{t} - y\right)\right)\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{+33}:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\
\end{array}
\end{array}
if y < -9.6e14Initial program 98.2%
Taylor expanded in t around inf 64.2%
mul-1-neg64.2%
distribute-lft-neg-out64.2%
*-commutative64.2%
Simplified64.2%
Taylor expanded in y around 0 21.4%
mul-1-neg21.4%
*-commutative21.4%
unsub-neg21.4%
Simplified21.4%
Taylor expanded in t around inf 21.4%
Taylor expanded in x around 0 29.7%
if -9.6e14 < y < 5.1999999999999995e33Initial program 97.8%
Taylor expanded in b around inf 80.6%
mul-1-neg80.6%
distribute-rgt-neg-out80.6%
Simplified80.6%
Taylor expanded in a around 0 46.5%
neg-mul-146.5%
unsub-neg46.5%
Simplified46.5%
if 5.1999999999999995e33 < y Initial program 98.2%
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 24.1%
mul-1-neg24.1%
*-commutative24.1%
unsub-neg24.1%
Simplified24.1%
Taylor expanded in y around inf 25.1%
mul-1-neg25.1%
*-commutative25.1%
distribute-rgt-neg-in25.1%
distribute-rgt-neg-in25.1%
Simplified25.1%
Taylor expanded in t around 0 25.1%
mul-1-neg25.1%
associate-*r*28.8%
*-commutative28.8%
distribute-rgt-neg-out28.8%
associate-*l*28.5%
Simplified28.5%
Final simplification38.8%
(FPCore (x y z t a b) :precision binary64 (if (<= y -8e+81) (* b (- (/ x b) (* x a))) (if (<= y 3.1e+34) (* x (- 1.0 (* a b))) (* x (* y (- t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -8e+81) {
tmp = b * ((x / b) - (x * a));
} else if (y <= 3.1e+34) {
tmp = x * (1.0 - (a * b));
} else {
tmp = x * (y * -t);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-8d+81)) then
tmp = b * ((x / b) - (x * a))
else if (y <= 3.1d+34) then
tmp = x * (1.0d0 - (a * b))
else
tmp = x * (y * -t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -8e+81) {
tmp = b * ((x / b) - (x * a));
} else if (y <= 3.1e+34) {
tmp = x * (1.0 - (a * b));
} else {
tmp = x * (y * -t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -8e+81: tmp = b * ((x / b) - (x * a)) elif y <= 3.1e+34: tmp = x * (1.0 - (a * b)) else: tmp = x * (y * -t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -8e+81) tmp = Float64(b * Float64(Float64(x / b) - Float64(x * a))); elseif (y <= 3.1e+34) tmp = Float64(x * Float64(1.0 - Float64(a * b))); else tmp = Float64(x * Float64(y * Float64(-t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -8e+81) tmp = b * ((x / b) - (x * a)); elseif (y <= 3.1e+34) tmp = x * (1.0 - (a * b)); else tmp = x * (y * -t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -8e+81], N[(b * N[(N[(x / b), $MachinePrecision] - N[(x * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.1e+34], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(y * (-t)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{+81}:\\
\;\;\;\;b \cdot \left(\frac{x}{b} - x \cdot a\right)\\
\mathbf{elif}\;y \leq 3.1 \cdot 10^{+34}:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\
\end{array}
\end{array}
if y < -7.99999999999999937e81Initial program 100.0%
Taylor expanded in b around inf 28.3%
mul-1-neg28.3%
distribute-rgt-neg-out28.3%
Simplified28.3%
Taylor expanded in a around 0 7.9%
mul-1-neg7.9%
unsub-neg7.9%
Simplified7.9%
Taylor expanded in b around inf 27.7%
if -7.99999999999999937e81 < y < 3.09999999999999977e34Initial program 97.3%
Taylor expanded in b around inf 77.4%
mul-1-neg77.4%
distribute-rgt-neg-out77.4%
Simplified77.4%
Taylor expanded in a around 0 43.3%
neg-mul-143.3%
unsub-neg43.3%
Simplified43.3%
if 3.09999999999999977e34 < y Initial program 98.2%
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 24.1%
mul-1-neg24.1%
*-commutative24.1%
unsub-neg24.1%
Simplified24.1%
Taylor expanded in y around inf 25.1%
mul-1-neg25.1%
*-commutative25.1%
distribute-rgt-neg-in25.1%
distribute-rgt-neg-in25.1%
Simplified25.1%
Taylor expanded in t around 0 25.1%
mul-1-neg25.1%
associate-*r*28.8%
*-commutative28.8%
distribute-rgt-neg-out28.8%
associate-*l*28.5%
Simplified28.5%
Final simplification37.4%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1.15e+126) (- x (* t (* x y))) (if (<= y 2.7e+34) (* x (- 1.0 (* a b))) (* x (* y (- t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.15e+126) {
tmp = x - (t * (x * y));
} else if (y <= 2.7e+34) {
tmp = x * (1.0 - (a * b));
} else {
tmp = x * (y * -t);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-1.15d+126)) then
tmp = x - (t * (x * y))
else if (y <= 2.7d+34) then
tmp = x * (1.0d0 - (a * b))
else
tmp = x * (y * -t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.15e+126) {
tmp = x - (t * (x * y));
} else if (y <= 2.7e+34) {
tmp = x * (1.0 - (a * b));
} else {
tmp = x * (y * -t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.15e+126: tmp = x - (t * (x * y)) elif y <= 2.7e+34: tmp = x * (1.0 - (a * b)) else: tmp = x * (y * -t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.15e+126) tmp = Float64(x - Float64(t * Float64(x * y))); elseif (y <= 2.7e+34) tmp = Float64(x * Float64(1.0 - Float64(a * b))); else tmp = Float64(x * Float64(y * Float64(-t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.15e+126) tmp = x - (t * (x * y)); elseif (y <= 2.7e+34) tmp = x * (1.0 - (a * b)); else tmp = x * (y * -t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.15e+126], N[(x - N[(t * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.7e+34], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(y * (-t)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.15 \cdot 10^{+126}:\\
\;\;\;\;x - t \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{+34}:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\
\end{array}
\end{array}
if y < -1.15e126Initial program 100.0%
Taylor expanded in t around inf 59.8%
mul-1-neg59.8%
distribute-lft-neg-out59.8%
*-commutative59.8%
Simplified59.8%
Taylor expanded in y around 0 33.6%
mul-1-neg33.6%
unsub-neg33.6%
associate-*r*30.9%
Simplified30.9%
Taylor expanded in t around 0 33.6%
*-commutative33.6%
Simplified33.6%
if -1.15e126 < y < 2.7e34Initial program 97.5%
Taylor expanded in b around inf 73.4%
mul-1-neg73.4%
distribute-rgt-neg-out73.4%
Simplified73.4%
Taylor expanded in a around 0 41.1%
neg-mul-141.1%
unsub-neg41.1%
Simplified41.1%
if 2.7e34 < y Initial program 98.2%
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 24.1%
mul-1-neg24.1%
*-commutative24.1%
unsub-neg24.1%
Simplified24.1%
Taylor expanded in y around inf 25.1%
mul-1-neg25.1%
*-commutative25.1%
distribute-rgt-neg-in25.1%
distribute-rgt-neg-in25.1%
Simplified25.1%
Taylor expanded in t around 0 25.1%
mul-1-neg25.1%
associate-*r*28.8%
*-commutative28.8%
distribute-rgt-neg-out28.8%
associate-*l*28.5%
Simplified28.5%
Final simplification37.4%
(FPCore (x y z t a b) :precision binary64 (if (<= y -9.8e+126) (* (- t) (* x y)) (if (<= y 2e+34) (* x (- 1.0 (* a b))) (* x (* y (- t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -9.8e+126) {
tmp = -t * (x * y);
} else if (y <= 2e+34) {
tmp = x * (1.0 - (a * b));
} else {
tmp = x * (y * -t);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-9.8d+126)) then
tmp = -t * (x * y)
else if (y <= 2d+34) then
tmp = x * (1.0d0 - (a * b))
else
tmp = x * (y * -t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -9.8e+126) {
tmp = -t * (x * y);
} else if (y <= 2e+34) {
tmp = x * (1.0 - (a * b));
} else {
tmp = x * (y * -t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -9.8e+126: tmp = -t * (x * y) elif y <= 2e+34: tmp = x * (1.0 - (a * b)) else: tmp = x * (y * -t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -9.8e+126) tmp = Float64(Float64(-t) * Float64(x * y)); elseif (y <= 2e+34) tmp = Float64(x * Float64(1.0 - Float64(a * b))); else tmp = Float64(x * Float64(y * Float64(-t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -9.8e+126) tmp = -t * (x * y); elseif (y <= 2e+34) tmp = x * (1.0 - (a * b)); else tmp = x * (y * -t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -9.8e+126], N[((-t) * N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2e+34], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(y * (-t)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.8 \cdot 10^{+126}:\\
\;\;\;\;\left(-t\right) \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;y \leq 2 \cdot 10^{+34}:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\
\end{array}
\end{array}
if y < -9.80000000000000002e126Initial program 100.0%
Taylor expanded in t around inf 59.8%
mul-1-neg59.8%
distribute-lft-neg-out59.8%
*-commutative59.8%
Simplified59.8%
Taylor expanded in y around 0 30.9%
mul-1-neg30.9%
*-commutative30.9%
unsub-neg30.9%
Simplified30.9%
Taylor expanded in y around inf 33.3%
mul-1-neg33.3%
*-commutative33.3%
distribute-rgt-neg-in33.3%
distribute-rgt-neg-in33.3%
Simplified33.3%
if -9.80000000000000002e126 < y < 1.99999999999999989e34Initial program 97.5%
Taylor expanded in b around inf 73.4%
mul-1-neg73.4%
distribute-rgt-neg-out73.4%
Simplified73.4%
Taylor expanded in a around 0 41.1%
neg-mul-141.1%
unsub-neg41.1%
Simplified41.1%
if 1.99999999999999989e34 < y Initial program 98.2%
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 24.1%
mul-1-neg24.1%
*-commutative24.1%
unsub-neg24.1%
Simplified24.1%
Taylor expanded in y around inf 25.1%
mul-1-neg25.1%
*-commutative25.1%
distribute-rgt-neg-in25.1%
distribute-rgt-neg-in25.1%
Simplified25.1%
Taylor expanded in t around 0 25.1%
mul-1-neg25.1%
associate-*r*28.8%
*-commutative28.8%
distribute-rgt-neg-out28.8%
associate-*l*28.5%
Simplified28.5%
Final simplification37.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -6.6e-9) (not (<= y 3.1e-63))) (* a (* x (- b))) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -6.6e-9) || !(y <= 3.1e-63)) {
tmp = a * (x * -b);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-6.6d-9)) .or. (.not. (y <= 3.1d-63))) then
tmp = a * (x * -b)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -6.6e-9) || !(y <= 3.1e-63)) {
tmp = a * (x * -b);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -6.6e-9) or not (y <= 3.1e-63): tmp = a * (x * -b) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -6.6e-9) || !(y <= 3.1e-63)) tmp = Float64(a * Float64(x * Float64(-b))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -6.6e-9) || ~((y <= 3.1e-63))) tmp = a * (x * -b); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -6.6e-9], N[Not[LessEqual[y, 3.1e-63]], $MachinePrecision]], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.6 \cdot 10^{-9} \lor \neg \left(y \leq 3.1 \cdot 10^{-63}\right):\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -6.60000000000000037e-9 or 3.09999999999999984e-63 < y Initial program 97.8%
Taylor expanded in b around inf 41.2%
mul-1-neg41.2%
distribute-rgt-neg-out41.2%
Simplified41.2%
Taylor expanded in a around 0 10.8%
mul-1-neg10.8%
unsub-neg10.8%
Simplified10.8%
Taylor expanded in a around inf 20.6%
mul-1-neg20.6%
distribute-rgt-neg-in20.6%
distribute-rgt-neg-in20.6%
Simplified20.6%
if -6.60000000000000037e-9 < y < 3.09999999999999984e-63Initial program 98.1%
Taylor expanded in b around inf 84.3%
mul-1-neg84.3%
distribute-rgt-neg-out84.3%
Simplified84.3%
Taylor expanded in a around 0 36.0%
Final simplification27.7%
(FPCore (x y z t a b) :precision binary64 (if (<= y -2.6e+46) (* (- t) (* x y)) (if (<= y 1.12e-38) x (* x (* y (- t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.6e+46) {
tmp = -t * (x * y);
} else if (y <= 1.12e-38) {
tmp = x;
} else {
tmp = x * (y * -t);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-2.6d+46)) then
tmp = -t * (x * y)
else if (y <= 1.12d-38) then
tmp = x
else
tmp = x * (y * -t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.6e+46) {
tmp = -t * (x * y);
} else if (y <= 1.12e-38) {
tmp = x;
} else {
tmp = x * (y * -t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2.6e+46: tmp = -t * (x * y) elif y <= 1.12e-38: tmp = x else: tmp = x * (y * -t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2.6e+46) tmp = Float64(Float64(-t) * Float64(x * y)); elseif (y <= 1.12e-38) tmp = x; else tmp = Float64(x * Float64(y * Float64(-t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -2.6e+46) tmp = -t * (x * y); elseif (y <= 1.12e-38) tmp = x; else tmp = x * (y * -t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.6e+46], N[((-t) * N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.12e-38], x, N[(x * N[(y * (-t)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.6 \cdot 10^{+46}:\\
\;\;\;\;\left(-t\right) \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;y \leq 1.12 \cdot 10^{-38}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\
\end{array}
\end{array}
if y < -2.60000000000000013e46Initial program 98.1%
Taylor expanded in t around inf 64.4%
mul-1-neg64.4%
distribute-lft-neg-out64.4%
*-commutative64.4%
Simplified64.4%
Taylor expanded in y around 0 23.2%
mul-1-neg23.2%
*-commutative23.2%
unsub-neg23.2%
Simplified23.2%
Taylor expanded in y around inf 24.5%
mul-1-neg24.5%
*-commutative24.5%
distribute-rgt-neg-in24.5%
distribute-rgt-neg-in24.5%
Simplified24.5%
if -2.60000000000000013e46 < y < 1.1200000000000001e-38Initial program 98.3%
Taylor expanded in b around inf 82.7%
mul-1-neg82.7%
distribute-rgt-neg-out82.7%
Simplified82.7%
Taylor expanded in a around 0 33.9%
if 1.1200000000000001e-38 < y Initial program 97.3%
Taylor expanded in t around inf 56.6%
mul-1-neg56.6%
distribute-lft-neg-out56.6%
*-commutative56.6%
Simplified56.6%
Taylor expanded in y around 0 19.9%
mul-1-neg19.9%
*-commutative19.9%
unsub-neg19.9%
Simplified19.9%
Taylor expanded in y around inf 23.8%
mul-1-neg23.8%
*-commutative23.8%
distribute-rgt-neg-in23.8%
distribute-rgt-neg-in23.8%
Simplified23.8%
Taylor expanded in t around 0 23.8%
mul-1-neg23.8%
associate-*r*26.7%
*-commutative26.7%
distribute-rgt-neg-out26.7%
associate-*l*26.4%
Simplified26.4%
Final simplification29.8%
(FPCore (x y z t a b) :precision binary64 (if (<= y -8.2e+42) (* (- t) (* x y)) (if (<= y 2.6e-67) x (* a (* x (- b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -8.2e+42) {
tmp = -t * (x * y);
} else if (y <= 2.6e-67) {
tmp = x;
} else {
tmp = a * (x * -b);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-8.2d+42)) then
tmp = -t * (x * y)
else if (y <= 2.6d-67) then
tmp = x
else
tmp = a * (x * -b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -8.2e+42) {
tmp = -t * (x * y);
} else if (y <= 2.6e-67) {
tmp = x;
} else {
tmp = a * (x * -b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -8.2e+42: tmp = -t * (x * y) elif y <= 2.6e-67: tmp = x else: tmp = a * (x * -b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -8.2e+42) tmp = Float64(Float64(-t) * Float64(x * y)); elseif (y <= 2.6e-67) tmp = x; else tmp = Float64(a * Float64(x * Float64(-b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -8.2e+42) tmp = -t * (x * y); elseif (y <= 2.6e-67) tmp = x; else tmp = a * (x * -b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -8.2e+42], N[((-t) * N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.6e-67], x, N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.2 \cdot 10^{+42}:\\
\;\;\;\;\left(-t\right) \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{-67}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\end{array}
\end{array}
if y < -8.2000000000000001e42Initial program 98.1%
Taylor expanded in t around inf 64.4%
mul-1-neg64.4%
distribute-lft-neg-out64.4%
*-commutative64.4%
Simplified64.4%
Taylor expanded in y around 0 23.2%
mul-1-neg23.2%
*-commutative23.2%
unsub-neg23.2%
Simplified23.2%
Taylor expanded in y around inf 24.5%
mul-1-neg24.5%
*-commutative24.5%
distribute-rgt-neg-in24.5%
distribute-rgt-neg-in24.5%
Simplified24.5%
if -8.2000000000000001e42 < y < 2.5999999999999999e-67Initial program 98.2%
Taylor expanded in b around inf 82.9%
mul-1-neg82.9%
distribute-rgt-neg-out82.9%
Simplified82.9%
Taylor expanded in a around 0 34.2%
if 2.5999999999999999e-67 < y Initial program 97.5%
Taylor expanded in b around inf 47.3%
mul-1-neg47.3%
distribute-rgt-neg-out47.3%
Simplified47.3%
Taylor expanded in a around 0 12.7%
mul-1-neg12.7%
unsub-neg12.7%
Simplified12.7%
Taylor expanded in a around inf 24.0%
mul-1-neg24.0%
distribute-rgt-neg-in24.0%
distribute-rgt-neg-in24.0%
Simplified24.0%
Final simplification29.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -9.2e-9) (not (<= y 2.5e-37))) (* t (* x y)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -9.2e-9) || !(y <= 2.5e-37)) {
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 ((y <= (-9.2d-9)) .or. (.not. (y <= 2.5d-37))) 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 ((y <= -9.2e-9) || !(y <= 2.5e-37)) {
tmp = t * (x * y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -9.2e-9) or not (y <= 2.5e-37): tmp = t * (x * y) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -9.2e-9) || !(y <= 2.5e-37)) 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 ((y <= -9.2e-9) || ~((y <= 2.5e-37))) tmp = t * (x * y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -9.2e-9], N[Not[LessEqual[y, 2.5e-37]], $MachinePrecision]], N[(t * N[(x * y), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.2 \cdot 10^{-9} \lor \neg \left(y \leq 2.5 \cdot 10^{-37}\right):\\
\;\;\;\;t \cdot \left(x \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -9.1999999999999997e-9 or 2.4999999999999999e-37 < y Initial program 97.8%
Taylor expanded in t around inf 59.7%
mul-1-neg59.7%
distribute-lft-neg-out59.7%
*-commutative59.7%
Simplified59.7%
Taylor expanded in y around 0 20.2%
mul-1-neg20.2%
*-commutative20.2%
unsub-neg20.2%
Simplified20.2%
Taylor expanded in y around inf 23.0%
mul-1-neg23.0%
*-commutative23.0%
distribute-rgt-neg-in23.0%
distribute-rgt-neg-in23.0%
Simplified23.0%
add-sqr-sqrt10.7%
sqrt-unprod23.9%
sqr-neg23.9%
sqrt-unprod5.2%
add-sqr-sqrt13.4%
pow113.4%
*-commutative13.4%
Applied egg-rr13.4%
unpow113.4%
Simplified13.4%
if -9.1999999999999997e-9 < y < 2.4999999999999999e-37Initial program 98.2%
Taylor expanded in b around inf 84.0%
mul-1-neg84.0%
distribute-rgt-neg-out84.0%
Simplified84.0%
Taylor expanded in a around 0 35.7%
Final simplification24.1%
(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 98.0%
Taylor expanded in b around inf 61.2%
mul-1-neg61.2%
distribute-rgt-neg-out61.2%
Simplified61.2%
Taylor expanded in a around 0 19.4%
herbie shell --seed 2024135
(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))))))