* Jerry James <james(a)xemacs.org> writes:
/***** Bignum: conversions to/from arbitrary integer types *****/
I'm pretty sure that we (SXEmacs) can do something along these lines.
,----[ C-h f coerce-number RET ]
| `coerce-number' is a built-in function
| -- loaded from "/usr/src/sxemacs/sxemacs/src/ent/ent.c"
| (coerce-number NUMBER TYPE &optional PRECISION)
|
| Documentation:
| Convert NUMBER to the indicated type, possibly losing information.
| See `coerce'.
|
| TYPE is one of the symbols:
| - 'fixnum or 'int to convert to built-in integers
| - 'bigz or 'bignum to convert to bigz integers
| - 'integer to convert to the most suitable type out of
| 'bigz or 'int
|
| - 'bigq or 'ratio to convert to bigq fractions
| - 'rational to convert to the most suitable type out of
| 'bigq, 'bigz or 'int
|
| - 'float to convert to built-in floats
| - 'bigf or 'bigfloat to convert to bigf floats
| - 'bigfr to convert to bigfr floats
| - 'real to convert to the type indicated by
| `read-real-as' with a fallback to 'float
|
| - 'bigg to convert to a Gaussian
| - 'bigc to convert to a bigc complex number
|
| - 'quatern to convert to a Quaternion
|
| NOTE: Not all of these types may be supported.
|
| PRECISION is the number of bits of precision to use when converting to
| reals; it is ignored otherwise. If nil, the default precision is used.
|
| Note that some conversions lose information. No error is signaled in such
| cases; the information is silently lost.
`----
--
|---<Steve Youngs>---------------<GnuPG KeyID: A94B3003>---|
| SXEmacs - The only _______ you'll ever need. |
| Fill in the blank, yes, it's THAT good! |
|------------------------------------<steve(a)sxemacs.org>---|
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta