On Wed, Nov 28, 2012 at 5:35 PM, Raymond Toy <toy.raymond(a)gmail.com> wrote:
The info file (and the texi source) for bigfloats says:
Bigfloats are created automatically when a number with yes
What does that mean? How do you create a bigfloat?
Ray
Oh, dear. That's probably my fault. One way to do it is to set
default-float-precision to a nonzero value, like this:
default-float-precision
0
(let* ((float1 (string-to-number "9999999999999999.99999999999999999999"))
(default-float-precision 256)
(float2 (string-to-number "9999999999999999.99999999999999999999")))
(+ (if (bigfloatp float1) 1 0)
(if (bigfloatp float2) 2 0)))
2
Or like this:
default-float-precision
0
(let* ((float1 (float
999999999999999999999999999999999999999999999999999999))
(default-float-precision 256)
(float2 (float
999999999999999999999999999999999999999999999999999999)))
(princ float1)
(terpri)
(princ float2)
(terpri))
9.999999999999999e+53
9.99999999999999999999999999999999999999999999999999999E53
t
Or you can use coerce:
(coerce 999999999999999 'bigfloat)
9.99999999999999E14
Regards,
--
Jerry James
http://www.jamezone.org/
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta