further tests Re: Float printString?

Robert Kuszinger <[email protected]>
Newsgroups gmane.comp.lang.smalltalk.gnu.general
Message-ID <CAJS2e5gYCyqGzz6RCoWfw7vze0FrTVUYyWgOY5-gtNcYAyDXqg@mail.gmail.com>
Dear Holger,

I've checked the Float class source and narrowed the error to this
scenario, which is a differend code point but raises the same error:

(start gst in command line and enter the following:)

2 raisedToInteger: (-0.00019623982224262149)  exponent -
(-0.00019623982224262149) class precision + 1

Going into details:

st>(-0.00019623982224262149)  exponent
-13



st> (-0.00019623982224262149) class precision
53
st> (-0.00019623982224262149) class precision + 1
54

So, -13 - 54 = -67

2^(-67) with calculator:       2^(-67) = 6.7762636e-21


Evaluating the following leads to the same:

st> 2 raisedToInteger: -67
Object: 1 error: The program attempted to divide a number by zero
ZeroDivide(Exception)>>signal (ExcHandling.st:254)
SmallInteger(Number)>>zeroDivide (SysExcept.st:1386)
Fraction>>setNumerator:setDenominator: (Fraction.st:485)
Fraction class>>numerator:denominator: (Fraction.st:66)
Fraction>>raisedToInteger: (Fraction.st:510)
SmallInteger(Number)>>raisedToInteger: (Number.st:922)
UndefinedObject>>executeStatements (a String:1)


best regards
Robert




2016-07-06 12:08 GMT+02:00 Holger Freyther <[email protected]>:

>
> > On 06 Jul 2016, at 10:44, Robert Kuszinger <[email protected]> wrote:
> >
> > Hello!
> >
> > I've made a script to perform GRASS GIS operations automatically.
> > It was running for weeks nicely.
> >
> > Today it emerged:
> >
> > Object: 1 error: The program attempted to divide a number by zero
>
>
>
> > ZeroDivide(Exception)>>signal (ExcHandling.st:254)
> > SmallInteger(Number)>>zeroDivide (SysExcept.st:1386)
> > Fraction>>setNumerator:setDenominator: (Fraction.st:485)
> > Fraction class>>numerator:denominator: (Fraction.st:66)
> > Fraction>>raisedToInteger: (Fraction.st:510)
>
> so the denominator is 0? Can you use >>#inspect on your float to see what
> your float looks like?
>
> holger
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.