about FLoatArrays isZero

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

about FLoatArrays isZero

Stéphane Ducasse
isZero on collection does not make sense so it was deprecated now

some tests like are breaking

        3.0 / (FloatArray with: 2.0) = (FloatArray with: 1.5)

so ?
Stef

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: about FLoatArrays isZero

Nicolas Cellier
(a - b) allSatisfy: [:each | each isZero] ?

2009/6/13 Stéphane Ducasse <[hidden email]>:

> isZero on collection does not make sense so it was deprecated now
>
> some tests like are breaking
>
>        3.0 / (FloatArray with: 2.0) = (FloatArray with: 1.5)
>
> so ?
> Stef
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: about FLoatArrays isZero

Michael Roberts-2
I haven't yet looked at the cs on the mantis report, but why do we
expect to be able to coerce a collection into a number? (non an
obvious behaviour for collections)

thanks,
Mike

On Sat, Jun 13, 2009 at 3:48 PM, Nicolas
Cellier<[hidden email]> wrote:

> (a - b) allSatisfy: [:each | each isZero] ?
>
> 2009/6/13 Stéphane Ducasse <[hidden email]>:
>> isZero on collection does not make sense so it was deprecated now
>>
>> some tests like are breaking
>>
>>        3.0 / (FloatArray with: 2.0) = (FloatArray with: 1.5)
>>
>> so ?
>> Stef
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: about FLoatArrays isZero

Stéphane Ducasse
I hate this coercion.

Nicolas I do not understand your answer.
For me a collection isZero means nothing.

Stef

On Jun 13, 2009, at 5:04 PM, Michael Roberts wrote:

> I haven't yet looked at the cs on the mantis report, but why do we
> expect to be able to coerce a collection into a number? (non an
> obvious behaviour for collections)
>
> thanks,
> Mike
>
> On Sat, Jun 13, 2009 at 3:48 PM, Nicolas
> Cellier<[hidden email]> wrote:
>> (a - b) allSatisfy: [:each | each isZero] ?
>>
>> 2009/6/13 Stéphane Ducasse <[hidden email]>:
>>> isZero on collection does not make sense so it was deprecated now
>>>
>>> some tests like are breaking
>>>
>>>        3.0 / (FloatArray with: 2.0) = (FloatArray with: 1.5)
>>>
>>> so ?
>>> Stef
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> [hidden email]
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: about FLoatArrays isZero

Nicolas Cellier
The failing test you exposed sounds like the difference is used to
test equality between two FloatArray.
If that is the case, you could replace isZero by isAllZero.
I did not run an image nor look at the code, alors je suis peut être à
côté de la plaque...


2009/6/13 Stéphane Ducasse <[hidden email]>:

> I hate this coercion.
>
> Nicolas I do not understand your answer.
> For me a collection isZero means nothing.
>
> Stef
>
> On Jun 13, 2009, at 5:04 PM, Michael Roberts wrote:
>
>> I haven't yet looked at the cs on the mantis report, but why do we
>> expect to be able to coerce a collection into a number? (non an
>> obvious behaviour for collections)
>>
>> thanks,
>> Mike
>>
>> On Sat, Jun 13, 2009 at 3:48 PM, Nicolas
>> Cellier<[hidden email]> wrote:
>>> (a - b) allSatisfy: [:each | each isZero] ?
>>>
>>> 2009/6/13 Stéphane Ducasse <[hidden email]>:
>>>> isZero on collection does not make sense so it was deprecated now
>>>>
>>>> some tests like are breaking
>>>>
>>>>        3.0 / (FloatArray with: 2.0) = (FloatArray with: 1.5)
>>>>
>>>> so ?
>>>> Stef
>>>>
>>>> _______________________________________________
>>>> Pharo-project mailing list
>>>> [hidden email]
>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> [hidden email]
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: about FLoatArrays isZero

Nicolas Cellier
Ah OK, I just ran the test, I know understand.
You could eventually replace isZero with = 0 in that case...

2009/6/13 Nicolas Cellier <[hidden email]>:

> The failing test you exposed sounds like the difference is used to
> test equality between two FloatArray.
> If that is the case, you could replace isZero by isAllZero.
> I did not run an image nor look at the code, alors je suis peut être à
> côté de la plaque...
>
>
> 2009/6/13 Stéphane Ducasse <[hidden email]>:
>> I hate this coercion.
>>
>> Nicolas I do not understand your answer.
>> For me a collection isZero means nothing.
>>
>> Stef
>>
>> On Jun 13, 2009, at 5:04 PM, Michael Roberts wrote:
>>
>>> I haven't yet looked at the cs on the mantis report, but why do we
>>> expect to be able to coerce a collection into a number? (non an
>>> obvious behaviour for collections)
>>>
>>> thanks,
>>> Mike
>>>
>>> On Sat, Jun 13, 2009 at 3:48 PM, Nicolas
>>> Cellier<[hidden email]> wrote:
>>>> (a - b) allSatisfy: [:each | each isZero] ?
>>>>
>>>> 2009/6/13 Stéphane Ducasse <[hidden email]>:
>>>>> isZero on collection does not make sense so it was deprecated now
>>>>>
>>>>> some tests like are breaking
>>>>>
>>>>>        3.0 / (FloatArray with: 2.0) = (FloatArray with: 1.5)
>>>>>
>>>>> so ?
>>>>> Stef
>>>>>
>>>>> _______________________________________________
>>>>> Pharo-project mailing list
>>>>> [hidden email]
>>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>>
>>>>
>>>> _______________________________________________
>>>> Pharo-project mailing list
>>>> [hidden email]
>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> [hidden email]
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project