Re: pi seems not to be a constant
Raymond Toy <[email protected]>
| Newsgroups | gmane.lisp.clisp.general |
|---|---|
| Message-ID | <[email protected]> |
>>>>> "Pierpaolo" == Pierpaolo Bernardi <[email protected]> writes: Pierpaolo> On Sun, Oct 18, 2015 at 10:10 PM, Don Cohen Pierpaolo> <[email protected]> wrote: >> > The problem then is the value of CL:PI. What do you propose it should be? >> >> I propose it should be the default value before changing >> LONG-FLOAT-DIGITS. >> >> > If you use EXT:LONG-FLOAT-DIGITS then you are outside of portable CL, >> > and you should take into account your uses of this function in your >> > coding. >> Exactly. So PI should be the constant value that it would be without >> using that. >> >> > If you don't use EXT:LONG-FLOAT-DIGITS then the only non-confomance is >> > that some things that should be constant variables are variables >> > instead (but they won't in fact vary). >> >> In my solution, if you don't use long-float-digits one might >> reasonably argue that everything is compliant - there are no better >> approximations of pi available without using long-float-digits. Pierpaolo> Yes, now it is a sound proposal. But, if implemented in plain Clisp it Pierpaolo> would make variable precision floats a PITA to use, in addition to Pierpaolo> invalidating all previously written Clisp programs using variable Pierpaolo> precision floats. Pierpaolo> One solution could be for the ansi mode to transform all these Pierpaolo> variables in constant variables, and remove the EXT:LONG-FLOAT-DIGITS Pierpaolo> function from the image. As a user (not developer), I rather like that if I (setf (long-float-digits)), pi does change. That clisp is the only lisp I use where long-float and double-float are different has allowed to find and fix erroneous assumptions in my code where I had assumed pi was a double-float. -- Ray ------------------------------------------------------------------------------ _______________________________________________ clisp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/clisp-list