
(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 16 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 (- (* 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.8%
Taylor expanded in z around 0 100.0%
associate-*r*100.0%
associate-*r*100.0%
distribute-lft-out100.0%
mul-1-neg100.0%
Simplified100.0%
Final simplification100.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2.6e-5) (not (<= y 1.5e-19))) (* x (exp (* y (- (log z) t)))) (* x (exp (* a (- (- b) z))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.6e-5) || !(y <= 1.5e-19)) {
tmp = x * exp((y * (log(z) - t)));
} else {
tmp = x * exp((a * (-b - z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-2.6d-5)) .or. (.not. (y <= 1.5d-19))) then
tmp = x * exp((y * (log(z) - t)))
else
tmp = x * exp((a * (-b - z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.6e-5) || !(y <= 1.5e-19)) {
tmp = x * Math.exp((y * (Math.log(z) - t)));
} else {
tmp = x * Math.exp((a * (-b - z)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2.6e-5) or not (y <= 1.5e-19): tmp = x * math.exp((y * (math.log(z) - t))) else: tmp = x * math.exp((a * (-b - z))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -2.6e-5) || !(y <= 1.5e-19)) tmp = Float64(x * exp(Float64(y * Float64(log(z) - t)))); else tmp = Float64(x * exp(Float64(a * Float64(Float64(-b) - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -2.6e-5) || ~((y <= 1.5e-19))) tmp = x * exp((y * (log(z) - t))); else tmp = x * exp((a * (-b - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2.6e-5], N[Not[LessEqual[y, 1.5e-19]], $MachinePrecision]], N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(a * N[((-b) - z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.6 \cdot 10^{-5} \lor \neg \left(y \leq 1.5 \cdot 10^{-19}\right):\\
\;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(\left(-b\right) - z\right)}\\
\end{array}
\end{array}
if y < -2.59999999999999984e-5 or 1.49999999999999996e-19 < y Initial program 100.0%
fma-define100.0%
sub-neg100.0%
log1p-define100.0%
Simplified100.0%
Taylor expanded in a around 0 90.8%
if -2.59999999999999984e-5 < y < 1.49999999999999996e-19Initial program 95.5%
fma-define95.5%
sub-neg95.5%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 81.1%
Taylor expanded in z around 0 87.1%
associate-*r*100.0%
associate-*r*100.0%
distribute-lft-out100.0%
mul-1-neg100.0%
Simplified87.1%
Final simplification88.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -50.0) (not (<= y 130000000000.0))) (* x (pow z y)) (* x (exp (* a (- (- b) z))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -50.0) || !(y <= 130000000000.0)) {
tmp = x * pow(z, y);
} else {
tmp = x * exp((a * (-b - z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-50.0d0)) .or. (.not. (y <= 130000000000.0d0))) then
tmp = x * (z ** y)
else
tmp = x * exp((a * (-b - z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -50.0) || !(y <= 130000000000.0)) {
tmp = x * Math.pow(z, y);
} else {
tmp = x * Math.exp((a * (-b - z)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -50.0) or not (y <= 130000000000.0): tmp = x * math.pow(z, y) else: tmp = x * math.exp((a * (-b - z))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -50.0) || !(y <= 130000000000.0)) tmp = Float64(x * (z ^ y)); else tmp = Float64(x * exp(Float64(a * Float64(Float64(-b) - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -50.0) || ~((y <= 130000000000.0))) tmp = x * (z ^ y); else tmp = x * exp((a * (-b - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -50.0], N[Not[LessEqual[y, 130000000000.0]], $MachinePrecision]], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(a * N[((-b) - z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -50 \lor \neg \left(y \leq 130000000000\right):\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(\left(-b\right) - z\right)}\\
\end{array}
\end{array}
if y < -50 or 1.3e11 < y Initial program 100.0%
fma-define100.0%
sub-neg100.0%
log1p-define100.0%
Simplified100.0%
Taylor expanded in a around 0 91.1%
Taylor expanded in t around 0 76.6%
if -50 < y < 1.3e11Initial program 95.7%
fma-define95.7%
sub-neg95.7%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 79.6%
Taylor expanded in z around 0 85.3%
associate-*r*100.0%
associate-*r*100.0%
distribute-lft-out100.0%
mul-1-neg100.0%
Simplified85.3%
Final simplification81.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -0.13) (not (<= y 20000000000.0))) (* 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 <= -0.13) || !(y <= 20000000000.0)) {
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 <= (-0.13d0)) .or. (.not. (y <= 20000000000.0d0))) 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 <= -0.13) || !(y <= 20000000000.0)) {
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 <= -0.13) or not (y <= 20000000000.0): 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 <= -0.13) || !(y <= 20000000000.0)) 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 <= -0.13) || ~((y <= 20000000000.0))) 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, -0.13], N[Not[LessEqual[y, 20000000000.0]], $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 -0.13 \lor \neg \left(y \leq 20000000000\right):\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\
\end{array}
\end{array}
if y < -0.13 or 2e10 < y Initial program 100.0%
fma-define100.0%
sub-neg100.0%
log1p-define100.0%
Simplified100.0%
Taylor expanded in a around 0 91.1%
Taylor expanded in t around 0 76.6%
if -0.13 < y < 2e10Initial program 95.7%
fma-define95.7%
sub-neg95.7%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 79.6%
Taylor expanded in z around 0 79.6%
associate-*r*79.6%
mul-1-neg79.6%
Simplified79.6%
Final simplification78.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -8.8e-13) (not (<= y 1.5e-31))) (* 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 <= -8.8e-13) || !(y <= 1.5e-31)) {
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 <= (-8.8d-13)) .or. (.not. (y <= 1.5d-31))) 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 <= -8.8e-13) || !(y <= 1.5e-31)) {
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 <= -8.8e-13) or not (y <= 1.5e-31): 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 <= -8.8e-13) || !(y <= 1.5e-31)) 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 <= -8.8e-13) || ~((y <= 1.5e-31))) 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, -8.8e-13], N[Not[LessEqual[y, 1.5e-31]], $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 -8.8 \cdot 10^{-13} \lor \neg \left(y \leq 1.5 \cdot 10^{-31}\right):\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - a \cdot \left(z + b\right)\right)\\
\end{array}
\end{array}
if y < -8.79999999999999986e-13 or 1.49999999999999991e-31 < y Initial program 100.0%
fma-define100.0%
sub-neg100.0%
log1p-define100.0%
Simplified100.0%
Taylor expanded in a around 0 88.9%
Taylor expanded in t around 0 72.7%
if -8.79999999999999986e-13 < y < 1.49999999999999991e-31Initial program 95.4%
fma-define95.4%
sub-neg95.4%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 80.3%
Taylor expanded in z around 0 86.5%
associate-*r*100.0%
associate-*r*100.0%
distribute-lft-out100.0%
mul-1-neg100.0%
Simplified86.5%
Taylor expanded in a around 0 47.2%
mul-1-neg47.2%
unsub-neg47.2%
Simplified47.2%
Final simplification60.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= a -1.9e-6)
(* a (* x (- b)))
(if (<= a 4.9e-88)
(+ x (* x (* a b)))
(if (<= a 7.6e+219) (* b (* x (- a))) (* (* x t) (- y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.9e-6) {
tmp = a * (x * -b);
} else if (a <= 4.9e-88) {
tmp = x + (x * (a * b));
} else if (a <= 7.6e+219) {
tmp = b * (x * -a);
} 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 (a <= (-1.9d-6)) then
tmp = a * (x * -b)
else if (a <= 4.9d-88) then
tmp = x + (x * (a * b))
else if (a <= 7.6d+219) then
tmp = b * (x * -a)
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 (a <= -1.9e-6) {
tmp = a * (x * -b);
} else if (a <= 4.9e-88) {
tmp = x + (x * (a * b));
} else if (a <= 7.6e+219) {
tmp = b * (x * -a);
} else {
tmp = (x * t) * -y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.9e-6: tmp = a * (x * -b) elif a <= 4.9e-88: tmp = x + (x * (a * b)) elif a <= 7.6e+219: tmp = b * (x * -a) else: tmp = (x * t) * -y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.9e-6) tmp = Float64(a * Float64(x * Float64(-b))); elseif (a <= 4.9e-88) tmp = Float64(x + Float64(x * Float64(a * b))); elseif (a <= 7.6e+219) tmp = Float64(b * Float64(x * Float64(-a))); 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 (a <= -1.9e-6) tmp = a * (x * -b); elseif (a <= 4.9e-88) tmp = x + (x * (a * b)); elseif (a <= 7.6e+219) tmp = b * (x * -a); else tmp = (x * t) * -y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.9e-6], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.9e-88], N[(x + N[(x * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7.6e+219], N[(b * N[(x * (-a)), $MachinePrecision]), $MachinePrecision], N[(N[(x * t), $MachinePrecision] * (-y)), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.9 \cdot 10^{-6}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\mathbf{elif}\;a \leq 4.9 \cdot 10^{-88}:\\
\;\;\;\;x + x \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;a \leq 7.6 \cdot 10^{+219}:\\
\;\;\;\;b \cdot \left(x \cdot \left(-a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot t\right) \cdot \left(-y\right)\\
\end{array}
\end{array}
if a < -1.9e-6Initial program 94.5%
fma-define94.5%
sub-neg94.5%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 66.4%
Taylor expanded in z around 0 66.4%
associate-*r*66.4%
mul-1-neg66.4%
Simplified66.4%
Taylor expanded in a around 0 24.3%
mul-1-neg24.3%
unsub-neg24.3%
*-commutative24.3%
Simplified24.3%
Taylor expanded in a around inf 28.3%
if -1.9e-6 < a < 4.90000000000000028e-88Initial program 100.0%
fma-define100.0%
sub-neg100.0%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 51.3%
Taylor expanded in z around 0 51.3%
associate-*r*51.3%
mul-1-neg51.3%
Simplified51.3%
Taylor expanded in a around 0 36.9%
mul-1-neg36.9%
unsub-neg36.9%
*-commutative36.9%
Simplified36.9%
cancel-sign-sub-inv36.9%
add-sqr-sqrt17.9%
sqrt-unprod35.0%
sqr-neg35.0%
sqrt-unprod17.1%
add-sqr-sqrt35.7%
+-commutative35.7%
*-commutative35.7%
associate-*l*35.8%
*-commutative35.8%
Applied egg-rr35.8%
if 4.90000000000000028e-88 < a < 7.59999999999999992e219Initial program 98.5%
fma-define98.5%
sub-neg98.5%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 57.8%
Taylor expanded in z around 0 59.4%
associate-*r*59.4%
mul-1-neg59.4%
Simplified59.4%
Taylor expanded in a around 0 23.5%
mul-1-neg23.5%
unsub-neg23.5%
*-commutative23.5%
Simplified23.5%
Taylor expanded in a around inf 26.7%
associate-*r*29.6%
associate-*r*29.6%
*-commutative29.6%
associate-*r*29.6%
associate-*r*32.7%
mul-1-neg32.7%
Simplified32.7%
if 7.59999999999999992e219 < a Initial program 94.2%
Taylor expanded in z around 0 100.0%
associate-*r*100.0%
associate-*r*100.0%
distribute-lft-out100.0%
mul-1-neg100.0%
Simplified100.0%
Taylor expanded in t around inf 31.5%
associate-*r*31.5%
neg-mul-131.5%
Simplified31.5%
Taylor expanded in t around 0 14.7%
mul-1-neg14.7%
unsub-neg14.7%
associate-*r*14.7%
*-commutative14.7%
*-commutative14.7%
Simplified14.7%
Taylor expanded in y around inf 31.8%
mul-1-neg31.8%
associate-*r*37.2%
*-commutative37.2%
Simplified37.2%
Final simplification33.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= a -1.9e-6)
(* a (* x (- b)))
(if (<= a 6.5e-88)
(+ x (* t (* x y)))
(if (<= a 1.95e+221) (* b (* x (- a))) (* (* x t) (- y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.9e-6) {
tmp = a * (x * -b);
} else if (a <= 6.5e-88) {
tmp = x + (t * (x * y));
} else if (a <= 1.95e+221) {
tmp = b * (x * -a);
} 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 (a <= (-1.9d-6)) then
tmp = a * (x * -b)
else if (a <= 6.5d-88) then
tmp = x + (t * (x * y))
else if (a <= 1.95d+221) then
tmp = b * (x * -a)
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 (a <= -1.9e-6) {
tmp = a * (x * -b);
} else if (a <= 6.5e-88) {
tmp = x + (t * (x * y));
} else if (a <= 1.95e+221) {
tmp = b * (x * -a);
} else {
tmp = (x * t) * -y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.9e-6: tmp = a * (x * -b) elif a <= 6.5e-88: tmp = x + (t * (x * y)) elif a <= 1.95e+221: tmp = b * (x * -a) else: tmp = (x * t) * -y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.9e-6) tmp = Float64(a * Float64(x * Float64(-b))); elseif (a <= 6.5e-88) tmp = Float64(x + Float64(t * Float64(x * y))); elseif (a <= 1.95e+221) tmp = Float64(b * Float64(x * Float64(-a))); 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 (a <= -1.9e-6) tmp = a * (x * -b); elseif (a <= 6.5e-88) tmp = x + (t * (x * y)); elseif (a <= 1.95e+221) tmp = b * (x * -a); else tmp = (x * t) * -y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.9e-6], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.5e-88], N[(x + N[(t * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.95e+221], N[(b * N[(x * (-a)), $MachinePrecision]), $MachinePrecision], N[(N[(x * t), $MachinePrecision] * (-y)), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.9 \cdot 10^{-6}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\mathbf{elif}\;a \leq 6.5 \cdot 10^{-88}:\\
\;\;\;\;x + t \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;a \leq 1.95 \cdot 10^{+221}:\\
\;\;\;\;b \cdot \left(x \cdot \left(-a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot t\right) \cdot \left(-y\right)\\
\end{array}
\end{array}
if a < -1.9e-6Initial program 94.5%
fma-define94.5%
sub-neg94.5%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 66.4%
Taylor expanded in z around 0 66.4%
associate-*r*66.4%
mul-1-neg66.4%
Simplified66.4%
Taylor expanded in a around 0 24.3%
mul-1-neg24.3%
unsub-neg24.3%
*-commutative24.3%
Simplified24.3%
Taylor expanded in a around inf 28.3%
if -1.9e-6 < a < 6.50000000000000006e-88Initial program 100.0%
Taylor expanded in z around 0 100.0%
associate-*r*100.0%
associate-*r*100.0%
distribute-lft-out100.0%
mul-1-neg100.0%
Simplified100.0%
Taylor expanded in t around inf 71.0%
associate-*r*71.0%
neg-mul-171.0%
Simplified71.0%
Taylor expanded in t around 0 40.4%
associate-*r*40.4%
mul-1-neg40.4%
Simplified40.4%
neg-sub040.4%
sub-neg40.4%
add-sqr-sqrt19.0%
sqrt-unprod36.1%
sqr-neg36.1%
sqrt-unprod17.4%
add-sqr-sqrt35.4%
Applied egg-rr35.4%
+-lft-identity35.4%
Simplified35.4%
if 6.50000000000000006e-88 < a < 1.95e221Initial program 98.5%
fma-define98.5%
sub-neg98.5%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 57.8%
Taylor expanded in z around 0 59.4%
associate-*r*59.4%
mul-1-neg59.4%
Simplified59.4%
Taylor expanded in a around 0 23.5%
mul-1-neg23.5%
unsub-neg23.5%
*-commutative23.5%
Simplified23.5%
Taylor expanded in a around inf 26.7%
associate-*r*29.6%
associate-*r*29.6%
*-commutative29.6%
associate-*r*29.6%
associate-*r*32.7%
mul-1-neg32.7%
Simplified32.7%
if 1.95e221 < a Initial program 94.2%
Taylor expanded in z around 0 100.0%
associate-*r*100.0%
associate-*r*100.0%
distribute-lft-out100.0%
mul-1-neg100.0%
Simplified100.0%
Taylor expanded in t around inf 31.5%
associate-*r*31.5%
neg-mul-131.5%
Simplified31.5%
Taylor expanded in t around 0 14.7%
mul-1-neg14.7%
unsub-neg14.7%
associate-*r*14.7%
*-commutative14.7%
*-commutative14.7%
Simplified14.7%
Taylor expanded in y around inf 31.8%
mul-1-neg31.8%
associate-*r*37.2%
*-commutative37.2%
Simplified37.2%
Final simplification33.0%
(FPCore (x y z t a b) :precision binary64 (if (<= a -1.2e-7) (* a (* x (- b))) (if (<= a 6e-88) x (if (<= a 3e+215) (* b (* x (- a))) (* (* x t) (- y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.2e-7) {
tmp = a * (x * -b);
} else if (a <= 6e-88) {
tmp = x;
} else if (a <= 3e+215) {
tmp = b * (x * -a);
} 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 (a <= (-1.2d-7)) then
tmp = a * (x * -b)
else if (a <= 6d-88) then
tmp = x
else if (a <= 3d+215) then
tmp = b * (x * -a)
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 (a <= -1.2e-7) {
tmp = a * (x * -b);
} else if (a <= 6e-88) {
tmp = x;
} else if (a <= 3e+215) {
tmp = b * (x * -a);
} else {
tmp = (x * t) * -y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.2e-7: tmp = a * (x * -b) elif a <= 6e-88: tmp = x elif a <= 3e+215: tmp = b * (x * -a) else: tmp = (x * t) * -y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.2e-7) tmp = Float64(a * Float64(x * Float64(-b))); elseif (a <= 6e-88) tmp = x; elseif (a <= 3e+215) tmp = Float64(b * Float64(x * Float64(-a))); 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 (a <= -1.2e-7) tmp = a * (x * -b); elseif (a <= 6e-88) tmp = x; elseif (a <= 3e+215) tmp = b * (x * -a); else tmp = (x * t) * -y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.2e-7], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6e-88], x, If[LessEqual[a, 3e+215], N[(b * N[(x * (-a)), $MachinePrecision]), $MachinePrecision], N[(N[(x * t), $MachinePrecision] * (-y)), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.2 \cdot 10^{-7}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\mathbf{elif}\;a \leq 6 \cdot 10^{-88}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 3 \cdot 10^{+215}:\\
\;\;\;\;b \cdot \left(x \cdot \left(-a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot t\right) \cdot \left(-y\right)\\
\end{array}
\end{array}
if a < -1.19999999999999989e-7Initial program 94.5%
fma-define94.5%
sub-neg94.5%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 66.4%
Taylor expanded in z around 0 66.4%
associate-*r*66.4%
mul-1-neg66.4%
Simplified66.4%
Taylor expanded in a around 0 24.3%
mul-1-neg24.3%
unsub-neg24.3%
*-commutative24.3%
Simplified24.3%
Taylor expanded in a around inf 28.3%
if -1.19999999999999989e-7 < a < 5.9999999999999999e-88Initial program 100.0%
fma-define100.0%
sub-neg100.0%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 51.3%
Taylor expanded in a around 0 34.4%
if 5.9999999999999999e-88 < a < 2.9999999999999999e215Initial program 98.5%
fma-define98.5%
sub-neg98.5%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 57.8%
Taylor expanded in z around 0 59.4%
associate-*r*59.4%
mul-1-neg59.4%
Simplified59.4%
Taylor expanded in a around 0 23.5%
mul-1-neg23.5%
unsub-neg23.5%
*-commutative23.5%
Simplified23.5%
Taylor expanded in a around inf 26.7%
associate-*r*29.6%
associate-*r*29.6%
*-commutative29.6%
associate-*r*29.6%
associate-*r*32.7%
mul-1-neg32.7%
Simplified32.7%
if 2.9999999999999999e215 < a Initial program 94.2%
Taylor expanded in z around 0 100.0%
associate-*r*100.0%
associate-*r*100.0%
distribute-lft-out100.0%
mul-1-neg100.0%
Simplified100.0%
Taylor expanded in t around inf 31.5%
associate-*r*31.5%
neg-mul-131.5%
Simplified31.5%
Taylor expanded in t around 0 14.7%
mul-1-neg14.7%
unsub-neg14.7%
associate-*r*14.7%
*-commutative14.7%
*-commutative14.7%
Simplified14.7%
Taylor expanded in y around inf 31.8%
mul-1-neg31.8%
associate-*r*37.2%
*-commutative37.2%
Simplified37.2%
Final simplification32.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= a -1.6e-6)
(* x (* a (- b)))
(if (<= a 4.4e-88)
x
(if (<= a 1.4e+221) (* b (* x (- a))) (* (* x t) (- y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.6e-6) {
tmp = x * (a * -b);
} else if (a <= 4.4e-88) {
tmp = x;
} else if (a <= 1.4e+221) {
tmp = b * (x * -a);
} 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 (a <= (-1.6d-6)) then
tmp = x * (a * -b)
else if (a <= 4.4d-88) then
tmp = x
else if (a <= 1.4d+221) then
tmp = b * (x * -a)
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 (a <= -1.6e-6) {
tmp = x * (a * -b);
} else if (a <= 4.4e-88) {
tmp = x;
} else if (a <= 1.4e+221) {
tmp = b * (x * -a);
} else {
tmp = (x * t) * -y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.6e-6: tmp = x * (a * -b) elif a <= 4.4e-88: tmp = x elif a <= 1.4e+221: tmp = b * (x * -a) else: tmp = (x * t) * -y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.6e-6) tmp = Float64(x * Float64(a * Float64(-b))); elseif (a <= 4.4e-88) tmp = x; elseif (a <= 1.4e+221) tmp = Float64(b * Float64(x * Float64(-a))); 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 (a <= -1.6e-6) tmp = x * (a * -b); elseif (a <= 4.4e-88) tmp = x; elseif (a <= 1.4e+221) tmp = b * (x * -a); else tmp = (x * t) * -y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.6e-6], N[(x * N[(a * (-b)), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.4e-88], x, If[LessEqual[a, 1.4e+221], N[(b * N[(x * (-a)), $MachinePrecision]), $MachinePrecision], N[(N[(x * t), $MachinePrecision] * (-y)), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.6 \cdot 10^{-6}:\\
\;\;\;\;x \cdot \left(a \cdot \left(-b\right)\right)\\
\mathbf{elif}\;a \leq 4.4 \cdot 10^{-88}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.4 \cdot 10^{+221}:\\
\;\;\;\;b \cdot \left(x \cdot \left(-a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot t\right) \cdot \left(-y\right)\\
\end{array}
\end{array}
if a < -1.5999999999999999e-6Initial program 94.5%
fma-define94.5%
sub-neg94.5%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 66.4%
Taylor expanded in z around 0 66.4%
associate-*r*66.4%
mul-1-neg66.4%
Simplified66.4%
Taylor expanded in a around 0 24.3%
mul-1-neg24.3%
unsub-neg24.3%
*-commutative24.3%
Simplified24.3%
Taylor expanded in a around inf 28.3%
associate-*r*25.6%
associate-*r*25.6%
*-commutative25.6%
associate-*r*25.6%
mul-1-neg25.6%
Simplified25.6%
if -1.5999999999999999e-6 < a < 4.4000000000000001e-88Initial program 100.0%
fma-define100.0%
sub-neg100.0%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 51.3%
Taylor expanded in a around 0 34.4%
if 4.4000000000000001e-88 < a < 1.39999999999999994e221Initial program 98.5%
fma-define98.5%
sub-neg98.5%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 57.8%
Taylor expanded in z around 0 59.4%
associate-*r*59.4%
mul-1-neg59.4%
Simplified59.4%
Taylor expanded in a around 0 23.5%
mul-1-neg23.5%
unsub-neg23.5%
*-commutative23.5%
Simplified23.5%
Taylor expanded in a around inf 26.7%
associate-*r*29.6%
associate-*r*29.6%
*-commutative29.6%
associate-*r*29.6%
associate-*r*32.7%
mul-1-neg32.7%
Simplified32.7%
if 1.39999999999999994e221 < a Initial program 94.2%
Taylor expanded in z around 0 100.0%
associate-*r*100.0%
associate-*r*100.0%
distribute-lft-out100.0%
mul-1-neg100.0%
Simplified100.0%
Taylor expanded in t around inf 31.5%
associate-*r*31.5%
neg-mul-131.5%
Simplified31.5%
Taylor expanded in t around 0 14.7%
mul-1-neg14.7%
unsub-neg14.7%
associate-*r*14.7%
*-commutative14.7%
*-commutative14.7%
Simplified14.7%
Taylor expanded in y around inf 31.8%
mul-1-neg31.8%
associate-*r*37.2%
*-commutative37.2%
Simplified37.2%
Final simplification31.8%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1.4e+109) (* b (* x (- a))) (if (<= y 6.2e-9) (- x (* x (* a b))) (* a (* x (- b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.4e+109) {
tmp = b * (x * -a);
} else if (y <= 6.2e-9) {
tmp = x - (x * (a * b));
} 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 <= (-1.4d+109)) then
tmp = b * (x * -a)
else if (y <= 6.2d-9) then
tmp = x - (x * (a * b))
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 <= -1.4e+109) {
tmp = b * (x * -a);
} else if (y <= 6.2e-9) {
tmp = x - (x * (a * b));
} else {
tmp = a * (x * -b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.4e+109: tmp = b * (x * -a) elif y <= 6.2e-9: tmp = x - (x * (a * b)) else: tmp = a * (x * -b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.4e+109) tmp = Float64(b * Float64(x * Float64(-a))); elseif (y <= 6.2e-9) tmp = Float64(x - Float64(x * Float64(a * b))); 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 <= -1.4e+109) tmp = b * (x * -a); elseif (y <= 6.2e-9) tmp = x - (x * (a * b)); else tmp = a * (x * -b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.4e+109], N[(b * N[(x * (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.2e-9], N[(x - N[(x * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.4 \cdot 10^{+109}:\\
\;\;\;\;b \cdot \left(x \cdot \left(-a\right)\right)\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{-9}:\\
\;\;\;\;x - x \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\end{array}
\end{array}
if y < -1.4000000000000001e109Initial program 100.0%
fma-define100.0%
sub-neg100.0%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 31.7%
Taylor expanded in z around 0 34.3%
associate-*r*34.3%
mul-1-neg34.3%
Simplified34.3%
Taylor expanded in a around 0 19.0%
mul-1-neg19.0%
unsub-neg19.0%
*-commutative19.0%
Simplified19.0%
Taylor expanded in a around inf 26.7%
associate-*r*29.0%
associate-*r*29.0%
*-commutative29.0%
associate-*r*29.0%
associate-*r*34.1%
mul-1-neg34.1%
Simplified34.1%
if -1.4000000000000001e109 < y < 6.2000000000000001e-9Initial program 96.3%
fma-define96.3%
sub-neg96.3%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 75.1%
Taylor expanded in z around 0 75.1%
associate-*r*75.1%
mul-1-neg75.1%
Simplified75.1%
Taylor expanded in a around 0 39.7%
mul-1-neg39.7%
unsub-neg39.7%
associate-*r*40.9%
*-commutative40.9%
Simplified40.9%
if 6.2000000000000001e-9 < y Initial program 100.0%
fma-define100.0%
sub-neg100.0%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 35.6%
Taylor expanded in z around 0 35.6%
associate-*r*35.6%
mul-1-neg35.6%
Simplified35.6%
Taylor expanded in a around 0 7.3%
mul-1-neg7.3%
unsub-neg7.3%
*-commutative7.3%
Simplified7.3%
Taylor expanded in a around inf 22.4%
Final simplification35.2%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1.25e+109) (* b (* x (- a))) (if (<= y 5e-10) (- x (* a (* x b))) (* a (* x (- b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.25e+109) {
tmp = b * (x * -a);
} else if (y <= 5e-10) {
tmp = x - (a * (x * b));
} 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 <= (-1.25d+109)) then
tmp = b * (x * -a)
else if (y <= 5d-10) then
tmp = x - (a * (x * b))
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 <= -1.25e+109) {
tmp = b * (x * -a);
} else if (y <= 5e-10) {
tmp = x - (a * (x * b));
} else {
tmp = a * (x * -b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.25e+109: tmp = b * (x * -a) elif y <= 5e-10: tmp = x - (a * (x * b)) else: tmp = a * (x * -b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.25e+109) tmp = Float64(b * Float64(x * Float64(-a))); elseif (y <= 5e-10) tmp = Float64(x - Float64(a * Float64(x * b))); 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 <= -1.25e+109) tmp = b * (x * -a); elseif (y <= 5e-10) tmp = x - (a * (x * b)); else tmp = a * (x * -b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.25e+109], N[(b * N[(x * (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5e-10], N[(x - N[(a * N[(x * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.25 \cdot 10^{+109}:\\
\;\;\;\;b \cdot \left(x \cdot \left(-a\right)\right)\\
\mathbf{elif}\;y \leq 5 \cdot 10^{-10}:\\
\;\;\;\;x - a \cdot \left(x \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\end{array}
\end{array}
if y < -1.25e109Initial program 100.0%
fma-define100.0%
sub-neg100.0%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 31.7%
Taylor expanded in z around 0 34.3%
associate-*r*34.3%
mul-1-neg34.3%
Simplified34.3%
Taylor expanded in a around 0 19.0%
mul-1-neg19.0%
unsub-neg19.0%
*-commutative19.0%
Simplified19.0%
Taylor expanded in a around inf 26.7%
associate-*r*29.0%
associate-*r*29.0%
*-commutative29.0%
associate-*r*29.0%
associate-*r*34.1%
mul-1-neg34.1%
Simplified34.1%
if -1.25e109 < y < 5.00000000000000031e-10Initial program 96.3%
fma-define96.3%
sub-neg96.3%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 75.1%
Taylor expanded in z around 0 75.1%
associate-*r*75.1%
mul-1-neg75.1%
Simplified75.1%
Taylor expanded in a around 0 39.7%
mul-1-neg39.7%
unsub-neg39.7%
*-commutative39.7%
Simplified39.7%
if 5.00000000000000031e-10 < y Initial program 100.0%
fma-define100.0%
sub-neg100.0%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 35.6%
Taylor expanded in z around 0 35.6%
associate-*r*35.6%
mul-1-neg35.6%
Simplified35.6%
Taylor expanded in a around 0 7.3%
mul-1-neg7.3%
unsub-neg7.3%
*-commutative7.3%
Simplified7.3%
Taylor expanded in a around inf 22.4%
Final simplification34.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -2.2e-12) (not (<= a 7.5e-83))) (* x (* a (- b))) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -2.2e-12) || !(a <= 7.5e-83)) {
tmp = x * (a * -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 ((a <= (-2.2d-12)) .or. (.not. (a <= 7.5d-83))) then
tmp = x * (a * -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 ((a <= -2.2e-12) || !(a <= 7.5e-83)) {
tmp = x * (a * -b);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -2.2e-12) or not (a <= 7.5e-83): tmp = x * (a * -b) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -2.2e-12) || !(a <= 7.5e-83)) tmp = Float64(x * Float64(a * Float64(-b))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -2.2e-12) || ~((a <= 7.5e-83))) tmp = x * (a * -b); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -2.2e-12], N[Not[LessEqual[a, 7.5e-83]], $MachinePrecision]], N[(x * N[(a * (-b)), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.2 \cdot 10^{-12} \lor \neg \left(a \leq 7.5 \cdot 10^{-83}\right):\\
\;\;\;\;x \cdot \left(a \cdot \left(-b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -2.19999999999999992e-12 or 7.4999999999999997e-83 < a Initial program 96.1%
fma-define96.1%
sub-neg96.1%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 63.8%
Taylor expanded in z around 0 64.4%
associate-*r*64.4%
mul-1-neg64.4%
Simplified64.4%
Taylor expanded in a around 0 22.3%
mul-1-neg22.3%
unsub-neg22.3%
*-commutative22.3%
Simplified22.3%
Taylor expanded in a around inf 26.8%
associate-*r*26.1%
associate-*r*26.1%
*-commutative26.1%
associate-*r*26.1%
mul-1-neg26.1%
Simplified26.1%
if -2.19999999999999992e-12 < a < 7.4999999999999997e-83Initial program 100.0%
fma-define100.0%
sub-neg100.0%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 51.7%
Taylor expanded in a around 0 34.2%
Final simplification29.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -1.46e+48) (not (<= a 1.3e-71))) (* (* x t) (- y)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.46e+48) || !(a <= 1.3e-71)) {
tmp = (x * t) * -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 ((a <= (-1.46d+48)) .or. (.not. (a <= 1.3d-71))) then
tmp = (x * t) * -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 ((a <= -1.46e+48) || !(a <= 1.3e-71)) {
tmp = (x * t) * -y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -1.46e+48) or not (a <= 1.3e-71): tmp = (x * t) * -y else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -1.46e+48) || !(a <= 1.3e-71)) tmp = Float64(Float64(x * t) * Float64(-y)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -1.46e+48) || ~((a <= 1.3e-71))) tmp = (x * t) * -y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1.46e+48], N[Not[LessEqual[a, 1.3e-71]], $MachinePrecision]], N[(N[(x * t), $MachinePrecision] * (-y)), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.46 \cdot 10^{+48} \lor \neg \left(a \leq 1.3 \cdot 10^{-71}\right):\\
\;\;\;\;\left(x \cdot t\right) \cdot \left(-y\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.46e48 or 1.2999999999999999e-71 < a Initial program 95.9%
Taylor expanded in z around 0 100.0%
associate-*r*100.0%
associate-*r*100.0%
distribute-lft-out100.0%
mul-1-neg100.0%
Simplified100.0%
Taylor expanded in t around inf 43.6%
associate-*r*43.6%
neg-mul-143.6%
Simplified43.6%
Taylor expanded in t around 0 14.2%
mul-1-neg14.2%
unsub-neg14.2%
associate-*r*12.9%
*-commutative12.9%
*-commutative12.9%
Simplified12.9%
Taylor expanded in y around inf 19.4%
mul-1-neg19.4%
associate-*r*18.7%
*-commutative18.7%
Simplified18.7%
if -1.46e48 < a < 1.2999999999999999e-71Initial program 100.0%
fma-define100.0%
sub-neg100.0%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 50.9%
Taylor expanded in a around 0 33.0%
Final simplification25.2%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1.2e+25) (* x (* y (- t))) (if (<= y 0.00017) x (* (* x t) (- y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.2e+25) {
tmp = x * (y * -t);
} else if (y <= 0.00017) {
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.2d+25)) then
tmp = x * (y * -t)
else if (y <= 0.00017d0) 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.2e+25) {
tmp = x * (y * -t);
} else if (y <= 0.00017) {
tmp = x;
} else {
tmp = (x * t) * -y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.2e+25: tmp = x * (y * -t) elif y <= 0.00017: tmp = x else: tmp = (x * t) * -y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.2e+25) tmp = Float64(x * Float64(y * Float64(-t))); elseif (y <= 0.00017) tmp = x; 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 <= -1.2e+25) tmp = x * (y * -t); elseif (y <= 0.00017) tmp = x; else tmp = (x * t) * -y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.2e+25], N[(x * N[(y * (-t)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.00017], x, N[(N[(x * t), $MachinePrecision] * (-y)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.2 \cdot 10^{+25}:\\
\;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\
\mathbf{elif}\;y \leq 0.00017:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot t\right) \cdot \left(-y\right)\\
\end{array}
\end{array}
if y < -1.19999999999999998e25Initial program 100.0%
Taylor expanded in z around 0 100.0%
associate-*r*100.0%
associate-*r*100.0%
distribute-lft-out100.0%
mul-1-neg100.0%
Simplified100.0%
Taylor expanded in t around inf 56.4%
associate-*r*56.4%
neg-mul-156.4%
Simplified56.4%
Taylor expanded in t around 0 24.6%
mul-1-neg24.6%
unsub-neg24.6%
associate-*r*19.9%
*-commutative19.9%
*-commutative19.9%
Simplified19.9%
Taylor expanded in y around inf 24.4%
mul-1-neg24.4%
associate-*r*19.6%
*-commutative19.6%
associate-*r*26.1%
distribute-rgt-neg-in26.1%
distribute-rgt-neg-in26.1%
Simplified26.1%
if -1.19999999999999998e25 < y < 1.7e-4Initial program 95.7%
fma-define95.7%
sub-neg95.7%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 78.9%
Taylor expanded in a around 0 31.5%
if 1.7e-4 < y Initial program 100.0%
Taylor expanded in z around 0 100.0%
associate-*r*100.0%
associate-*r*100.0%
distribute-lft-out100.0%
mul-1-neg100.0%
Simplified100.0%
Taylor expanded in t around inf 61.8%
associate-*r*61.8%
neg-mul-161.8%
Simplified61.8%
Taylor expanded in t around 0 8.7%
mul-1-neg8.7%
unsub-neg8.7%
associate-*r*8.8%
*-commutative8.8%
*-commutative8.8%
Simplified8.8%
Taylor expanded in y around inf 9.0%
mul-1-neg9.0%
associate-*r*14.9%
*-commutative14.9%
Simplified14.9%
Final simplification26.1%
(FPCore (x y z t a b) :precision binary64 (if (<= y 6.6e-8) (* x (- 1.0 (* a (+ z b)))) (* a (* x (- b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 6.6e-8) {
tmp = x * (1.0 - (a * (z + b)));
} 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 <= 6.6d-8) then
tmp = x * (1.0d0 - (a * (z + b)))
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 <= 6.6e-8) {
tmp = x * (1.0 - (a * (z + b)));
} else {
tmp = a * (x * -b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 6.6e-8: tmp = x * (1.0 - (a * (z + b))) else: tmp = a * (x * -b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 6.6e-8) tmp = Float64(x * Float64(1.0 - Float64(a * Float64(z + b)))); 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 <= 6.6e-8) tmp = x * (1.0 - (a * (z + b))); else tmp = a * (x * -b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 6.6e-8], N[(x * N[(1.0 - N[(a * N[(z + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 6.6 \cdot 10^{-8}:\\
\;\;\;\;x \cdot \left(1 - a \cdot \left(z + b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\end{array}
\end{array}
if y < 6.59999999999999954e-8Initial program 97.0%
fma-define97.0%
sub-neg97.0%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 66.5%
Taylor expanded in z around 0 71.5%
associate-*r*100.0%
associate-*r*100.0%
distribute-lft-out100.0%
mul-1-neg100.0%
Simplified71.5%
Taylor expanded in a around 0 38.9%
mul-1-neg38.9%
unsub-neg38.9%
Simplified38.9%
if 6.59999999999999954e-8 < y Initial program 100.0%
fma-define100.0%
sub-neg100.0%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 35.6%
Taylor expanded in z around 0 35.6%
associate-*r*35.6%
mul-1-neg35.6%
Simplified35.6%
Taylor expanded in a around 0 7.3%
mul-1-neg7.3%
unsub-neg7.3%
*-commutative7.3%
Simplified7.3%
Taylor expanded in a around inf 22.4%
Final simplification34.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.8%
fma-define97.8%
sub-neg97.8%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 58.6%
Taylor expanded in a around 0 18.3%
herbie shell --seed 2024116
(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))))))