Re: pi seems not to be a constant
[email protected] (Don Cohen)
| Newsgroups | gmane.lisp.clisp.general |
|---|---|
| Message-ID | <[email protected]> |
> PI is required to be the best long float approximation to pi. If it > wasn't then it would be wrong. But that is already long unless long float digits is at its maximal value. > Also, PI is required to be a constant variable. It isn't and so it's > wrong. But i think this "wrong" is a very small price to pay in > exchange for having adjustable precision long floats. I'm not proposing to keep LONG-FLOAT-DIGITS at its maximal value, so I'm satisfied allowing PI not to be the best available approximation. > In this case you are using a Clisp extension and you are getting what > Clisp promises to deliver. So it is right. Setting LONG-FLOAT-DIGITS is also using a clisp extension. By using that you accept whatever non-conformance it causes. > 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. ------------------------------------------------------------------------------ _______________________________________________ clisp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/clisp-list