
(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 14 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.7%
fma-define97.7%
sub-neg97.7%
log1p-define98.8%
Simplified98.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -3.6e-17) (not (<= y 5.6e-10))) (* x (exp (* y (- (log z) t)))) (* x (exp (* a (- (+ z b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.6e-17) || !(y <= 5.6e-10)) {
tmp = x * exp((y * (log(z) - t)));
} else {
tmp = x * exp((a * -(z + b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-3.6d-17)) .or. (.not. (y <= 5.6d-10))) then
tmp = x * exp((y * (log(z) - t)))
else
tmp = x * exp((a * -(z + b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.6e-17) || !(y <= 5.6e-10)) {
tmp = x * Math.exp((y * (Math.log(z) - t)));
} else {
tmp = x * Math.exp((a * -(z + b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -3.6e-17) or not (y <= 5.6e-10): tmp = x * math.exp((y * (math.log(z) - t))) else: tmp = x * math.exp((a * -(z + b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -3.6e-17) || !(y <= 5.6e-10)) tmp = Float64(x * exp(Float64(y * Float64(log(z) - t)))); else tmp = Float64(x * exp(Float64(a * Float64(-Float64(z + b))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -3.6e-17) || ~((y <= 5.6e-10))) tmp = x * exp((y * (log(z) - t))); else tmp = x * exp((a * -(z + b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -3.6e-17], N[Not[LessEqual[y, 5.6e-10]], $MachinePrecision]], N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(a * (-N[(z + b), $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.6 \cdot 10^{-17} \lor \neg \left(y \leq 5.6 \cdot 10^{-10}\right):\\
\;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-\left(z + b\right)\right)}\\
\end{array}
\end{array}
if y < -3.59999999999999995e-17 or 5.60000000000000031e-10 < y Initial program 97.8%
fma-define97.8%
sub-neg97.8%
log1p-define97.8%
Simplified97.8%
Taylor expanded in a around 0 86.9%
if -3.59999999999999995e-17 < y < 5.60000000000000031e-10Initial program 97.6%
Taylor expanded in z around 0 99.9%
+-commutative99.9%
associate-*r*99.9%
associate-*r*99.9%
distribute-lft-out99.9%
mul-1-neg99.9%
Simplified99.9%
Taylor expanded in y around 0 87.3%
mul-1-neg87.3%
+-commutative87.3%
distribute-lft-neg-in87.3%
Simplified87.3%
Final simplification87.1%
(FPCore (x y z t a b) :precision binary64 (* x (exp (- (* y (- (log z) t)) (* a (+ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(((y * (log(z) - t)) - (a * (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 * (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 * (z + b))));
}
def code(x, y, z, t, a, b): return x * math.exp(((y * (math.log(z) - t)) - (a * (z + b))))
function code(x, y, z, t, a, b) return Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) - Float64(a * Float64(z + b))))) end
function tmp = code(x, y, z, t, a, b) tmp = x * exp(((y * (log(z) - t)) - (a * (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[(z + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{y \cdot \left(\log z - t\right) - a \cdot \left(z + b\right)}
\end{array}
Initial program 97.7%
Taylor expanded in z around 0 98.8%
+-commutative98.8%
associate-*r*98.8%
associate-*r*98.8%
distribute-lft-out98.8%
mul-1-neg98.8%
Simplified98.8%
Final simplification98.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (pow z y))))
(if (<= y -1500000.0)
t_1
(if (<= y 6.4)
(* x (exp (* a (- (+ z b)))))
(if (<= y 3.4e+223) t_1 (* x (exp (* t (- y)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * pow(z, y);
double tmp;
if (y <= -1500000.0) {
tmp = t_1;
} else if (y <= 6.4) {
tmp = x * exp((a * -(z + b)));
} else if (y <= 3.4e+223) {
tmp = t_1;
} else {
tmp = x * exp((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 = x * (z ** y)
if (y <= (-1500000.0d0)) then
tmp = t_1
else if (y <= 6.4d0) then
tmp = x * exp((a * -(z + b)))
else if (y <= 3.4d+223) then
tmp = t_1
else
tmp = x * exp((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 = x * Math.pow(z, y);
double tmp;
if (y <= -1500000.0) {
tmp = t_1;
} else if (y <= 6.4) {
tmp = x * Math.exp((a * -(z + b)));
} else if (y <= 3.4e+223) {
tmp = t_1;
} else {
tmp = x * Math.exp((t * -y));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * math.pow(z, y) tmp = 0 if y <= -1500000.0: tmp = t_1 elif y <= 6.4: tmp = x * math.exp((a * -(z + b))) elif y <= 3.4e+223: tmp = t_1 else: tmp = x * math.exp((t * -y)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * (z ^ y)) tmp = 0.0 if (y <= -1500000.0) tmp = t_1; elseif (y <= 6.4) tmp = Float64(x * exp(Float64(a * Float64(-Float64(z + b))))); elseif (y <= 3.4e+223) tmp = t_1; else tmp = Float64(x * exp(Float64(t * Float64(-y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * (z ^ y); tmp = 0.0; if (y <= -1500000.0) tmp = t_1; elseif (y <= 6.4) tmp = x * exp((a * -(z + b))); elseif (y <= 3.4e+223) tmp = t_1; else tmp = x * exp((t * -y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1500000.0], t$95$1, If[LessEqual[y, 6.4], N[(x * N[Exp[N[(a * (-N[(z + b), $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.4e+223], t$95$1, N[(x * N[Exp[N[(t * (-y)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot {z}^{y}\\
\mathbf{if}\;y \leq -1500000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 6.4:\\
\;\;\;\;x \cdot e^{a \cdot \left(-\left(z + b\right)\right)}\\
\mathbf{elif}\;y \leq 3.4 \cdot 10^{+223}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{t \cdot \left(-y\right)}\\
\end{array}
\end{array}
if y < -1.5e6 or 6.4000000000000004 < y < 3.3999999999999998e223Initial program 98.3%
fma-define98.3%
sub-neg98.3%
log1p-define98.3%
Simplified98.3%
Taylor expanded in a around 0 85.6%
Taylor expanded in t around 0 73.7%
if -1.5e6 < y < 6.4000000000000004Initial program 97.7%
Taylor expanded in z around 0 99.9%
+-commutative99.9%
associate-*r*99.9%
associate-*r*99.9%
distribute-lft-out99.9%
mul-1-neg99.9%
Simplified99.9%
Taylor expanded in y around 0 86.9%
mul-1-neg86.9%
+-commutative86.9%
distribute-lft-neg-in86.9%
Simplified86.9%
if 3.3999999999999998e223 < y Initial program 93.3%
Taylor expanded in z around 0 93.3%
+-commutative93.3%
associate-*r*93.3%
associate-*r*93.3%
distribute-lft-out93.3%
mul-1-neg93.3%
Simplified93.3%
Taylor expanded in t around inf 86.9%
associate-*r*86.9%
neg-mul-186.9%
Simplified86.9%
Final simplification80.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (pow z y))))
(if (<= y -850000000.0)
t_1
(if (<= y 0.00055)
(* x (exp (* a (- b))))
(if (<= y 8e+225) t_1 (* x (exp (* t (- y)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * pow(z, y);
double tmp;
if (y <= -850000000.0) {
tmp = t_1;
} else if (y <= 0.00055) {
tmp = x * exp((a * -b));
} else if (y <= 8e+225) {
tmp = t_1;
} else {
tmp = x * exp((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 = x * (z ** y)
if (y <= (-850000000.0d0)) then
tmp = t_1
else if (y <= 0.00055d0) then
tmp = x * exp((a * -b))
else if (y <= 8d+225) then
tmp = t_1
else
tmp = x * exp((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 = x * Math.pow(z, y);
double tmp;
if (y <= -850000000.0) {
tmp = t_1;
} else if (y <= 0.00055) {
tmp = x * Math.exp((a * -b));
} else if (y <= 8e+225) {
tmp = t_1;
} else {
tmp = x * Math.exp((t * -y));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * math.pow(z, y) tmp = 0 if y <= -850000000.0: tmp = t_1 elif y <= 0.00055: tmp = x * math.exp((a * -b)) elif y <= 8e+225: tmp = t_1 else: tmp = x * math.exp((t * -y)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * (z ^ y)) tmp = 0.0 if (y <= -850000000.0) tmp = t_1; elseif (y <= 0.00055) tmp = Float64(x * exp(Float64(a * Float64(-b)))); elseif (y <= 8e+225) tmp = t_1; else tmp = Float64(x * exp(Float64(t * Float64(-y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * (z ^ y); tmp = 0.0; if (y <= -850000000.0) tmp = t_1; elseif (y <= 0.00055) tmp = x * exp((a * -b)); elseif (y <= 8e+225) tmp = t_1; else tmp = x * exp((t * -y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -850000000.0], t$95$1, If[LessEqual[y, 0.00055], N[(x * N[Exp[N[(a * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8e+225], t$95$1, N[(x * N[Exp[N[(t * (-y)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot {z}^{y}\\
\mathbf{if}\;y \leq -850000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 0.00055:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\
\mathbf{elif}\;y \leq 8 \cdot 10^{+225}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{t \cdot \left(-y\right)}\\
\end{array}
\end{array}
if y < -8.5e8 or 5.50000000000000033e-4 < y < 7.99999999999999943e225Initial program 98.3%
fma-define98.3%
sub-neg98.3%
log1p-define98.3%
Simplified98.3%
Taylor expanded in a around 0 85.7%
Taylor expanded in t around 0 73.1%
if -8.5e8 < y < 5.50000000000000033e-4Initial program 97.6%
fma-define97.6%
sub-neg97.6%
log1p-define99.9%
Simplified99.9%
Taylor expanded in y around 0 85.4%
Taylor expanded in z around 0 85.4%
neg-mul-185.4%
distribute-rgt-neg-in85.4%
Simplified85.4%
if 7.99999999999999943e225 < y Initial program 93.3%
Taylor expanded in z around 0 93.3%
+-commutative93.3%
associate-*r*93.3%
associate-*r*93.3%
distribute-lft-out93.3%
mul-1-neg93.3%
Simplified93.3%
Taylor expanded in t around inf 86.9%
associate-*r*86.9%
neg-mul-186.9%
Simplified86.9%
Final simplification79.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -780000000.0) (not (<= y 0.00035))) (* 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 <= -780000000.0) || !(y <= 0.00035)) {
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 <= (-780000000.0d0)) .or. (.not. (y <= 0.00035d0))) 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 <= -780000000.0) || !(y <= 0.00035)) {
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 <= -780000000.0) or not (y <= 0.00035): 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 <= -780000000.0) || !(y <= 0.00035)) 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 <= -780000000.0) || ~((y <= 0.00035))) 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, -780000000.0], N[Not[LessEqual[y, 0.00035]], $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 -780000000 \lor \neg \left(y \leq 0.00035\right):\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\
\end{array}
\end{array}
if y < -7.8e8 or 3.49999999999999996e-4 < y Initial program 97.7%
fma-define97.8%
sub-neg97.8%
log1p-define97.8%
Simplified97.8%
Taylor expanded in a around 0 86.6%
Taylor expanded in t around 0 70.2%
if -7.8e8 < y < 3.49999999999999996e-4Initial program 97.6%
fma-define97.6%
sub-neg97.6%
log1p-define99.9%
Simplified99.9%
Taylor expanded in y around 0 85.4%
Taylor expanded in z around 0 85.4%
neg-mul-185.4%
distribute-rgt-neg-in85.4%
Simplified85.4%
Final simplification77.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1500000.0) (not (<= y 0.009))) (* x (pow z y)) (* x (exp (* z (- a))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1500000.0) || !(y <= 0.009)) {
tmp = x * pow(z, y);
} else {
tmp = x * exp((z * -a));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-1500000.0d0)) .or. (.not. (y <= 0.009d0))) then
tmp = x * (z ** y)
else
tmp = x * exp((z * -a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1500000.0) || !(y <= 0.009)) {
tmp = x * Math.pow(z, y);
} else {
tmp = x * Math.exp((z * -a));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1500000.0) or not (y <= 0.009): tmp = x * math.pow(z, y) else: tmp = x * math.exp((z * -a)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1500000.0) || !(y <= 0.009)) tmp = Float64(x * (z ^ y)); else tmp = Float64(x * exp(Float64(z * Float64(-a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1500000.0) || ~((y <= 0.009))) tmp = x * (z ^ y); else tmp = x * exp((z * -a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1500000.0], N[Not[LessEqual[y, 0.009]], $MachinePrecision]], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(z * (-a)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1500000 \lor \neg \left(y \leq 0.009\right):\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{z \cdot \left(-a\right)}\\
\end{array}
\end{array}
if y < -1.5e6 or 0.00899999999999999932 < y Initial program 97.7%
fma-define97.7%
sub-neg97.7%
log1p-define97.7%
Simplified97.7%
Taylor expanded in a around 0 86.5%
Taylor expanded in t around 0 70.7%
if -1.5e6 < y < 0.00899999999999999932Initial program 97.7%
Taylor expanded in z around 0 99.9%
+-commutative99.9%
associate-*r*99.9%
associate-*r*99.9%
distribute-lft-out99.9%
mul-1-neg99.9%
Simplified99.9%
Taylor expanded in z around inf 41.6%
mul-1-neg41.6%
Simplified41.6%
Final simplification56.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1500000.0) (not (<= y 9.5e-45))) (* x (pow z y)) (* x (- 1.0 (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1500000.0) || !(y <= 9.5e-45)) {
tmp = x * pow(z, y);
} else {
tmp = x * (1.0 - (a * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-1500000.0d0)) .or. (.not. (y <= 9.5d-45))) then
tmp = x * (z ** y)
else
tmp = x * (1.0d0 - (a * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1500000.0) || !(y <= 9.5e-45)) {
tmp = x * Math.pow(z, y);
} else {
tmp = x * (1.0 - (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1500000.0) or not (y <= 9.5e-45): tmp = x * math.pow(z, y) else: tmp = x * (1.0 - (a * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1500000.0) || !(y <= 9.5e-45)) tmp = Float64(x * (z ^ y)); else tmp = Float64(x * Float64(1.0 - Float64(a * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1500000.0) || ~((y <= 9.5e-45))) tmp = x * (z ^ y); else tmp = x * (1.0 - (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1500000.0], N[Not[LessEqual[y, 9.5e-45]], $MachinePrecision]], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1500000 \lor \neg \left(y \leq 9.5 \cdot 10^{-45}\right):\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\
\end{array}
\end{array}
if y < -1.5e6 or 9.5000000000000002e-45 < y Initial program 97.8%
fma-define97.8%
sub-neg97.8%
log1p-define97.8%
Simplified97.8%
Taylor expanded in a around 0 84.9%
Taylor expanded in t around 0 69.0%
if -1.5e6 < y < 9.5000000000000002e-45Initial program 97.6%
fma-define97.6%
sub-neg97.6%
log1p-define99.9%
Simplified99.9%
Taylor expanded in y around 0 84.9%
Taylor expanded in z around 0 84.9%
neg-mul-184.9%
distribute-rgt-neg-in84.9%
Simplified84.9%
Taylor expanded in a around 0 39.8%
neg-mul-139.8%
unsub-neg39.8%
Simplified39.8%
Final simplification55.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -4.2e+58) (not (<= y 4.3e+128))) (* x (* t (- y))) (- x (* a (* x b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -4.2e+58) || !(y <= 4.3e+128)) {
tmp = x * (t * -y);
} else {
tmp = x - (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 <= (-4.2d+58)) .or. (.not. (y <= 4.3d+128))) then
tmp = x * (t * -y)
else
tmp = x - (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 <= -4.2e+58) || !(y <= 4.3e+128)) {
tmp = x * (t * -y);
} else {
tmp = x - (a * (x * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -4.2e+58) or not (y <= 4.3e+128): tmp = x * (t * -y) else: tmp = x - (a * (x * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -4.2e+58) || !(y <= 4.3e+128)) tmp = Float64(x * Float64(t * Float64(-y))); else tmp = Float64(x - Float64(a * Float64(x * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -4.2e+58) || ~((y <= 4.3e+128))) tmp = x * (t * -y); else tmp = x - (a * (x * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -4.2e+58], N[Not[LessEqual[y, 4.3e+128]], $MachinePrecision]], N[(x * N[(t * (-y)), $MachinePrecision]), $MachinePrecision], N[(x - N[(a * N[(x * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.2 \cdot 10^{+58} \lor \neg \left(y \leq 4.3 \cdot 10^{+128}\right):\\
\;\;\;\;x \cdot \left(t \cdot \left(-y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x - a \cdot \left(x \cdot b\right)\\
\end{array}
\end{array}
if y < -4.20000000000000024e58 or 4.29999999999999975e128 < y Initial program 96.7%
Taylor expanded in z around 0 96.7%
+-commutative96.7%
associate-*r*96.7%
associate-*r*96.7%
distribute-lft-out96.7%
mul-1-neg96.7%
Simplified96.7%
Taylor expanded in t around inf 65.4%
associate-*r*65.4%
neg-mul-165.4%
Simplified65.4%
Taylor expanded in t around 0 26.6%
mul-1-neg26.6%
*-commutative26.6%
unsub-neg26.6%
Simplified26.6%
Taylor expanded in y around inf 29.1%
mul-1-neg29.1%
*-commutative29.1%
distribute-rgt-neg-in29.1%
Simplified29.1%
if -4.20000000000000024e58 < y < 4.29999999999999975e128Initial program 98.2%
fma-define98.2%
sub-neg98.2%
log1p-define99.9%
Simplified99.9%
Taylor expanded in y around 0 72.1%
Taylor expanded in z around 0 72.1%
neg-mul-172.1%
distribute-rgt-neg-in72.1%
Simplified72.1%
Taylor expanded in a around 0 33.6%
mul-1-neg33.6%
unsub-neg33.6%
Simplified33.6%
Final simplification32.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -4.2e+58) (not (<= y 5.2e+127))) (* x (* t (- y))) (* x (- 1.0 (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -4.2e+58) || !(y <= 5.2e+127)) {
tmp = x * (t * -y);
} else {
tmp = x * (1.0 - (a * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-4.2d+58)) .or. (.not. (y <= 5.2d+127))) then
tmp = x * (t * -y)
else
tmp = x * (1.0d0 - (a * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -4.2e+58) || !(y <= 5.2e+127)) {
tmp = x * (t * -y);
} else {
tmp = x * (1.0 - (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -4.2e+58) or not (y <= 5.2e+127): tmp = x * (t * -y) else: tmp = x * (1.0 - (a * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -4.2e+58) || !(y <= 5.2e+127)) tmp = Float64(x * Float64(t * Float64(-y))); else tmp = Float64(x * Float64(1.0 - Float64(a * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -4.2e+58) || ~((y <= 5.2e+127))) tmp = x * (t * -y); else tmp = x * (1.0 - (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -4.2e+58], N[Not[LessEqual[y, 5.2e+127]], $MachinePrecision]], N[(x * N[(t * (-y)), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.2 \cdot 10^{+58} \lor \neg \left(y \leq 5.2 \cdot 10^{+127}\right):\\
\;\;\;\;x \cdot \left(t \cdot \left(-y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\
\end{array}
\end{array}
if y < -4.20000000000000024e58 or 5.2000000000000004e127 < y Initial program 96.7%
Taylor expanded in z around 0 96.7%
+-commutative96.7%
associate-*r*96.7%
associate-*r*96.7%
distribute-lft-out96.7%
mul-1-neg96.7%
Simplified96.7%
Taylor expanded in t around inf 65.4%
associate-*r*65.4%
neg-mul-165.4%
Simplified65.4%
Taylor expanded in t around 0 26.6%
mul-1-neg26.6%
*-commutative26.6%
unsub-neg26.6%
Simplified26.6%
Taylor expanded in y around inf 29.1%
mul-1-neg29.1%
*-commutative29.1%
distribute-rgt-neg-in29.1%
Simplified29.1%
if -4.20000000000000024e58 < y < 5.2000000000000004e127Initial program 98.2%
fma-define98.2%
sub-neg98.2%
log1p-define99.9%
Simplified99.9%
Taylor expanded in y around 0 72.1%
Taylor expanded in z around 0 72.1%
neg-mul-172.1%
distribute-rgt-neg-in72.1%
Simplified72.1%
Taylor expanded in a around 0 33.1%
neg-mul-133.1%
unsub-neg33.1%
Simplified33.1%
Final simplification31.7%
(FPCore (x y z t a b) :precision binary64 (if (<= y -3.7e-35) (* t (- (/ x t) (* x y))) (if (<= y 2.2e+128) (- x (* a (* x b))) (* x (* t (- y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -3.7e-35) {
tmp = t * ((x / t) - (x * y));
} else if (y <= 2.2e+128) {
tmp = x - (a * (x * b));
} else {
tmp = x * (t * -y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-3.7d-35)) then
tmp = t * ((x / t) - (x * y))
else if (y <= 2.2d+128) then
tmp = x - (a * (x * b))
else
tmp = x * (t * -y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -3.7e-35) {
tmp = t * ((x / t) - (x * y));
} else if (y <= 2.2e+128) {
tmp = x - (a * (x * b));
} else {
tmp = x * (t * -y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -3.7e-35: tmp = t * ((x / t) - (x * y)) elif y <= 2.2e+128: tmp = x - (a * (x * b)) else: tmp = x * (t * -y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -3.7e-35) tmp = Float64(t * Float64(Float64(x / t) - Float64(x * y))); elseif (y <= 2.2e+128) tmp = Float64(x - Float64(a * Float64(x * b))); else tmp = Float64(x * Float64(t * Float64(-y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -3.7e-35) tmp = t * ((x / t) - (x * y)); elseif (y <= 2.2e+128) tmp = x - (a * (x * b)); else tmp = x * (t * -y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -3.7e-35], N[(t * N[(N[(x / t), $MachinePrecision] - N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.2e+128], N[(x - N[(a * N[(x * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(t * (-y)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.7 \cdot 10^{-35}:\\
\;\;\;\;t \cdot \left(\frac{x}{t} - x \cdot y\right)\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{+128}:\\
\;\;\;\;x - a \cdot \left(x \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(t \cdot \left(-y\right)\right)\\
\end{array}
\end{array}
if y < -3.6999999999999999e-35Initial program 97.0%
Taylor expanded in z around 0 97.0%
+-commutative97.0%
associate-*r*97.0%
associate-*r*97.0%
distribute-lft-out97.0%
mul-1-neg97.0%
Simplified97.0%
Taylor expanded in t around inf 62.4%
associate-*r*62.4%
neg-mul-162.4%
Simplified62.4%
Taylor expanded in t around 0 23.3%
mul-1-neg23.3%
*-commutative23.3%
unsub-neg23.3%
Simplified23.3%
Taylor expanded in t around inf 26.0%
+-commutative26.0%
mul-1-neg26.0%
sub-neg26.0%
*-commutative26.0%
Simplified26.0%
if -3.6999999999999999e-35 < y < 2.20000000000000017e128Initial program 98.0%
fma-define98.0%
sub-neg98.0%
log1p-define99.9%
Simplified99.9%
Taylor expanded in y around 0 76.1%
Taylor expanded in z around 0 76.1%
neg-mul-176.1%
distribute-rgt-neg-in76.1%
Simplified76.1%
Taylor expanded in a around 0 35.8%
mul-1-neg35.8%
unsub-neg35.8%
Simplified35.8%
if 2.20000000000000017e128 < y Initial program 97.5%
Taylor expanded in z around 0 97.5%
+-commutative97.5%
associate-*r*97.5%
associate-*r*97.5%
distribute-lft-out97.5%
mul-1-neg97.5%
Simplified97.5%
Taylor expanded in t around inf 68.7%
associate-*r*68.7%
neg-mul-168.7%
Simplified68.7%
Taylor expanded in t around 0 25.0%
mul-1-neg25.0%
*-commutative25.0%
unsub-neg25.0%
Simplified25.0%
Taylor expanded in y around inf 28.5%
mul-1-neg28.5%
*-commutative28.5%
distribute-rgt-neg-in28.5%
Simplified28.5%
Final simplification32.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.05e-110) (not (<= y 2.7e+60))) (* t (* x (- y))) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.05e-110) || !(y <= 2.7e+60)) {
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 <= (-1.05d-110)) .or. (.not. (y <= 2.7d+60))) 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 <= -1.05e-110) || !(y <= 2.7e+60)) {
tmp = t * (x * -y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.05e-110) or not (y <= 2.7e+60): tmp = t * (x * -y) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.05e-110) || !(y <= 2.7e+60)) tmp = Float64(t * Float64(x * Float64(-y))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.05e-110) || ~((y <= 2.7e+60))) tmp = t * (x * -y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.05e-110], N[Not[LessEqual[y, 2.7e+60]], $MachinePrecision]], N[(t * N[(x * (-y)), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.05 \cdot 10^{-110} \lor \neg \left(y \leq 2.7 \cdot 10^{+60}\right):\\
\;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.05000000000000001e-110 or 2.6999999999999999e60 < y Initial program 97.8%
Taylor expanded in z around 0 97.8%
+-commutative97.8%
associate-*r*97.8%
associate-*r*97.8%
distribute-lft-out97.8%
mul-1-neg97.8%
Simplified97.8%
Taylor expanded in t around inf 60.7%
associate-*r*60.7%
neg-mul-160.7%
Simplified60.7%
Taylor expanded in t around 0 20.7%
mul-1-neg20.7%
*-commutative20.7%
unsub-neg20.7%
Simplified20.7%
Taylor expanded in y around inf 19.4%
mul-1-neg19.4%
*-commutative19.4%
distribute-rgt-neg-in19.4%
distribute-rgt-neg-in19.4%
Simplified19.4%
if -1.05000000000000001e-110 < y < 2.6999999999999999e60Initial program 97.5%
fma-define97.5%
sub-neg97.5%
log1p-define99.9%
Simplified99.9%
Taylor expanded in a around 0 52.0%
Taylor expanded in y around 0 28.5%
Final simplification23.6%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1.15e-110) (* t (* x (- y))) (if (<= y 3e+61) x (* x (* t (- y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.15e-110) {
tmp = t * (x * -y);
} else if (y <= 3e+61) {
tmp = x;
} else {
tmp = x * (t * -y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-1.15d-110)) then
tmp = t * (x * -y)
else if (y <= 3d+61) then
tmp = x
else
tmp = x * (t * -y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.15e-110) {
tmp = t * (x * -y);
} else if (y <= 3e+61) {
tmp = x;
} else {
tmp = x * (t * -y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.15e-110: tmp = t * (x * -y) elif y <= 3e+61: tmp = x else: tmp = x * (t * -y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.15e-110) tmp = Float64(t * Float64(x * Float64(-y))); elseif (y <= 3e+61) tmp = x; else tmp = Float64(x * Float64(t * Float64(-y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.15e-110) tmp = t * (x * -y); elseif (y <= 3e+61) tmp = x; else tmp = x * (t * -y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.15e-110], N[(t * N[(x * (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3e+61], x, N[(x * N[(t * (-y)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.15 \cdot 10^{-110}:\\
\;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\
\mathbf{elif}\;y \leq 3 \cdot 10^{+61}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(t \cdot \left(-y\right)\right)\\
\end{array}
\end{array}
if y < -1.1500000000000001e-110Initial program 97.6%
Taylor expanded in z around 0 97.6%
+-commutative97.6%
associate-*r*97.6%
associate-*r*97.6%
distribute-lft-out97.6%
mul-1-neg97.6%
Simplified97.6%
Taylor expanded in t around inf 57.9%
associate-*r*57.9%
neg-mul-157.9%
Simplified57.9%
Taylor expanded in t around 0 21.8%
mul-1-neg21.8%
*-commutative21.8%
unsub-neg21.8%
Simplified21.8%
Taylor expanded in y around inf 23.7%
mul-1-neg23.7%
*-commutative23.7%
distribute-rgt-neg-in23.7%
distribute-rgt-neg-in23.7%
Simplified23.7%
if -1.1500000000000001e-110 < y < 3e61Initial program 97.5%
fma-define97.5%
sub-neg97.5%
log1p-define99.9%
Simplified99.9%
Taylor expanded in a around 0 52.0%
Taylor expanded in y around 0 28.5%
if 3e61 < y Initial program 98.2%
Taylor expanded in z around 0 98.2%
+-commutative98.2%
associate-*r*98.2%
associate-*r*98.2%
distribute-lft-out98.2%
mul-1-neg98.2%
Simplified98.2%
Taylor expanded in t around inf 64.9%
associate-*r*64.9%
neg-mul-164.9%
Simplified64.9%
Taylor expanded in t around 0 19.0%
mul-1-neg19.0%
*-commutative19.0%
unsub-neg19.0%
Simplified19.0%
Taylor expanded in y around inf 23.2%
mul-1-neg23.2%
*-commutative23.2%
distribute-rgt-neg-in23.2%
Simplified23.2%
Final simplification25.8%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 97.7%
fma-define97.7%
sub-neg97.7%
log1p-define98.8%
Simplified98.8%
Taylor expanded in a around 0 68.7%
Taylor expanded in y around 0 16.0%
herbie shell --seed 2024170
(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))))))