erf function (patch from Bernd Gutmann).

This commit is contained in:
Vitor Santos Costa
2010-03-05 00:01:04 +00:00
parent 75d1b897e0
commit 43a1a754dd
6 changed files with 38 additions and 5 deletions

View File

@@ -418,6 +418,26 @@ eval1(Int fi, Term t) {
RERROR();
#endif
}
case op_erf:
{
Float dbl = get_float(t), out;
#if HAVE_ERF
out = erf(dbl);
RFLOAT(out);
#else
RERROR();
#endif
}
case op_erfc:
{
Float dbl = get_float(t), out;
#if HAVE_ERF
out = erfc(dbl);
RFLOAT(out);
#else
RERROR();
#endif
}
/*
floor(x) maximum integer greatest or equal to X
@@ -814,6 +834,8 @@ static InitUnEntry InitUnTab[] = {
{"float_integer_part", op_fintp},
{"sign", op_sign},
{"lgamma", op_lgamma},
{"erf",op_erf},
{"erfc",op_erfc},
{"random", op_random1}
};