* most-positive-float, most-negative-float coming up nil
@ 2011-10-25 15:59 Burton Samograd
2011-10-25 16:09 ` Glenn Morris
2011-10-25 16:15 ` Jambunathan K
0 siblings, 2 replies; 5+ messages in thread
From: Burton Samograd @ 2011-10-25 15:59 UTC (permalink / raw)
To: emacs-devel
Version: "GNU Emacs 24.0.90.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.20.1)
of 2011-10-07 on bsamograd-ubuntu"
Just playing around with emacs lisp and I thought I would try the
most-positive/most-negative variables to see numeric range.
most-positive-fixnum
2305843009213693951
most-negative-fixnum
-2305843009213693952
most-positive-float
nil
most-negative-float
nil
Any reason why the float values are coming up nil?
--
Burton Samograd
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: most-positive-float, most-negative-float coming up nil
2011-10-25 15:59 most-positive-float, most-negative-float coming up nil Burton Samograd
@ 2011-10-25 16:09 ` Glenn Morris
2011-10-25 16:15 ` Jambunathan K
1 sibling, 0 replies; 5+ messages in thread
From: Glenn Morris @ 2011-10-25 16:09 UTC (permalink / raw)
To: Burton Samograd; +Cc: emacs-devel
Burton Samograd wrote:
> most-positive-float
> nil
> most-negative-float
> nil
>
> Any reason why the float values are coming up nil?
Call `cl-float-limits' first.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: most-positive-float, most-negative-float coming up nil
2011-10-25 15:59 most-positive-float, most-negative-float coming up nil Burton Samograd
2011-10-25 16:09 ` Glenn Morris
@ 2011-10-25 16:15 ` Jambunathan K
2011-10-25 16:31 ` Burton Samograd
1 sibling, 1 reply; 5+ messages in thread
From: Jambunathan K @ 2011-10-25 16:15 UTC (permalink / raw)
To: Burton Samograd; +Cc: emacs-devel
Burton Samograd <bsamograd@interalia.com> writes:
> Version: "GNU Emacs 24.0.90.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.20.1)
> of 2011-10-07 on bsamograd-ubuntu"
>
> Just playing around with emacs lisp and I thought I would try the
> most-positive/most-negative variables to see numeric range.
>
> most-positive-fixnum
> 2305843009213693951
> most-negative-fixnum
> -2305843009213693952
> most-positive-float
> nil
> most-negative-float
> nil
>
> Any reason why the float values are coming up nil?
M-: (info "(cl) Implementation Parameters")
Or
M-x info-display-manual RET cl RET
i most-positive-float
will land you in a page which has the following entry.
,----
| -- Function: cl-float-limits
| This function makes sure that the Common Lisp floating-point
| parameters like `most-positive-float' have been initialized.
| Until it is called, these parameters will be `nil'. If this
| version of Emacs does not support floats, the parameters will
| remain `nil'. If the parameters have already been initialized,
| the function returns immediately.
|
| The algorithm makes assumptions that will be valid for most modern
| machines, but will fail if the machine's arithmetic is extremely
| unusual, e.g., decimal.
`----
>
> --
> Burton Samograd
>
>
>
--
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: most-positive-float, most-negative-float coming up nil
2011-10-25 16:15 ` Jambunathan K
@ 2011-10-25 16:31 ` Burton Samograd
2011-10-25 20:12 ` Stefan Monnier
0 siblings, 1 reply; 5+ messages in thread
From: Burton Samograd @ 2011-10-25 16:31 UTC (permalink / raw)
To: emacs-devel
I did not (require 'cl) during my testing so I never thought of looking
there. Looks like something I have loaded in my .emacs file does. It
seems odd that most-positive/negative-fixnum are standard in emacs lisp
but not the float versions without requiring cl (plus requiring an
additional function to be called to initialize them is even more odd).
It's not like floats aren't a standard part of the emacs lisp language.
--
Burton Samograd
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: most-positive-float, most-negative-float coming up nil
2011-10-25 16:31 ` Burton Samograd
@ 2011-10-25 20:12 ` Stefan Monnier
0 siblings, 0 replies; 5+ messages in thread
From: Stefan Monnier @ 2011-10-25 20:12 UTC (permalink / raw)
To: Burton Samograd; +Cc: emacs-devel
> It seems odd that most-positive/negative-fixnum are standard in Emacs
> lisp but not the float versions without requiring cl (plus requiring
> an additional function to be called to initialize them is even more
> odd). It's not like floats aren't a standard part of the Emacs
> lisp language.
Apparently nobody ever found enough of a need for most-positive-float
in Elisp (and even less so for most-negative-float).
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-10-25 20:12 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-25 15:59 most-positive-float, most-negative-float coming up nil Burton Samograd
2011-10-25 16:09 ` Glenn Morris
2011-10-25 16:15 ` Jambunathan K
2011-10-25 16:31 ` Burton Samograd
2011-10-25 20:12 ` Stefan Monnier
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).