On Thu, Aug 7, 2014 at 9:05 AM, Levente Uzonyi <[hidden email]> wrote:
Agreed. Smalltalk-80 v2 had no literal fractions. ObjectWorks and VisualWorks have never had literal fractions. I can't speak for other dialects, but I'm fairly sure none of the Smalltalk/V, Team/V lineage had literal Fractions either.
best, Eliot
|
Hi Folks,
|
Hi Juan,
On Thu, Aug 7, 2014 at 9:40 AM, J. Vuletich (mail lists) <[hidden email]> wrote:
What happens if you try compiling a method containing a literal Fraction and both debug it and decompile it.
Dan doesn't say anything about Fraction literals in this message.
What, that 1e-3 is a Fraction, not a Float?
best, Eliot
|
On Thu, 7 Aug 2014, Eliot Miranda wrote:
> Hi Juan, > > On Thu, Aug 7, 2014 at 9:40 AM, J. Vuletich (mail lists) <[hidden email]> wrote: > > Hi Folks, > > Just tried Smalltalk-80 (actually Apple Smalltalk-80 running in Mini vMac). > 1e-3 "printIt" (1/1000) > 1e-3 class "printIt" Fraction > 1e3 "printIt" 1000 > 1e3 class "printIt" SmallInteger > > This has always been the behavior in Squeak too. > > > What happens if you try compiling a method containing a literal Fraction and both debug it and decompile it. > > Also check these comments from Dan: http://lists.squeakfoundation.org/pipermail/squeak-dev/2000-March/013368.html > > > Dan doesn't say anything about Fraction literals in this message. >>Lowercase 'e' is used to designate the exponent of a floating point >>number (as are 'd' and 'q'). It is illegal to specify an exponent for >>what is otherwise an integer--eg, 10e10 is illegal, while 10.0e10 is >>legal. and "Radix, digits and exponent defined analogously over ints, largeInts, and Floats." > > > I don't think this is a bug at all. > > > What, that 1e-3 is a Fraction, not a Float? If 1e-3 is a Float, shouldn't 1e3 be a Float too? Levente |
In reply to this post by Eliot Miranda-2
Hi Eliot,
Quoting Eliot Miranda <[hidden email]>: > Hi Juan, > > On Thu, Aug 7, 2014 at 9:40 AM, J. Vuletich (mail lists) > <[hidden email]> wrote: > >> Hi Folks, >> >> Just tried Smalltalk-80 (actually Apple Smalltalk-80 running in Mini >> vMac). >> 1e-3 "printIt" (1/1000) >> 1e-3 class "printIt" Fraction >> 1e3 "printIt" 1000 >> 1e3 class "printIt" SmallInteger >> >> This has always been the behavior in Squeak too. > > > What happens if you try compiling a method containing a literal > Fraction and both debug it and decompile it. > literal. Source code form for that is '1e-3'. Debugger works as in Squeak or Cuis. >> Also check these comments from Dan: >> http://lists.squeakfoundation.org/pipermail/squeak-dev/2000-March/013368.html > > > Dan doesn't say anything about Fraction literals in this message. He does talk about scientific notation '1e3' and '1e-3' meaning not Float, but SmallInteger and Fraction. The subject of this thread is "Float parsed as Fraction bug". >> I don't think this is a bug at all. > > > What, that 1e-3 is a Fraction, not a Float? Yes. That, and allowing for Fraction literals in methods. >> BTW, Cuis also supports 1r111111111111 = 12 after this :) Cheers, Juan Vuletich St80FractionLiteral.PNG (31K) Download Attachment |
On Thu, Aug 7, 2014 at 12:03 PM, J. Vuletich (mail lists) <[hidden email]> wrote: -- Hi Eliot, then if you feel strongly change it back, but you need to fix this:
(1/2) isLiteral false when you do so.
best, Eliot
|
Free forum by Nabble | Edit this page |