Re: Float printString?

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

thanks for your comment.
The inspect is here, whatever it means..

An instance of FloatD
  [1]: 224
  [2]: 221
  [3]: 240
  [4]: 122
  [5]: 184
  [6]: 184
  [7]: 41
  [8]: 191

Instead of an inspect I checked the values in the calculation:

    quo := (endHeight-startHeight)/length.
    quo inspect.
    Transcript showCr: 'endHeight: ',endHeight printStringIfNecessary.
    Transcript showCr: 'startHeight: ',startHeight printStringIfNecessary.
    Transcript showCr: 'length: ',length printStringIfNecessary.
    Transcript showCr: 'Lejtés: ',quo printStringIfNecessary.       #<-----
error happens here



Printout:

endHeight: 99
startHeight: 110.0
length: 56053.86243369161
*<same error msg here>*

Calculating the same in bc

(99-110.0)/56053.86243369161
-.00019623982224262149


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
_______________________________________________
help-smalltalk mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-smalltalk
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.