READ-DEFAULT-FLOAT-FORMAT and reader macros
From: Nicolas Neuss (my.name_at_iwr.uni-heidelberg.de)
Date: 12/30/04
- Next message: mmcconnell17704_at_yahoo.com: "Re: Newbie: How do I exit from a loop when a condition is met?"
- Previous message: lin8080: "Re: the best Linux for me"
- Next in thread: Pascal Bourguignon: "Re: READ-DEFAULT-FLOAT-FORMAT and reader macros"
- Reply: Pascal Bourguignon: "Re: READ-DEFAULT-FLOAT-FORMAT and reader macros"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 30 Dec 2004 16:12:26 +0100
Hello,
for numerical purposes, SINGLE-FLOAT precision will usually be too bad.
Because I got tired with typing numbers as 1.0d0 many times I have switched
*READ-DEFAULT-FLOAT-FORMAT* to DOUBLE-FLOAT when starting up Lisp. This
more or less works for me, but I wonder if it is the right thing to do,
because I have experienced trouble at least one time when loading another
application which was expecting SINGLE-FLOAT to be the default reader
format.
Maybe the best thing would be that no application should depend on
*READ-DEFAULT-FLOAT-FORMAT*, but works reasonably with any type of numbers.
Then the user would choose the default format when loading the application.
On the other hand, this could introduce undesired effects when the format
is changed between loading the application and actually using it (for
example, I generate classes and methods special to certain float formats).
Another question related to this is what to do with reader macros which are
defined for an application. E.g. in my application Femlisp, I have defined
#M(...) for reading matrices, but have seen later that it is also used in
the SERIES package for other purposes. Should applications generally use a
separate readtable when defining reader macros? Then, of course it would
be nice if IDEs (e.g. SLIME) would switch readtables as needed.
I remember a recent discussion about related issues (case sensitivity?)
which more or less concluded that the situation could not be handled
perfectly within ANSI CL (in contrast to Genera). But what are people
really doing in such cases?
Thank you and happy new year,
Nicolas.
- Next message: mmcconnell17704_at_yahoo.com: "Re: Newbie: How do I exit from a loop when a condition is met?"
- Previous message: lin8080: "Re: the best Linux for me"
- Next in thread: Pascal Bourguignon: "Re: READ-DEFAULT-FLOAT-FORMAT and reader macros"
- Reply: Pascal Bourguignon: "Re: READ-DEFAULT-FLOAT-FORMAT and reader macros"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|