Re: pi seems not to be a constant

Raymond Toy <[email protected]>
Newsgroups gmane.lisp.clisp.general
Message-ID <[email protected]>
>>>>> "Don" == Don Cohen <[email protected]> writes:

    Don> [8]> (type-of *one-def*)
    Don> LONG-FLOAT
    Don> [9]> (type-of *one-100*)
    Don> LONG-FLOAT
    Don> [10]>
    Don> This is another non-conformity. clhs eql:
    Don> The value of eql is true of two objects, x and y, in the folowing cases:
    Don> 1. If x and y are eq.
    Don> 2. If x and y are both numbers of the same type and the same value.
    Don> 3. If they are both characters that represent the same character.
    Don> Otherwise the value of eql is false.

    Don> It seems the best solution to this problem would be to
    Don> add to clisp the typespec (long-float precision) which would be a

I think that's not a valid float specifier.

It seems to me that if you want cl:pi to be fixed and never changes
independent of setting long-float-digits, you are pretty much stuck
with cl:pi having a precision of 64 (?) since that is the default
value of long-float-digits.

    Don> - I want (pi &optional precision) and similar functions for other
    Don> constants to compute values of the given precision, with the
    Don> default value of precision being *long-float-digits*

Is it conforming that cl:pi be a function?

    Don> - I want to remove (long-float-digits) and its setf
    Don> - I want pi and the other similar constants to be defconstant
    Don> keeping their initial values.

I would hate that because it breaks (the little) clisp code I have.

    Don> - I'd now add to my wish list the type spec (long-float precision)
    Don> with type-of returning those types for long floats and subtypep
    Don> recognizing those types as subtype of long-float.

    Don> I think my proposal makes it much more practical to use different
    Don> precisions in different pieces of code, including in different
    Don> threads.  
    Don> (BTW I consider this much more valuable than (constantp 'pi).)

I've never really had a need for constantp, so the fact that pi isn't
doesn't bother me.  I want pi to change when I change
long-float-digits.  I would accept allowing (pi) return the a
long-float approx to pi.

And sorry to be pessimistic, but unless a maintainer steps up nothing
is going to happen. Unless you create your own fork at which point you
can do whatever you want.

--
Ray


------------------------------------------------------------------------------
_______________________________________________
clisp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/clisp-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.