Re: [Pharo-dev] Unnecessary double checks of infinity

2020-01-22 Thread Serge Stinckwich
https://github.com/pharo-project/pharo/issues/5542 On Sun, Dec 22, 2019 at 5:12 PM Serge Stinckwich wrote: > Hi all, > I'm having a look how floats are printed. > Why we check two times if a Float is infinite ? > A first time in: > > Float>>printOn: stream base: base > ... > self isInfinite > if

[Pharo-dev] Unnecessary double checks of infinity

2019-12-22 Thread Serge Stinckwich
Hi all, I'm having a look how floats are printed. Why we check two times if a Float is infinite ? A first time in: Float>>printOn: stream base: base ... self isInfinite ifTrue: [ stream nextPutAll: 'Float infinity'. ^ self sign = -1 ifTrue: [ stream nextPutAll: ' negated' ] ]. ... and a second ti