Module mathfns
source code
This provides useful general math tools (DEPRECATED).
This module is considered to be deprecated, and is likely to be
removed in a future release of Biopython. Its C code implementation has
already been removed. Please get in touch via the mailing list if this
will affect you.
Functions: fcmp Compare two floating point numbers, up to a
specified precision. intd Represent a floating point number as an
integer. safe_log log, but returns an arbitrarily small number for
log(0). safe_exp exp, but returns a large or small number instead of
overflows.
-1, 0, or 1
|
|
int x, rounded
|
intd(x,
digits_after_decimal=...)
Represent a floating point number with some digits after the decimal
point as an integer. |
source code
|
|
log(n)
|
|
log(n)
|
|
e**n
|
|
|
LOG2 = 0.69314718056
|
|
__package__ = ' Bio '
|
|
__warningregistry__ = { ( ' Bio.mathfns and its C code equivalent ...
|
Represent a floating point number with some digits after the decimal
point as an integer. This is useful when floating point comparisons are
failing due to precision problems. e.g. intd(5.35, 1) -> 54.
- Returns: int x, rounded
|
Calculate the log of n. If n is 0, returns the value of zero. If n
is negative, returns the value of neg.
- Returns: log(n)
|
Calculate the log base 2 of n. If n is 0, returns the value of zero.
If n is negative, returns the value of neg.
- Returns: log(n)
|
Guaranteed not to overflow. Instead of overflowing, it returns the
values of 'under' for underflows or 'over' for overflows.
- Returns: e**n
|
__warningregistry__
- Value:
{ ( ' Bio.mathfns and its C code equivalent Bio.cmathfns are deprecated,
and will be removed in a future release of Biopython. If you want to
continue to use this code, please get in contact with the Biopython de
velopers via the mailing lists to avoid its permanent removal from Bio
python. ' ,
<type 'exceptions.DeprecationWarning'>,
26) : True}
|
|