
(FPCore (x y z t a b) :precision binary64 (* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b))));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x * exp(((y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x * Math.exp(((y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b))));
}
def code(x, y, z, t, a, b): return x * math.exp(((y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b))))
function code(x, y, z, t, a, b) return Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))))) end
function tmp = code(x, y, z, t, a, b) tmp = x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b)))); end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b))));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x * exp(((y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x * Math.exp(((y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b))));
}
def code(x, y, z, t, a, b): return x * math.exp(((y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b))))
function code(x, y, z, t, a, b) return Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))))) end
function tmp = code(x, y, z, t, a, b) tmp = x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b)))); end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (- (log z) t))))
(if (<= (+ t_1 (* a (- (log (- 1.0 z)) b))) INFINITY)
(* x (exp (- t_1 (* a (+ z b)))))
(+ x (* b (- (* 0.5 (* (pow a 2.0) (* x b))) (* x a)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (log(z) - t);
double tmp;
if ((t_1 + (a * (log((1.0 - z)) - b))) <= ((double) INFINITY)) {
tmp = x * exp((t_1 - (a * (z + b))));
} else {
tmp = x + (b * ((0.5 * (pow(a, 2.0) * (x * b))) - (x * a)));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (Math.log(z) - t);
double tmp;
if ((t_1 + (a * (Math.log((1.0 - z)) - b))) <= Double.POSITIVE_INFINITY) {
tmp = x * Math.exp((t_1 - (a * (z + b))));
} else {
tmp = x + (b * ((0.5 * (Math.pow(a, 2.0) * (x * b))) - (x * a)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * (math.log(z) - t) tmp = 0 if (t_1 + (a * (math.log((1.0 - z)) - b))) <= math.inf: tmp = x * math.exp((t_1 - (a * (z + b)))) else: tmp = x + (b * ((0.5 * (math.pow(a, 2.0) * (x * b))) - (x * a))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(log(z) - t)) tmp = 0.0 if (Float64(t_1 + Float64(a * Float64(log(Float64(1.0 - z)) - b))) <= Inf) tmp = Float64(x * exp(Float64(t_1 - Float64(a * Float64(z + b))))); else tmp = Float64(x + Float64(b * Float64(Float64(0.5 * Float64((a ^ 2.0) * Float64(x * b))) - Float64(x * a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y * (log(z) - t); tmp = 0.0; if ((t_1 + (a * (log((1.0 - z)) - b))) <= Inf) tmp = x * exp((t_1 - (a * (z + b)))); else tmp = x + (b * ((0.5 * ((a ^ 2.0) * (x * b))) - (x * a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$1 + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(x * N[Exp[N[(t$95$1 - N[(a * N[(z + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x + N[(b * N[(N[(0.5 * N[(N[Power[a, 2.0], $MachinePrecision] * N[(x * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(\log z - t\right)\\
\mathbf{if}\;t\_1 + a \cdot \left(\log \left(1 - z\right) - b\right) \leq \infty:\\
\;\;\;\;x \cdot e^{t\_1 - a \cdot \left(z + b\right)}\\
\mathbf{else}:\\
\;\;\;\;x + b \cdot \left(0.5 \cdot \left({a}^{2} \cdot \left(x \cdot b\right)\right) - x \cdot a\right)\\
\end{array}
\end{array}
if (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < +inf.0Initial program 97.2%
Taylor expanded in z around 0 100.0%
+-commutative100.0%
associate-*r*100.0%
associate-*r*100.0%
distribute-lft-out100.0%
mul-1-neg100.0%
Simplified100.0%
if +inf.0 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 0.0%
Taylor expanded in z around 0 0.0%
+-commutative0.0%
associate-*r*0.0%
associate-*r*0.0%
distribute-lft-out0.0%
mul-1-neg0.0%
Simplified0.0%
Taylor expanded in b around inf 57.8%
mul-1-neg57.8%
distribute-lft-neg-out57.8%
*-commutative57.8%
Simplified57.8%
Taylor expanded in b around 0 85.9%
Final simplification99.6%
(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 94.5%
fma-define96.1%
sub-neg96.1%
log1p-define98.8%
Simplified98.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -5e-11) (not (<= y 4.1e+17))) (* x (pow (/ z (exp t)) y)) (* x (exp (* a (- (- z) b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -5e-11) || !(y <= 4.1e+17)) {
tmp = x * pow((z / exp(t)), y);
} else {
tmp = x * exp((a * (-z - b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-5d-11)) .or. (.not. (y <= 4.1d+17))) then
tmp = x * ((z / exp(t)) ** y)
else
tmp = x * exp((a * (-z - b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -5e-11) || !(y <= 4.1e+17)) {
tmp = x * Math.pow((z / Math.exp(t)), y);
} else {
tmp = x * Math.exp((a * (-z - b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -5e-11) or not (y <= 4.1e+17): tmp = x * math.pow((z / math.exp(t)), y) else: tmp = x * math.exp((a * (-z - b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -5e-11) || !(y <= 4.1e+17)) tmp = Float64(x * (Float64(z / exp(t)) ^ y)); else tmp = Float64(x * exp(Float64(a * Float64(Float64(-z) - b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -5e-11) || ~((y <= 4.1e+17))) tmp = x * ((z / exp(t)) ^ y); else tmp = x * exp((a * (-z - b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -5e-11], N[Not[LessEqual[y, 4.1e+17]], $MachinePrecision]], N[(x * N[Power[N[(z / N[Exp[t], $MachinePrecision]), $MachinePrecision], y], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(a * N[((-z) - b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5 \cdot 10^{-11} \lor \neg \left(y \leq 4.1 \cdot 10^{+17}\right):\\
\;\;\;\;x \cdot {\left(\frac{z}{e^{t}}\right)}^{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(\left(-z\right) - b\right)}\\
\end{array}
\end{array}
if y < -5.00000000000000018e-11 or 4.1e17 < y Initial program 94.1%
fma-define97.5%
sub-neg97.5%
log1p-define97.5%
Simplified97.5%
Taylor expanded in a around 0 87.6%
pow187.6%
*-commutative87.6%
exp-prod87.6%
exp-diff87.6%
add-exp-log87.6%
Applied egg-rr87.6%
unpow187.6%
Simplified87.6%
if -5.00000000000000018e-11 < y < 4.1e17Initial program 94.9%
Taylor expanded in z around 0 100.0%
+-commutative100.0%
associate-*r*100.0%
associate-*r*100.0%
distribute-lft-out100.0%
mul-1-neg100.0%
Simplified100.0%
Taylor expanded in y around 0 90.8%
associate-*r*90.8%
neg-mul-190.8%
*-commutative90.8%
Simplified90.8%
Final simplification89.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -0.052) (not (<= y 4.5e+134))) (* x (pow z y)) (* x (exp (* a (- (- z) b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -0.052) || !(y <= 4.5e+134)) {
tmp = x * pow(z, y);
} else {
tmp = x * exp((a * (-z - b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-0.052d0)) .or. (.not. (y <= 4.5d+134))) then
tmp = x * (z ** y)
else
tmp = x * exp((a * (-z - b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -0.052) || !(y <= 4.5e+134)) {
tmp = x * Math.pow(z, y);
} else {
tmp = x * Math.exp((a * (-z - b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -0.052) or not (y <= 4.5e+134): tmp = x * math.pow(z, y) else: tmp = x * math.exp((a * (-z - b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -0.052) || !(y <= 4.5e+134)) tmp = Float64(x * (z ^ y)); else tmp = Float64(x * exp(Float64(a * Float64(Float64(-z) - b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -0.052) || ~((y <= 4.5e+134))) tmp = x * (z ^ y); else tmp = x * exp((a * (-z - b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -0.052], N[Not[LessEqual[y, 4.5e+134]], $MachinePrecision]], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(a * N[((-z) - b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.052 \lor \neg \left(y \leq 4.5 \cdot 10^{+134}\right):\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(\left(-z\right) - b\right)}\\
\end{array}
\end{array}
if y < -0.0519999999999999976 or 4.4999999999999997e134 < y Initial program 93.6%
fma-define96.8%
sub-neg96.8%
log1p-define96.8%
Simplified96.8%
Taylor expanded in a around 0 90.5%
Taylor expanded in t around 0 75.8%
if -0.0519999999999999976 < y < 4.4999999999999997e134Initial program 95.1%
Taylor expanded in z around 0 99.4%
+-commutative99.4%
associate-*r*99.4%
associate-*r*99.4%
distribute-lft-out99.4%
mul-1-neg99.4%
Simplified99.4%
Taylor expanded in y around 0 86.2%
associate-*r*86.2%
neg-mul-186.2%
*-commutative86.2%
Simplified86.2%
Final simplification82.4%
(FPCore (x y z t a b) :precision binary64 (if (<= y -0.048) (* x (pow (/ z (+ t 1.0)) y)) (if (<= y 6.9e+134) (* x (exp (* a (- (- z) b)))) (* x (pow z y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -0.048) {
tmp = x * pow((z / (t + 1.0)), y);
} else if (y <= 6.9e+134) {
tmp = x * exp((a * (-z - b)));
} else {
tmp = x * pow(z, y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-0.048d0)) then
tmp = x * ((z / (t + 1.0d0)) ** y)
else if (y <= 6.9d+134) then
tmp = x * exp((a * (-z - b)))
else
tmp = x * (z ** y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -0.048) {
tmp = x * Math.pow((z / (t + 1.0)), y);
} else if (y <= 6.9e+134) {
tmp = x * Math.exp((a * (-z - b)));
} else {
tmp = x * Math.pow(z, y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -0.048: tmp = x * math.pow((z / (t + 1.0)), y) elif y <= 6.9e+134: tmp = x * math.exp((a * (-z - b))) else: tmp = x * math.pow(z, y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -0.048) tmp = Float64(x * (Float64(z / Float64(t + 1.0)) ^ y)); elseif (y <= 6.9e+134) tmp = Float64(x * exp(Float64(a * Float64(Float64(-z) - b)))); else tmp = Float64(x * (z ^ y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -0.048) tmp = x * ((z / (t + 1.0)) ^ y); elseif (y <= 6.9e+134) tmp = x * exp((a * (-z - b))); else tmp = x * (z ^ y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -0.048], N[(x * N[Power[N[(z / N[(t + 1.0), $MachinePrecision]), $MachinePrecision], y], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.9e+134], N[(x * N[Exp[N[(a * N[((-z) - b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.048:\\
\;\;\;\;x \cdot {\left(\frac{z}{t + 1}\right)}^{y}\\
\mathbf{elif}\;y \leq 6.9 \cdot 10^{+134}:\\
\;\;\;\;x \cdot e^{a \cdot \left(\left(-z\right) - b\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot {z}^{y}\\
\end{array}
\end{array}
if y < -0.048000000000000001Initial program 96.6%
fma-define98.3%
sub-neg98.3%
log1p-define98.3%
Simplified98.3%
Taylor expanded in a around 0 93.4%
pow193.4%
*-commutative93.4%
exp-prod93.4%
exp-diff93.4%
add-exp-log93.4%
Applied egg-rr93.4%
unpow193.4%
Simplified93.4%
Taylor expanded in t around 0 83.6%
if -0.048000000000000001 < y < 6.9000000000000002e134Initial program 95.1%
Taylor expanded in z around 0 99.4%
+-commutative99.4%
associate-*r*99.4%
associate-*r*99.4%
distribute-lft-out99.4%
mul-1-neg99.4%
Simplified99.4%
Taylor expanded in y around 0 86.2%
associate-*r*86.2%
neg-mul-186.2%
*-commutative86.2%
Simplified86.2%
if 6.9000000000000002e134 < y Initial program 88.2%
fma-define94.2%
sub-neg94.2%
log1p-define94.2%
Simplified94.2%
Taylor expanded in a around 0 85.5%
Taylor expanded in t around 0 62.4%
Final simplification82.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -0.052) (not (<= y 8e+17))) (* 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.052) || !(y <= 8e+17)) {
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.052d0)) .or. (.not. (y <= 8d+17))) 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.052) || !(y <= 8e+17)) {
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.052) or not (y <= 8e+17): 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.052) || !(y <= 8e+17)) 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.052) || ~((y <= 8e+17))) 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.052], N[Not[LessEqual[y, 8e+17]], $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.052 \lor \neg \left(y \leq 8 \cdot 10^{+17}\right):\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\
\end{array}
\end{array}
if y < -0.0519999999999999976 or 8e17 < y Initial program 94.0%
fma-define97.5%
sub-neg97.5%
log1p-define97.5%
Simplified97.5%
Taylor expanded in a around 0 87.5%
Taylor expanded in t around 0 73.2%
if -0.0519999999999999976 < y < 8e17Initial program 95.0%
Taylor expanded in z around 0 100.0%
+-commutative100.0%
associate-*r*100.0%
associate-*r*100.0%
distribute-lft-out100.0%
mul-1-neg100.0%
Simplified100.0%
Taylor expanded in b around inf 84.5%
mul-1-neg84.5%
distribute-lft-neg-out84.5%
*-commutative84.5%
Simplified84.5%
Final simplification79.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -8.6e-33) (not (<= y 2.9e-102))) (* x (pow z y)) (- x (* z (* a (+ x (/ (* x b) z)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -8.6e-33) || !(y <= 2.9e-102)) {
tmp = x * pow(z, y);
} else {
tmp = x - (z * (a * (x + ((x * 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 <= (-8.6d-33)) .or. (.not. (y <= 2.9d-102))) then
tmp = x * (z ** y)
else
tmp = x - (z * (a * (x + ((x * 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 <= -8.6e-33) || !(y <= 2.9e-102)) {
tmp = x * Math.pow(z, y);
} else {
tmp = x - (z * (a * (x + ((x * b) / z))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -8.6e-33) or not (y <= 2.9e-102): tmp = x * math.pow(z, y) else: tmp = x - (z * (a * (x + ((x * b) / z)))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -8.6e-33) || !(y <= 2.9e-102)) tmp = Float64(x * (z ^ y)); else tmp = Float64(x - Float64(z * Float64(a * Float64(x + Float64(Float64(x * b) / z))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -8.6e-33) || ~((y <= 2.9e-102))) tmp = x * (z ^ y); else tmp = x - (z * (a * (x + ((x * b) / z)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -8.6e-33], N[Not[LessEqual[y, 2.9e-102]], $MachinePrecision]], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], N[(x - N[(z * N[(a * N[(x + N[(N[(x * b), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.6 \cdot 10^{-33} \lor \neg \left(y \leq 2.9 \cdot 10^{-102}\right):\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{else}:\\
\;\;\;\;x - z \cdot \left(a \cdot \left(x + \frac{x \cdot b}{z}\right)\right)\\
\end{array}
\end{array}
if y < -8.60000000000000062e-33 or 2.89999999999999986e-102 < y Initial program 94.9%
fma-define97.8%
sub-neg97.8%
log1p-define97.8%
Simplified97.8%
Taylor expanded in a around 0 84.3%
Taylor expanded in t around 0 67.3%
if -8.60000000000000062e-33 < y < 2.89999999999999986e-102Initial program 94.1%
Taylor expanded in z around 0 100.0%
+-commutative100.0%
associate-*r*100.0%
associate-*r*100.0%
distribute-lft-out100.0%
mul-1-neg100.0%
Simplified100.0%
Taylor expanded in y around 0 91.8%
associate-*r*91.8%
neg-mul-191.8%
*-commutative91.8%
Simplified91.8%
Taylor expanded in a around 0 45.8%
mul-1-neg45.8%
unsub-neg45.8%
associate-*r*45.2%
+-commutative45.2%
Simplified45.2%
Taylor expanded in z around inf 46.9%
+-commutative46.9%
associate-/l*45.3%
distribute-lft-out51.2%
*-commutative51.2%
Simplified51.2%
Final simplification59.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= a -1.4e-21)
(* x (* a (- b)))
(if (<= a 8.5e-144)
x
(if (<= a 5.5e+100) (* x (* y (- t))) (* a (* x (- b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.4e-21) {
tmp = x * (a * -b);
} else if (a <= 8.5e-144) {
tmp = x;
} else if (a <= 5.5e+100) {
tmp = x * (y * -t);
} 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 (a <= (-1.4d-21)) then
tmp = x * (a * -b)
else if (a <= 8.5d-144) then
tmp = x
else if (a <= 5.5d+100) then
tmp = x * (y * -t)
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 (a <= -1.4e-21) {
tmp = x * (a * -b);
} else if (a <= 8.5e-144) {
tmp = x;
} else if (a <= 5.5e+100) {
tmp = x * (y * -t);
} else {
tmp = a * (x * -b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.4e-21: tmp = x * (a * -b) elif a <= 8.5e-144: tmp = x elif a <= 5.5e+100: tmp = x * (y * -t) else: tmp = a * (x * -b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.4e-21) tmp = Float64(x * Float64(a * Float64(-b))); elseif (a <= 8.5e-144) tmp = x; elseif (a <= 5.5e+100) tmp = Float64(x * Float64(y * Float64(-t))); 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 (a <= -1.4e-21) tmp = x * (a * -b); elseif (a <= 8.5e-144) tmp = x; elseif (a <= 5.5e+100) tmp = x * (y * -t); else tmp = a * (x * -b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.4e-21], N[(x * N[(a * (-b)), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 8.5e-144], x, If[LessEqual[a, 5.5e+100], N[(x * N[(y * (-t)), $MachinePrecision]), $MachinePrecision], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.4 \cdot 10^{-21}:\\
\;\;\;\;x \cdot \left(a \cdot \left(-b\right)\right)\\
\mathbf{elif}\;a \leq 8.5 \cdot 10^{-144}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 5.5 \cdot 10^{+100}:\\
\;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\end{array}
\end{array}
if a < -1.40000000000000002e-21Initial program 89.2%
Taylor expanded in z around 0 94.5%
+-commutative94.5%
associate-*r*94.5%
associate-*r*94.5%
distribute-lft-out94.5%
mul-1-neg94.5%
Simplified94.5%
Taylor expanded in b around inf 68.4%
mul-1-neg68.4%
distribute-lft-neg-out68.4%
*-commutative68.4%
Simplified68.4%
Taylor expanded in b around 0 29.1%
mul-1-neg29.1%
*-commutative29.1%
unsub-neg29.1%
*-commutative29.1%
Simplified29.1%
Taylor expanded in a around inf 20.6%
mul-1-neg20.6%
associate-*r*27.5%
distribute-lft-neg-in27.5%
distribute-rgt-neg-out27.5%
*-commutative27.5%
distribute-rgt-neg-out27.5%
*-commutative27.5%
distribute-rgt-neg-in27.5%
Simplified27.5%
if -1.40000000000000002e-21 < a < 8.49999999999999958e-144Initial program 100.0%
fma-define100.0%
sub-neg100.0%
log1p-define100.0%
Simplified100.0%
Taylor expanded in a around 0 89.8%
Taylor expanded in y around 0 35.8%
if 8.49999999999999958e-144 < a < 5.5000000000000002e100Initial program 93.3%
Taylor expanded in z around 0 96.5%
+-commutative96.5%
associate-*r*96.5%
associate-*r*96.5%
distribute-lft-out96.5%
mul-1-neg96.5%
Simplified96.5%
Taylor expanded in t around inf 54.7%
associate-*r*54.7%
neg-mul-154.7%
Simplified54.7%
Taylor expanded in t around 0 31.8%
neg-mul-131.8%
distribute-rgt-neg-in31.8%
Simplified31.8%
Taylor expanded in t around inf 35.7%
neg-mul-135.7%
*-commutative35.7%
distribute-rgt-neg-in35.7%
Simplified35.7%
if 5.5000000000000002e100 < a Initial program 92.9%
Taylor expanded in z around 0 96.5%
+-commutative96.5%
associate-*r*96.5%
associate-*r*96.5%
distribute-lft-out96.5%
mul-1-neg96.5%
Simplified96.5%
Taylor expanded in b around inf 75.9%
mul-1-neg75.9%
distribute-lft-neg-out75.9%
*-commutative75.9%
Simplified75.9%
Taylor expanded in b around 0 29.9%
mul-1-neg29.9%
*-commutative29.9%
unsub-neg29.9%
*-commutative29.9%
Simplified29.9%
Taylor expanded in a around inf 26.9%
associate-*r*26.9%
neg-mul-126.9%
*-commutative26.9%
Simplified26.9%
Final simplification32.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (* a (- b)))))
(if (<= a -1.4e-21)
t_1
(if (<= a 3.4e-140) x (if (<= a 7.5e+99) (* x (* y (- t))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * (a * -b);
double tmp;
if (a <= -1.4e-21) {
tmp = t_1;
} else if (a <= 3.4e-140) {
tmp = x;
} else if (a <= 7.5e+99) {
tmp = x * (y * -t);
} else {
tmp = t_1;
}
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 * (a * -b)
if (a <= (-1.4d-21)) then
tmp = t_1
else if (a <= 3.4d-140) then
tmp = x
else if (a <= 7.5d+99) then
tmp = x * (y * -t)
else
tmp = t_1
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 * (a * -b);
double tmp;
if (a <= -1.4e-21) {
tmp = t_1;
} else if (a <= 3.4e-140) {
tmp = x;
} else if (a <= 7.5e+99) {
tmp = x * (y * -t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * (a * -b) tmp = 0 if a <= -1.4e-21: tmp = t_1 elif a <= 3.4e-140: tmp = x elif a <= 7.5e+99: tmp = x * (y * -t) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * Float64(a * Float64(-b))) tmp = 0.0 if (a <= -1.4e-21) tmp = t_1; elseif (a <= 3.4e-140) tmp = x; elseif (a <= 7.5e+99) tmp = Float64(x * Float64(y * Float64(-t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * (a * -b); tmp = 0.0; if (a <= -1.4e-21) tmp = t_1; elseif (a <= 3.4e-140) tmp = x; elseif (a <= 7.5e+99) tmp = x * (y * -t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(a * (-b)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.4e-21], t$95$1, If[LessEqual[a, 3.4e-140], x, If[LessEqual[a, 7.5e+99], N[(x * N[(y * (-t)), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(a \cdot \left(-b\right)\right)\\
\mathbf{if}\;a \leq -1.4 \cdot 10^{-21}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 3.4 \cdot 10^{-140}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 7.5 \cdot 10^{+99}:\\
\;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.40000000000000002e-21 or 7.49999999999999963e99 < a Initial program 91.1%
Taylor expanded in z around 0 95.5%
+-commutative95.5%
associate-*r*95.5%
associate-*r*95.5%
distribute-lft-out95.5%
mul-1-neg95.5%
Simplified95.5%
Taylor expanded in b around inf 72.2%
mul-1-neg72.2%
distribute-lft-neg-out72.2%
*-commutative72.2%
Simplified72.2%
Taylor expanded in b around 0 29.5%
mul-1-neg29.5%
*-commutative29.5%
unsub-neg29.5%
*-commutative29.5%
Simplified29.5%
Taylor expanded in a around inf 23.8%
mul-1-neg23.8%
associate-*r*27.1%
distribute-lft-neg-in27.1%
distribute-rgt-neg-out27.1%
*-commutative27.1%
distribute-rgt-neg-out27.1%
*-commutative27.1%
distribute-rgt-neg-in27.1%
Simplified27.1%
if -1.40000000000000002e-21 < a < 3.40000000000000008e-140Initial program 100.0%
fma-define100.0%
sub-neg100.0%
log1p-define100.0%
Simplified100.0%
Taylor expanded in a around 0 89.8%
Taylor expanded in y around 0 35.8%
if 3.40000000000000008e-140 < a < 7.49999999999999963e99Initial program 93.3%
Taylor expanded in z around 0 96.5%
+-commutative96.5%
associate-*r*96.5%
associate-*r*96.5%
distribute-lft-out96.5%
mul-1-neg96.5%
Simplified96.5%
Taylor expanded in t around inf 54.7%
associate-*r*54.7%
neg-mul-154.7%
Simplified54.7%
Taylor expanded in t around 0 31.8%
neg-mul-131.8%
distribute-rgt-neg-in31.8%
Simplified31.8%
Taylor expanded in t around inf 35.7%
neg-mul-135.7%
*-commutative35.7%
distribute-rgt-neg-in35.7%
Simplified35.7%
Final simplification32.0%
(FPCore (x y z t a b) :precision binary64 (if (<= x 6e-224) (* a (* x (- z))) (if (<= x 2.9e+121) (* t (- (/ x t) (* x y))) (* a (- (/ x a) (* x b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= 6e-224) {
tmp = a * (x * -z);
} else if (x <= 2.9e+121) {
tmp = t * ((x / t) - (x * y));
} else {
tmp = a * ((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 (x <= 6d-224) then
tmp = a * (x * -z)
else if (x <= 2.9d+121) then
tmp = t * ((x / t) - (x * y))
else
tmp = a * ((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 (x <= 6e-224) {
tmp = a * (x * -z);
} else if (x <= 2.9e+121) {
tmp = t * ((x / t) - (x * y));
} else {
tmp = a * ((x / a) - (x * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= 6e-224: tmp = a * (x * -z) elif x <= 2.9e+121: tmp = t * ((x / t) - (x * y)) else: tmp = a * ((x / a) - (x * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= 6e-224) tmp = Float64(a * Float64(x * Float64(-z))); elseif (x <= 2.9e+121) tmp = Float64(t * Float64(Float64(x / t) - Float64(x * y))); else tmp = Float64(a * Float64(Float64(x / a) - Float64(x * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= 6e-224) tmp = a * (x * -z); elseif (x <= 2.9e+121) tmp = t * ((x / t) - (x * y)); else tmp = a * ((x / a) - (x * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, 6e-224], N[(a * N[(x * (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.9e+121], N[(t * N[(N[(x / t), $MachinePrecision] - N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(N[(x / a), $MachinePrecision] - N[(x * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 6 \cdot 10^{-224}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-z\right)\right)\\
\mathbf{elif}\;x \leq 2.9 \cdot 10^{+121}:\\
\;\;\;\;t \cdot \left(\frac{x}{t} - x \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(\frac{x}{a} - x \cdot b\right)\\
\end{array}
\end{array}
if x < 5.99999999999999963e-224Initial program 94.9%
Taylor expanded in z around 0 97.1%
+-commutative97.1%
associate-*r*97.1%
associate-*r*97.1%
distribute-lft-out97.1%
mul-1-neg97.1%
Simplified97.1%
Taylor expanded in y around 0 64.9%
associate-*r*64.9%
neg-mul-164.9%
*-commutative64.9%
Simplified64.9%
Taylor expanded in a around 0 25.6%
mul-1-neg25.6%
unsub-neg25.6%
associate-*r*24.5%
+-commutative24.5%
Simplified24.5%
Taylor expanded in z around inf 20.1%
associate-*r*20.1%
neg-mul-120.1%
Simplified20.1%
if 5.99999999999999963e-224 < x < 2.8999999999999999e121Initial program 92.0%
Taylor expanded in z around 0 95.9%
+-commutative95.9%
associate-*r*95.9%
associate-*r*95.9%
distribute-lft-out95.9%
mul-1-neg95.9%
Simplified95.9%
Taylor expanded in t around inf 55.4%
associate-*r*55.4%
neg-mul-155.4%
Simplified55.4%
Taylor expanded in t around 0 34.4%
neg-mul-134.4%
distribute-rgt-neg-in34.4%
Simplified34.4%
Taylor expanded in t around inf 38.3%
if 2.8999999999999999e121 < x Initial program 97.7%
Taylor expanded in z around 0 100.0%
+-commutative100.0%
associate-*r*100.0%
associate-*r*100.0%
distribute-lft-out100.0%
mul-1-neg100.0%
Simplified100.0%
Taylor expanded in b around inf 61.8%
mul-1-neg61.8%
distribute-lft-neg-out61.8%
*-commutative61.8%
Simplified61.8%
Taylor expanded in b around 0 45.9%
mul-1-neg45.9%
*-commutative45.9%
unsub-neg45.9%
*-commutative45.9%
Simplified45.9%
Taylor expanded in a around inf 50.1%
+-commutative50.1%
mul-1-neg50.1%
unsub-neg50.1%
*-commutative50.1%
Simplified50.1%
Final simplification30.4%
(FPCore (x y z t a b) :precision binary64 (if (<= x 1.75e-218) (* a (* x (- z))) (if (<= x 1.7e+208) (* x (- 1.0 (* a b))) (* b (- (/ x b) (* x a))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= 1.75e-218) {
tmp = a * (x * -z);
} else if (x <= 1.7e+208) {
tmp = x * (1.0 - (a * b));
} else {
tmp = b * ((x / b) - (x * 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 (x <= 1.75d-218) then
tmp = a * (x * -z)
else if (x <= 1.7d+208) then
tmp = x * (1.0d0 - (a * b))
else
tmp = b * ((x / b) - (x * 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 (x <= 1.75e-218) {
tmp = a * (x * -z);
} else if (x <= 1.7e+208) {
tmp = x * (1.0 - (a * b));
} else {
tmp = b * ((x / b) - (x * a));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= 1.75e-218: tmp = a * (x * -z) elif x <= 1.7e+208: tmp = x * (1.0 - (a * b)) else: tmp = b * ((x / b) - (x * a)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= 1.75e-218) tmp = Float64(a * Float64(x * Float64(-z))); elseif (x <= 1.7e+208) tmp = Float64(x * Float64(1.0 - Float64(a * b))); else tmp = Float64(b * Float64(Float64(x / b) - Float64(x * a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= 1.75e-218) tmp = a * (x * -z); elseif (x <= 1.7e+208) tmp = x * (1.0 - (a * b)); else tmp = b * ((x / b) - (x * a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, 1.75e-218], N[(a * N[(x * (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.7e+208], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(N[(x / b), $MachinePrecision] - N[(x * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.75 \cdot 10^{-218}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-z\right)\right)\\
\mathbf{elif}\;x \leq 1.7 \cdot 10^{+208}:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(\frac{x}{b} - x \cdot a\right)\\
\end{array}
\end{array}
if x < 1.75e-218Initial program 94.9%
Taylor expanded in z around 0 97.1%
+-commutative97.1%
associate-*r*97.1%
associate-*r*97.1%
distribute-lft-out97.1%
mul-1-neg97.1%
Simplified97.1%
Taylor expanded in y around 0 65.1%
associate-*r*65.1%
neg-mul-165.1%
*-commutative65.1%
Simplified65.1%
Taylor expanded in a around 0 25.5%
mul-1-neg25.5%
unsub-neg25.5%
associate-*r*24.3%
+-commutative24.3%
Simplified24.3%
Taylor expanded in z around inf 20.7%
associate-*r*20.7%
neg-mul-120.7%
Simplified20.7%
if 1.75e-218 < x < 1.6999999999999999e208Initial program 93.8%
Taylor expanded in z around 0 96.8%
+-commutative96.8%
associate-*r*96.8%
associate-*r*96.8%
distribute-lft-out96.8%
mul-1-neg96.8%
Simplified96.8%
Taylor expanded in b around inf 62.1%
mul-1-neg62.1%
distribute-lft-neg-out62.1%
*-commutative62.1%
Simplified62.1%
Taylor expanded in b around 0 33.6%
mul-1-neg33.6%
*-commutative33.6%
unsub-neg33.6%
*-commutative33.6%
Simplified33.6%
if 1.6999999999999999e208 < x Initial program 95.3%
Taylor expanded in z around 0 100.0%
+-commutative100.0%
associate-*r*100.0%
associate-*r*100.0%
distribute-lft-out100.0%
mul-1-neg100.0%
Simplified100.0%
Taylor expanded in b around inf 68.1%
mul-1-neg68.1%
distribute-lft-neg-out68.1%
*-commutative68.1%
Simplified68.1%
Taylor expanded in b around 0 44.8%
mul-1-neg44.8%
*-commutative44.8%
unsub-neg44.8%
*-commutative44.8%
Simplified44.8%
Taylor expanded in b around inf 57.8%
+-commutative57.8%
associate-*r*57.8%
neg-mul-157.8%
cancel-sign-sub-inv57.8%
*-commutative57.8%
Simplified57.8%
Final simplification28.5%
(FPCore (x y z t a b) :precision binary64 (if (<= x 2.9e-219) (* a (* x (- z))) (if (<= x 2.6e+121) (* x (- 1.0 (* y t))) (* a (- (/ x a) (* x b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= 2.9e-219) {
tmp = a * (x * -z);
} else if (x <= 2.6e+121) {
tmp = x * (1.0 - (y * t));
} else {
tmp = a * ((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 (x <= 2.9d-219) then
tmp = a * (x * -z)
else if (x <= 2.6d+121) then
tmp = x * (1.0d0 - (y * t))
else
tmp = a * ((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 (x <= 2.9e-219) {
tmp = a * (x * -z);
} else if (x <= 2.6e+121) {
tmp = x * (1.0 - (y * t));
} else {
tmp = a * ((x / a) - (x * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= 2.9e-219: tmp = a * (x * -z) elif x <= 2.6e+121: tmp = x * (1.0 - (y * t)) else: tmp = a * ((x / a) - (x * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= 2.9e-219) tmp = Float64(a * Float64(x * Float64(-z))); elseif (x <= 2.6e+121) tmp = Float64(x * Float64(1.0 - Float64(y * t))); else tmp = Float64(a * Float64(Float64(x / a) - Float64(x * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= 2.9e-219) tmp = a * (x * -z); elseif (x <= 2.6e+121) tmp = x * (1.0 - (y * t)); else tmp = a * ((x / a) - (x * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, 2.9e-219], N[(a * N[(x * (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.6e+121], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(N[(x / a), $MachinePrecision] - N[(x * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2.9 \cdot 10^{-219}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-z\right)\right)\\
\mathbf{elif}\;x \leq 2.6 \cdot 10^{+121}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(\frac{x}{a} - x \cdot b\right)\\
\end{array}
\end{array}
if x < 2.89999999999999984e-219Initial program 94.9%
Taylor expanded in z around 0 97.1%
+-commutative97.1%
associate-*r*97.1%
associate-*r*97.1%
distribute-lft-out97.1%
mul-1-neg97.1%
Simplified97.1%
Taylor expanded in y around 0 65.1%
associate-*r*65.1%
neg-mul-165.1%
*-commutative65.1%
Simplified65.1%
Taylor expanded in a around 0 25.5%
mul-1-neg25.5%
unsub-neg25.5%
associate-*r*24.3%
+-commutative24.3%
Simplified24.3%
Taylor expanded in z around inf 20.7%
associate-*r*20.7%
neg-mul-120.7%
Simplified20.7%
if 2.89999999999999984e-219 < x < 2.5999999999999999e121Initial program 91.9%
Taylor expanded in z around 0 95.9%
+-commutative95.9%
associate-*r*95.9%
associate-*r*95.9%
distribute-lft-out95.9%
mul-1-neg95.9%
Simplified95.9%
Taylor expanded in t around inf 54.8%
associate-*r*54.8%
neg-mul-154.8%
Simplified54.8%
Taylor expanded in t around 0 34.8%
neg-mul-134.8%
distribute-rgt-neg-in34.8%
Simplified34.8%
Taylor expanded in x around 0 34.8%
neg-mul-134.8%
sub-neg34.8%
*-commutative34.8%
Simplified34.8%
if 2.5999999999999999e121 < x Initial program 97.7%
Taylor expanded in z around 0 100.0%
+-commutative100.0%
associate-*r*100.0%
associate-*r*100.0%
distribute-lft-out100.0%
mul-1-neg100.0%
Simplified100.0%
Taylor expanded in b around inf 61.8%
mul-1-neg61.8%
distribute-lft-neg-out61.8%
*-commutative61.8%
Simplified61.8%
Taylor expanded in b around 0 45.9%
mul-1-neg45.9%
*-commutative45.9%
unsub-neg45.9%
*-commutative45.9%
Simplified45.9%
Taylor expanded in a around inf 50.1%
+-commutative50.1%
mul-1-neg50.1%
unsub-neg50.1%
*-commutative50.1%
Simplified50.1%
Final simplification29.6%
(FPCore (x y z t a b) :precision binary64 (if (<= x 7e-219) (* a (* x (- z))) (- x (* z (* a (+ x (/ (* x b) z)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= 7e-219) {
tmp = a * (x * -z);
} else {
tmp = x - (z * (a * (x + ((x * 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 (x <= 7d-219) then
tmp = a * (x * -z)
else
tmp = x - (z * (a * (x + ((x * 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 (x <= 7e-219) {
tmp = a * (x * -z);
} else {
tmp = x - (z * (a * (x + ((x * b) / z))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= 7e-219: tmp = a * (x * -z) else: tmp = x - (z * (a * (x + ((x * b) / z)))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= 7e-219) tmp = Float64(a * Float64(x * Float64(-z))); else tmp = Float64(x - Float64(z * Float64(a * Float64(x + Float64(Float64(x * b) / z))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= 7e-219) tmp = a * (x * -z); else tmp = x - (z * (a * (x + ((x * b) / z)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, 7e-219], N[(a * N[(x * (-z)), $MachinePrecision]), $MachinePrecision], N[(x - N[(z * N[(a * N[(x + N[(N[(x * b), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 7 \cdot 10^{-219}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x - z \cdot \left(a \cdot \left(x + \frac{x \cdot b}{z}\right)\right)\\
\end{array}
\end{array}
if x < 7.00000000000000022e-219Initial program 94.9%
Taylor expanded in z around 0 97.1%
+-commutative97.1%
associate-*r*97.1%
associate-*r*97.1%
distribute-lft-out97.1%
mul-1-neg97.1%
Simplified97.1%
Taylor expanded in y around 0 65.1%
associate-*r*65.1%
neg-mul-165.1%
*-commutative65.1%
Simplified65.1%
Taylor expanded in a around 0 25.5%
mul-1-neg25.5%
unsub-neg25.5%
associate-*r*24.3%
+-commutative24.3%
Simplified24.3%
Taylor expanded in z around inf 20.7%
associate-*r*20.7%
neg-mul-120.7%
Simplified20.7%
if 7.00000000000000022e-219 < x Initial program 94.1%
Taylor expanded in z around 0 97.4%
+-commutative97.4%
associate-*r*97.4%
associate-*r*97.4%
distribute-lft-out97.4%
mul-1-neg97.4%
Simplified97.4%
Taylor expanded in y around 0 71.5%
associate-*r*71.5%
neg-mul-171.5%
*-commutative71.5%
Simplified71.5%
Taylor expanded in a around 0 34.9%
mul-1-neg34.9%
unsub-neg34.9%
associate-*r*34.1%
+-commutative34.1%
Simplified34.1%
Taylor expanded in z around inf 35.2%
+-commutative35.2%
associate-/l*34.3%
distribute-lft-out40.4%
*-commutative40.4%
Simplified40.4%
Final simplification29.6%
(FPCore (x y z t a b) :precision binary64 (if (<= x 1.12e-218) (* a (* x (- z))) (if (<= x 3.5e+242) (* x (- 1.0 (* a b))) (- x (* t (* x y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= 1.12e-218) {
tmp = a * (x * -z);
} else if (x <= 3.5e+242) {
tmp = x * (1.0 - (a * b));
} else {
tmp = x - (t * (x * y));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (x <= 1.12d-218) then
tmp = a * (x * -z)
else if (x <= 3.5d+242) then
tmp = x * (1.0d0 - (a * b))
else
tmp = x - (t * (x * y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= 1.12e-218) {
tmp = a * (x * -z);
} else if (x <= 3.5e+242) {
tmp = x * (1.0 - (a * b));
} else {
tmp = x - (t * (x * y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= 1.12e-218: tmp = a * (x * -z) elif x <= 3.5e+242: tmp = x * (1.0 - (a * b)) else: tmp = x - (t * (x * y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= 1.12e-218) tmp = Float64(a * Float64(x * Float64(-z))); elseif (x <= 3.5e+242) tmp = Float64(x * Float64(1.0 - Float64(a * b))); else tmp = Float64(x - Float64(t * Float64(x * y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= 1.12e-218) tmp = a * (x * -z); elseif (x <= 3.5e+242) tmp = x * (1.0 - (a * b)); else tmp = x - (t * (x * y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, 1.12e-218], N[(a * N[(x * (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.5e+242], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(t * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.12 \cdot 10^{-218}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-z\right)\right)\\
\mathbf{elif}\;x \leq 3.5 \cdot 10^{+242}:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x - t \cdot \left(x \cdot y\right)\\
\end{array}
\end{array}
if x < 1.11999999999999996e-218Initial program 94.9%
Taylor expanded in z around 0 97.1%
+-commutative97.1%
associate-*r*97.1%
associate-*r*97.1%
distribute-lft-out97.1%
mul-1-neg97.1%
Simplified97.1%
Taylor expanded in y around 0 65.1%
associate-*r*65.1%
neg-mul-165.1%
*-commutative65.1%
Simplified65.1%
Taylor expanded in a around 0 25.5%
mul-1-neg25.5%
unsub-neg25.5%
associate-*r*24.3%
+-commutative24.3%
Simplified24.3%
Taylor expanded in z around inf 20.7%
associate-*r*20.7%
neg-mul-120.7%
Simplified20.7%
if 1.11999999999999996e-218 < x < 3.4999999999999999e242Initial program 94.3%
Taylor expanded in z around 0 97.1%
+-commutative97.1%
associate-*r*97.1%
associate-*r*97.1%
distribute-lft-out97.1%
mul-1-neg97.1%
Simplified97.1%
Taylor expanded in b around inf 63.5%
mul-1-neg63.5%
distribute-lft-neg-out63.5%
*-commutative63.5%
Simplified63.5%
Taylor expanded in b around 0 35.7%
mul-1-neg35.7%
*-commutative35.7%
unsub-neg35.7%
*-commutative35.7%
Simplified35.7%
if 3.4999999999999999e242 < x Initial program 91.8%
Taylor expanded in z around 0 100.0%
+-commutative100.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 52.8%
associate-*r*52.8%
neg-mul-152.8%
Simplified52.8%
Taylor expanded in t around 0 43.4%
mul-1-neg43.4%
unsub-neg43.4%
Simplified43.4%
Final simplification27.9%
(FPCore (x y z t a b) :precision binary64 (if (<= t -1.05e+112) (* (* x y) (- t)) (if (<= t 2.1e+146) (* x (- 1.0 (* a b))) (* x (- 1.0 (* y t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.05e+112) {
tmp = (x * y) * -t;
} else if (t <= 2.1e+146) {
tmp = x * (1.0 - (a * b));
} else {
tmp = x * (1.0 - (y * t));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-1.05d+112)) then
tmp = (x * y) * -t
else if (t <= 2.1d+146) then
tmp = x * (1.0d0 - (a * b))
else
tmp = x * (1.0d0 - (y * t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.05e+112) {
tmp = (x * y) * -t;
} else if (t <= 2.1e+146) {
tmp = x * (1.0 - (a * b));
} else {
tmp = x * (1.0 - (y * t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.05e+112: tmp = (x * y) * -t elif t <= 2.1e+146: tmp = x * (1.0 - (a * b)) else: tmp = x * (1.0 - (y * t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.05e+112) tmp = Float64(Float64(x * y) * Float64(-t)); elseif (t <= 2.1e+146) tmp = Float64(x * Float64(1.0 - Float64(a * b))); else tmp = Float64(x * Float64(1.0 - Float64(y * t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -1.05e+112) tmp = (x * y) * -t; elseif (t <= 2.1e+146) tmp = x * (1.0 - (a * b)); else tmp = x * (1.0 - (y * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.05e+112], N[(N[(x * y), $MachinePrecision] * (-t)), $MachinePrecision], If[LessEqual[t, 2.1e+146], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.05 \cdot 10^{+112}:\\
\;\;\;\;\left(x \cdot y\right) \cdot \left(-t\right)\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{+146}:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\end{array}
\end{array}
if t < -1.0499999999999999e112Initial program 88.9%
Taylor expanded in z around 0 88.9%
+-commutative88.9%
associate-*r*88.9%
associate-*r*88.9%
distribute-lft-out88.9%
mul-1-neg88.9%
Simplified88.9%
Taylor expanded in t around inf 62.1%
associate-*r*62.1%
neg-mul-162.1%
Simplified62.1%
Taylor expanded in t around 0 21.6%
neg-mul-121.6%
distribute-rgt-neg-in21.6%
Simplified21.6%
Taylor expanded in t around inf 32.1%
associate-*r*32.1%
neg-mul-132.1%
Simplified32.1%
if -1.0499999999999999e112 < t < 2.1000000000000001e146Initial program 96.2%
Taylor expanded in z around 0 99.4%
+-commutative99.4%
associate-*r*99.4%
associate-*r*99.4%
distribute-lft-out99.4%
mul-1-neg99.4%
Simplified99.4%
Taylor expanded in b around inf 66.5%
mul-1-neg66.5%
distribute-lft-neg-out66.5%
*-commutative66.5%
Simplified66.5%
Taylor expanded in b around 0 35.9%
mul-1-neg35.9%
*-commutative35.9%
unsub-neg35.9%
*-commutative35.9%
Simplified35.9%
if 2.1000000000000001e146 < t Initial program 91.7%
Taylor expanded in z around 0 94.4%
+-commutative94.4%
associate-*r*94.4%
associate-*r*94.4%
distribute-lft-out94.4%
mul-1-neg94.4%
Simplified94.4%
Taylor expanded in t around inf 83.8%
associate-*r*83.8%
neg-mul-183.8%
Simplified83.8%
Taylor expanded in t around 0 54.1%
neg-mul-154.1%
distribute-rgt-neg-in54.1%
Simplified54.1%
Taylor expanded in x around 0 54.1%
neg-mul-154.1%
sub-neg54.1%
*-commutative54.1%
Simplified54.1%
Final simplification38.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -7e-23) (not (<= a 6.55e+81))) (* x (* a (- b))) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -7e-23) || !(a <= 6.55e+81)) {
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 <= (-7d-23)) .or. (.not. (a <= 6.55d+81))) 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 <= -7e-23) || !(a <= 6.55e+81)) {
tmp = x * (a * -b);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -7e-23) or not (a <= 6.55e+81): tmp = x * (a * -b) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -7e-23) || !(a <= 6.55e+81)) 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 <= -7e-23) || ~((a <= 6.55e+81))) tmp = x * (a * -b); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -7e-23], N[Not[LessEqual[a, 6.55e+81]], $MachinePrecision]], N[(x * N[(a * (-b)), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7 \cdot 10^{-23} \lor \neg \left(a \leq 6.55 \cdot 10^{+81}\right):\\
\;\;\;\;x \cdot \left(a \cdot \left(-b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -6.99999999999999987e-23 or 6.54999999999999981e81 < a Initial program 88.2%
Taylor expanded in z around 0 94.1%
+-commutative94.1%
associate-*r*94.1%
associate-*r*94.1%
distribute-lft-out94.1%
mul-1-neg94.1%
Simplified94.1%
Taylor expanded in b around inf 71.2%
mul-1-neg71.2%
distribute-lft-neg-out71.2%
*-commutative71.2%
Simplified71.2%
Taylor expanded in b around 0 29.0%
mul-1-neg29.0%
*-commutative29.0%
unsub-neg29.0%
*-commutative29.0%
Simplified29.0%
Taylor expanded in a around inf 24.4%
mul-1-neg24.4%
associate-*r*26.7%
distribute-lft-neg-in26.7%
distribute-rgt-neg-out26.7%
*-commutative26.7%
distribute-rgt-neg-out26.7%
*-commutative26.7%
distribute-rgt-neg-in26.7%
Simplified26.7%
if -6.99999999999999987e-23 < a < 6.54999999999999981e81Initial program 100.0%
fma-define100.0%
sub-neg100.0%
log1p-define100.0%
Simplified100.0%
Taylor expanded in a around 0 82.6%
Taylor expanded in y around 0 30.0%
Final simplification28.5%
(FPCore (x y z t a b) :precision binary64 (if (<= x 1e-218) (* a (* x (- z))) (* x (- 1.0 (* a (+ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= 1e-218) {
tmp = a * (x * -z);
} 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 (x <= 1d-218) then
tmp = a * (x * -z)
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 (x <= 1e-218) {
tmp = a * (x * -z);
} else {
tmp = x * (1.0 - (a * (z + b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= 1e-218: tmp = a * (x * -z) else: tmp = x * (1.0 - (a * (z + b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= 1e-218) tmp = Float64(a * Float64(x * Float64(-z))); 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 (x <= 1e-218) tmp = a * (x * -z); else tmp = x * (1.0 - (a * (z + b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, 1e-218], N[(a * N[(x * (-z)), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(a * N[(z + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 10^{-218}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - a \cdot \left(z + b\right)\right)\\
\end{array}
\end{array}
if x < 1e-218Initial program 94.9%
Taylor expanded in z around 0 97.1%
+-commutative97.1%
associate-*r*97.1%
associate-*r*97.1%
distribute-lft-out97.1%
mul-1-neg97.1%
Simplified97.1%
Taylor expanded in y around 0 65.1%
associate-*r*65.1%
neg-mul-165.1%
*-commutative65.1%
Simplified65.1%
Taylor expanded in a around 0 25.5%
mul-1-neg25.5%
unsub-neg25.5%
associate-*r*24.3%
+-commutative24.3%
Simplified24.3%
Taylor expanded in z around inf 20.7%
associate-*r*20.7%
neg-mul-120.7%
Simplified20.7%
if 1e-218 < x Initial program 94.1%
Taylor expanded in z around 0 97.4%
+-commutative97.4%
associate-*r*97.4%
associate-*r*97.4%
distribute-lft-out97.4%
mul-1-neg97.4%
Simplified97.4%
Taylor expanded in y around 0 71.5%
associate-*r*71.5%
neg-mul-171.5%
*-commutative71.5%
Simplified71.5%
Taylor expanded in a around 0 36.5%
mul-1-neg36.5%
*-commutative36.5%
unsub-neg36.5%
*-commutative36.5%
+-commutative36.5%
Simplified36.5%
Final simplification27.9%
(FPCore (x y z t a b) :precision binary64 (if (<= x 3.8e-219) (* a (* x (- z))) (* x (- 1.0 (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= 3.8e-219) {
tmp = a * (x * -z);
} 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 (x <= 3.8d-219) then
tmp = a * (x * -z)
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 (x <= 3.8e-219) {
tmp = a * (x * -z);
} else {
tmp = x * (1.0 - (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= 3.8e-219: tmp = a * (x * -z) else: tmp = x * (1.0 - (a * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= 3.8e-219) tmp = Float64(a * Float64(x * Float64(-z))); 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 (x <= 3.8e-219) tmp = a * (x * -z); else tmp = x * (1.0 - (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, 3.8e-219], N[(a * N[(x * (-z)), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 3.8 \cdot 10^{-219}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\
\end{array}
\end{array}
if x < 3.80000000000000025e-219Initial program 94.9%
Taylor expanded in z around 0 97.1%
+-commutative97.1%
associate-*r*97.1%
associate-*r*97.1%
distribute-lft-out97.1%
mul-1-neg97.1%
Simplified97.1%
Taylor expanded in y around 0 65.1%
associate-*r*65.1%
neg-mul-165.1%
*-commutative65.1%
Simplified65.1%
Taylor expanded in a around 0 25.5%
mul-1-neg25.5%
unsub-neg25.5%
associate-*r*24.3%
+-commutative24.3%
Simplified24.3%
Taylor expanded in z around inf 20.7%
associate-*r*20.7%
neg-mul-120.7%
Simplified20.7%
if 3.80000000000000025e-219 < x Initial program 94.1%
Taylor expanded in z around 0 97.4%
+-commutative97.4%
associate-*r*97.4%
associate-*r*97.4%
distribute-lft-out97.4%
mul-1-neg97.4%
Simplified97.4%
Taylor expanded in b around inf 63.2%
mul-1-neg63.2%
distribute-lft-neg-out63.2%
*-commutative63.2%
Simplified63.2%
Taylor expanded in b around 0 35.7%
mul-1-neg35.7%
*-commutative35.7%
unsub-neg35.7%
*-commutative35.7%
Simplified35.7%
Final simplification27.5%
(FPCore (x y z t a b) :precision binary64 (if (<= y 9.5e+24) x (* x (* z (- a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 9.5e+24) {
tmp = x;
} else {
tmp = x * (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 <= 9.5d+24) then
tmp = x
else
tmp = x * (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 <= 9.5e+24) {
tmp = x;
} else {
tmp = x * (z * -a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 9.5e+24: tmp = x else: tmp = x * (z * -a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 9.5e+24) tmp = x; else tmp = Float64(x * Float64(z * Float64(-a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= 9.5e+24) tmp = x; else tmp = x * (z * -a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 9.5e+24], x, N[(x * N[(z * (-a)), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 9.5 \cdot 10^{+24}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(z \cdot \left(-a\right)\right)\\
\end{array}
\end{array}
if y < 9.5000000000000001e24Initial program 95.5%
fma-define96.0%
sub-neg96.0%
log1p-define99.5%
Simplified99.5%
Taylor expanded in a around 0 61.2%
Taylor expanded in y around 0 23.7%
if 9.5000000000000001e24 < y Initial program 91.2%
Taylor expanded in z around 0 91.2%
+-commutative91.2%
associate-*r*91.2%
associate-*r*91.2%
distribute-lft-out91.2%
mul-1-neg91.2%
Simplified91.2%
Taylor expanded in y around 0 49.6%
associate-*r*49.6%
neg-mul-149.6%
*-commutative49.6%
Simplified49.6%
Taylor expanded in a around 0 10.6%
mul-1-neg10.6%
unsub-neg10.6%
associate-*r*10.7%
+-commutative10.7%
Simplified10.7%
Taylor expanded in z around inf 25.0%
mul-1-neg25.0%
associate-*r*23.3%
*-commutative23.3%
associate-*r*26.7%
distribute-rgt-neg-in26.7%
*-commutative26.7%
Simplified26.7%
Final simplification24.4%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 94.5%
fma-define96.1%
sub-neg96.1%
log1p-define98.8%
Simplified98.8%
Taylor expanded in a around 0 65.6%
Taylor expanded in y around 0 19.4%
herbie shell --seed 2024145
(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))))))