I found that there are some Float-Subclasses:
FloatD FloatE FloatQ How can I use them and what are they good for? I do not understand the use of LargeZeroInteger as well. Thanks for possible tutoring! Regards B. Blochl _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
On 29.06.2011, at 15:34, bb wrote:
> I found that there are some Float-Subclasses: > FloatD > FloatE > FloatQ > How can I use them and what are they good for? > I do not understand the use of > LargeZeroInteger > as well. These classes are not in any official Squeak image. What image are you using? Which packages are they in? - Bert - _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
Am 29.06.2011 15:56, schrieb Bert Freudenberg:
> On 29.06.2011, at 15:34, bb wrote: > >> I found that there are some Float-Subclasses: >> FloatD >> FloatE >> FloatQ >> How can I use them and what are they good for? >> I do not understand the use of >> LargeZeroInteger >> as well. > These classes are not in any official Squeak image. What image are you using? Which packages are they in? > > - Bert - > > _______________________________________________ > Beginners mailing list > [hidden email] > http://lists.squeakfoundation.org/mailman/listinfo/beginners versions. I hope that is not a betrayal. I found that classes in a GNU Smalltalk-80 documentation http://www.gnu.org/software/smalltalk//manual-base/html_node/FloatD.html. I was not aware that this was a GNU Smalltalk docu. But that classes do have some interesting methods. Regards B. Blochl _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
On 29.06.2011, at 16:29, bb wrote: > Am 29.06.2011 15:56, schrieb Bert Freudenberg: >> On 29.06.2011, at 15:34, bb wrote: >> >>> I found that there are some Float-Subclasses: >>> FloatD >>> FloatE >>> FloatQ >>> How can I use them and what are they good for? >>> I do not understand the use of >>> LargeZeroInteger >>> as well. >> These classes are not in any official Squeak image. What image are you using? Which packages are they in? >> >> - Bert - >> >> _______________________________________________ >> Beginners mailing list >> [hidden email] >> http://lists.squeakfoundation.org/mailman/listinfo/beginners > I am badly curious - so I sometimes cross check with other Smalltalk80 > versions. I hope that is not a betrayal. Well, if you are not actually using Squeak then it would at least help to state which Smalltalk you are referring too. > I found that classes in a GNU Smalltalk-80 documentation > http://www.gnu.org/software/smalltalk//manual-base/html_node/FloatD.html. I > was not aware that this was a GNU Smalltalk docu. > > But that classes do have some interesting methods. FWIW, Squeak has only one Float class (IEEE double-precision, 64 bits). In addition, there is FloatArray, storing Floats as 32 bit single-precision values. - Bert - _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
Am 29.06.2011 17:03, schrieb Bert Freudenberg:
Well, I found in the selector browser no FloatD/E/Q, but I found corresponding methods asFloatD/E/Q.On 29.06.2011, at 16:29, bb wrote:Am 29.06.2011 15:56, schrieb Bert Freudenberg:On 29.06.2011, at 15:34, bb wrote:I found that there are some Float-Subclasses: FloatD FloatE FloatQ How can I use them and what are they good for? I do not understand the use of LargeZeroInteger as well.These classes are not in any official Squeak image. What image are you using? Which packages are they in? - Bert - _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginnersI am badly curious - so I sometimes cross check with other Smalltalk80 versions. I hope that is not a betrayal.Well, if you are not actually using Squeak then it would at least help to state which Smalltalk you are referring too.I found that classes in a GNU Smalltalk-80 documentation http://www.gnu.org/software/smalltalk//manual-base/html_node/FloatD.html. I was not aware that this was a GNU Smalltalk docu. But that classes do have some interesting methods.FWIW, Squeak has only one Float class (IEEE double-precision, 64 bits). In addition, there is FloatArray, storing Floats as 32 bit single-precision values. - Bert - _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners Just for completeness of Information about that classes in question, I found a description of the methods: onionmixer.net/extra_data/gst.pdf 6.104.4 Number: converting asFloat This method’s functionality should be implemented by subclasses of Number asFloatD This is mandated by the ANSI standard; since GNU Smalltalk currently does not support different floating-point classes, simply convert the receiver to a Float. asFloatE This is mandated by the ANSI standard; since GNU Smalltalk currently does not support different floating-point classes, simply convert the receiver to a Float. asFloatQ This is mandated by the ANSI standard; since GNU Smalltalk currently does not support different floating-point classes, simply convert the receiver to a Float. ... I bolded parts of the text. As I found out in the squeak sources, taht it uses this methods asFloatD/E/Q for the same reason! Regards B. Blochl _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
>>>>> "bb" == bb <[hidden email]> writes:
bb> onionmixer.net/extra_data/gst.pdf You keep bring up GNU Smalltalk. Not to be annoying, but you *do* realize this is a *Squeak* Smalltalk newbie list. If you want to get started with Squeak, check out the Squeak tutorials at http://squeak.org/Documentation/ If you want to learn GNU Smalltalk instead, I'm sure there's an appropriate mailing list for you to join. Please don't ask about GNU Smalltalk here. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <[hidden email]> <URL:http://www.stonehenge.com/merlyn/> Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.posterous.com/ for Smalltalk discussion _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
I brought up GNU Smalltalk for a good reason:"bb" == bb [hidden email] writes:bb> onionmixer.net/extra_data/gst.pdf You keep bring up GNU Smalltalk. Not to be annoying, but you *do* realize this is a *Squeak* Smalltalk newbie list. If you want to get started with Squeak, check out the Squeak tutorials at http://squeak.org/Documentation/ I miss that clearification concerning FloatD/FloatE/FloatQ in any documentation about squeak. (And beside: I do not plane to make bowling or other games in Squeak! And even in Ducasses Book "Squeak: Learn Programming with Robots." numeric precision is not a topic. Well, one might say squeak is squeak and Smalltalk is Smalltalk - certainly I know, that there are dialects of Smalltalk. But on the back cover of "Squeak - A quick trip to Objectland" I found an intro: "The Squeak programming language, an open and portable Smalltalk-80 implementation, ...". And the home page of squeak remarks: Noteworthy aspects of Squeak include: * A mostly Smalltalk-80 and ANSI Smalltalk X3J20 compatible language and base libraries * ... So it should be legal to compare to i.e. "Draft American National Standard for Information Systems - Programming Languages - Smalltalk" and ask about such Smalltalk-80 topics including compatibility. Ironically one can download it from the squeak wiki (wiki.squeak.org/squeak/uploads/172/standard_v1_9-indexed.pdf). So if you do not like GNU Smalltalk, read page 28 of "Draft American National Standard for Information Systems - Programming Languages - Smalltalk" instead: "An implementation may support up to three different floating point numeric representations with varying precision and ranges ..." But that source does not explained why squeak does have asFlotD/E/Q as well. But that is explained in the GNU Smalltalk documentation and I am absolutely sure that that is true for Squeak as well. I would be thankful if you give me an advice, where I should aks my questions if not at the beginners mail list? If you want to learn GNU Smalltalk instead, I'm sure there's an appropriate mailing list for you to join. Please don't ask about GNU Smalltalk here. I did not ask a GNU Smalltalk question! I asked a "Draft American National Standard for Information Systems - Programming Languages - Smalltalk" question concerning Aqueak and GNU Smalltalk as well. But I found an explanation in the GNU Smalltalk docu, that is missing in any Squeak docu! (I browsed all of them for FloatD/EQ!) I do not want to learn GNU Smalltalk and I do not want to learn Squeak, but I want to learn Smalltalk- 80! (Squeak and Smalltalk-80? See above!) If you and the Squeak Organisation do not like such questions simply remark on the home page: "Squeak is not Smalltalk-80 and not ANSI Smalltalk X3J20 compatible! And may be you might add: Just a Toy for Children. The Squeak homepage claims just the oposit. And you might add: Do not bother us with Smalltalk queations, we are just gaming. Some CS people have warned me to caution against Squeak as I told to give it a try. So you see that the Squeak reputation is not very high. With your mail you force the common broad idea that Squeak is just a gaming thingy for kiddies. I would thank anyone very much who can point me to another free Smalltalk-80 Version - than I promise not to bother you any longer. Regards B. Blochl _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
On Thu, Jun 30, 2011 at 4:56 AM, bb <[hidden email]> wrote:
Note that even you said that the home page says "A mostly Smalltalk-80 and ANSI Smalltalk X3J20 compatible language and base libraries"
The home page already says "Squeak is not Smalltalk-80 and not ANSI Smalltalk X3J20 compatible!" because it says mostly. Nobody has ever claimed 100% compatibility.
The GNU Smalltalk documentation is for GNU Smalltalk. Period. If you have questions about that documentation, then ask them. I think it is perfectly fine to ask questions about Squeak documentation or lack thereof. Just phrase your questions in the context of Squeak. If you do not care to use Squeak then use a different Smalltalk implementation and ask questions on the appropriate mailing list. This seems reasonable to me.
-- Edwin G. Castro _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
In reply to this post by bblochl
bb <bblochl <at> arcor.de> writes:
> > > Am 30.06.2011 11:53, schrieb Randal L. Schwartz: > > > > > > > "bb" == bb <bblochl <at> arcor.de> writes: > > > > > > > > bb> onionmixer.net/extra_data/gst.pdf > > > > I did not ask a GNU Smalltalk question! I asked a "Draft American > National Standard for Information Systems - Programming Languages - > Smalltalk" question concerning Aqueak and GNU Smalltalk as well. But > I found an explanation in the GNU Smalltalk docu, that is missing in > any Squeak docu! (I browsed all of them for FloatD/EQ!) > I do not want to learn GNU Smalltalk and I do not want to learn > Squeak, but I want to learn Smalltalk- 80! (Squeak and Smalltalk-80? > See above!) > If you and the Squeak Organisation do not like such questions simply > remark on the home page:"Squeak is not Smalltalk-80 and not ANSI Smalltalk > compatible! > And may be you might add: Just a Toy for Children. The Squeak > homepage claims just the oposit. > And you might add: Do not bother us with Smalltalk queations, we are > just gaming. > Some CS people have warned me to caution against Squeak as I told to > give it a try. So you see that the Squeak reputation is not very > high. With your mail you force the common broad idea that Squeak is > just a gaming thingy for kiddies. > I would thank anyone very much who can point me to another free > Smalltalk-80 Version - than I promise not to bother you any longer. > > Regards > B. Blochl > > a required feature, so Randall is right when saying this question is irrelevant, because it is GNU-implementation-specific. Squeak only has Float == FloatD, which is conform to ANSI. But squeak is not fully conforming to the ANSI standard. For example, it lacks asFloatD asFloatE asFloatQ. Here, you questions are fully relevant. AFAIK, there was an ANSI compatibility optional package in squeakmap and/or squeaksource, but I don't know if it is maintained. Nicolas _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
In reply to this post by bblochl
On Wed, Jun 29, 2011 at 8:34 AM, bb <[hidden email]> wrote:
> I found that there are some Float-Subclasses: > FloatD > FloatE > FloatQ > How can I use them and what are they good for? > I do not understand the use of > LargeZeroInteger > as well. Squeak does not have these classes. In fact, most Smalltalks do not, even though it is part of the ANSI standard. The only numeric classes that are part of the regular image are Float, Fraction and Integer, with its subclasses LargePositiveInteger, LargeNegativeInteger, and SmallInteger. There are other numeric classes out there, such as Complex, but these are the ones that get used by everybody. It has been a while since I have used VisualWorks. It has a fixed decimal number, in addition to the ones I just mentioned. But I don't think it has the subclasses of Float, either. -Ralph Johnson _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
Ralph Johnson <johnson <at> cs.uiuc.edu> writes:
> > On Wed, Jun 29, 2011 at 8:34 AM, bb <bblochl <at> arcor.de> wrote: > > I found that there are some Float-Subclasses: > > FloatD > > FloatE > > FloatQ > > How can I use them and what are they good for? > > I do not understand the use of > > LargeZeroInteger > > as well. > > Squeak does not have these classes. In fact, most Smalltalks do not, > even though it is part of the ANSI standard. The only numeric classes > that are part of the regular image are Float, Fraction and Integer, > with its subclasses LargePositiveInteger, LargeNegativeInteger, and > SmallInteger. There are other numeric classes out there, such as > Complex, but these are the ones that get used by everybody. > > It has been a while since I have used VisualWorks. It has a fixed > decimal number, in addition to the ones I just mentioned. But I don't > think it has the subclasses of Float, either. > > -Ralph Johnson > VW has Float = FloatE and Double = FloatD, but no FloatQ. Beside, it has SmallDouble = optimized FloatD in case of limitefd exponent. Smalltalk-X has the three classes. Dolphin only has Float = FloatD if I remember well. VA ? I also checked about asInteger, VW does the same as Squeak, truncate, and I think it is inherited directly from st-80. Being both Smalltalk-80 and ANSI is somehow a bit uncompatible, though I'm not sure Smalltalk-80 is normative... Nicolas _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
There was a ScaledDecimal class in Squeak before the licence change, afaik.
Karl On Thu, Jun 30, 2011 at 8:34 PM, nicolas cellier <[hidden email]> wrote: Ralph Johnson <johnson <at> cs.uiuc.edu> writes: _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
In reply to this post by bblochl
On 6/30/2011 13:56, bb wrote:
> Am 30.06.2011 11:53, schrieb Randal L. Schwartz: >>>>>>> "bb" == bb<[hidden email]> writes: >> bb> onionmixer.net/extra_data/gst.pdf >> >> You keep bring up GNU Smalltalk. >> >> Not to be annoying, but you *do* realize this is a *Squeak* Smalltalk >> newbie list. If you want to get started with Squeak, check out the >> Squeak tutorials athttp://squeak.org/Documentation/ > I brought up GNU Smalltalk for a good reason: > I miss that clearification concerning FloatD/FloatE/FloatQ *in any > documentation about squeak*. <... snip ...> > So it should be legal to compare to i.e. "Draft American National > Standard for Information > Systems - Programming Languages - Smalltalk" and ask about such > Smalltalk-80 topics including compatibility. Ironically one can download > it from the squeak wiki > (wiki.squeak.org/squeak/uploads/172/standard_v1_9-indexed.pdf). So if > you do not like GNU Smalltalk, read page 28 of "Draft American National > Standard for Information Systems - Programming Languages - Smalltalk" > instead: > "An implementation may support up to three different floating point > numeric representations with varying precision and ranges ..." You should have said this to begin with. Up until this point your question did sound like you were simply asking in the wrong place. > But that source does not explained why squeak does have asFlotD/E/Q as > well. Simple: Ansi says that an implementation MAY support different floating point numeric representations. Squeak only supports one, Float. However, in order to support ANSI compatible code that would rather use particular representations, it implements the messages by returning the only representation that it supports. So that client code that asks for it gets the (only) available approximation for the requested representation. Whether that is good enough or not is a different matter (personally, I have not seen code that uses #asFloat[E|D|Q]) but this is a best effort solution. > I would be thankful if you give me an advice, where I should aks my > questions if not at the beginners mail list? This is the right list. But in the future please provide the relevant context such as the reference to the ANSI standard. Asking a question like "Why does Foo Smalltalk have class Frobnifier?" is likely to get you a response along the lines of "you should ask the people who use Foo Smalltalk". However, asking the question in the form "In Foo Smalltalk there is class Frobnifier to deal with frobnification. Is there an equivalent class in Squeak, or if not, how would you frobnify using Squeak?" is perfectly appropriate. It's all about the context. Cheers, - Andreas _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
In reply to this post by Bert Freudenberg
----- Original Nachricht ---- Von: Bert Freudenberg <[hidden email]> An: "A friendly place to get answers to even the most basic questions about Squeak." <[hidden email]> Datum: 29.06.2011 17:03 Betreff: Re: [Newbies] Float-Subclasses? > > On 29.06.2011, at 16:29, bb wrote: > > > Am 29.06.2011 15:56, schrieb Bert Freudenberg: > >> On 29.06.2011, at 15:34, bb wrote: > >> > >>> I found that there are some Float-Subclasses: > >>> FloatD > >>> FloatE > >>> FloatQ > >>> How can I use them and what are they good for? > >>> I do not understand the use of > >>> LargeZeroInteger > >>> as well. > >> These classes are not in any official Squeak image. What image are you > using? Which packages are they in? > Well, if you are not actually using Squeak then it would at least help to state which Smalltalk you are referring too. That was the mail where the Smalltalk brand came in, the name of I do not want to repeat. Would have been better to bring in the "Draft American National Standard for Information Systems - Programming Languages - Smalltalk? Thank you for all the many sympathic responds to my question, mostly correct. I can not and will not respond to every single argument. There was a special reason for my question, namely this method -ther are many others helpful for numeric "precise" calclatons: decimalDigits Return the number of decimal digits of precision for a FloatD. Technically, if P is the precision for the representation, then the decimal precision Q is the maximum number of decimal digits such that any floating point number with Q base 10 digits can be rounded to a floating point number with P base 2 digits and back again, without change to the Q decimal digits. Please understand that I forgot where I found the definition. Anyway, thanks again. I do not longer want to waste your time and get off the mail list - now. Cheers and have fun! B. B. > >> > >> - Bert - > >> > >> _______________________________________________ > >> Beginners mailing list > >> [hidden email] > >> http://lists.squeakfoundation.org/mailman/listinfo/beginners > > I am badly curious - so I sometimes cross check with other Smalltalk80 > > versions. I hope that is not a betrayal. > > Well, if you are not actually using Squeak then it would at least help to > state which Smalltalk you are referring too. > > > I found that classes in a GNU Smalltalk-80 documentation > > http://www.gnu.org/software/smalltalk//manual-base/html_node/FloatD.html. > I > > was not aware that this was a GNU Smalltalk docu. > > > > But that classes do have some interesting methods. > > FWIW, Squeak has only one Float class (IEEE double-precision, 64 bits). In > addition, there is FloatArray, storing Floats as 32 bit single-precision > values. > > - Bert - > > _______________________________________________ > Beginners mailing list > [hidden email] > http://lists.squeakfoundation.org/mailman/listinfo/beginners > Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
<bblochl <at> arcor.de> writes:
> > That was the mail where the Smalltalk brand came in, the name of I do not want to repeat. Would have been better > to bring in the "Draft American National Standard for Information Systems - Programming Languages - Smalltalk? > > Thank you for all the many sympathic responds to my question, mostly correct. I can not and will not respond > to every single argument. > > There was a special reason for my question, namely this method -ther are many others helpful for numeric > "precise" calclatons: > > decimalDigits > Return the number of decimal digits of precision for a FloatD. Technically, if P is the precision for the > representation, then the decimal precision Q is the maximum number of decimal digits such that any > floating point number with Q base 10 digits can be rounded to a floating point number with P base 2 digits and > back again, without change to the Q decimal digits. > > Please understand that I forgot where I found the definition. > > Anyway, thanks again. I do not longer want to waste your time and get off the mail list - now. > > Cheers and have fun! > > B. B. That's an interesting topic. You must be aware that 4 years ago, most (all?) Smalltalk would have failed to read the Float back whatever the number of digits used. This is because Float was used in intermediate computations. Thus several rounding errors did cumulate when converting back in base 2. Currently, Squeak/Pharo/gst, have corrected this behavior. Probably Dolphin and Smalltalk/X too. Maybe the latest VWNC 7.8 too... ...but I can't test, the version is not easily available. In Squeak, Float>>storeOn: outputs the shortest representation that will convert back to same Float. I think this behavior is superior to #decimalDigits That's a feature I'd like to have by default and miss constantly in C, etc... Pharo did also connect this behavior to Float>>printOn:, IMO a good idea. Nicolas _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
Free forum by Nabble | Edit this page |