[squeak-dev] The Trunk: Kernel-nice.1261.mcz
Nicolas Cellier
nicolas.cellier.aka.nice at gmail.com
Wed Aug 28 21:04:37 UTC 2019
I missed this obvious case because the KernelTests-Numbers did pass.
I wish I could amend squash or fixup, but nevermind...
Le mer. 28 août 2019 à 23:01, <commits at source.squeak.org> a écrit :
> Nicolas Cellier uploaded a new version of Kernel to project The Trunk:
> http://source.squeak.org/trunk/Kernel-nice.1261.mcz
>
> ==================== Summary ====================
>
> Name: Kernel-nice.1261
> Author: nice
> Time: 28 August 2019, 11:00:52.985296 pm
> UUID: b8758656-d1f0-49cd-976c-cbd7d772b1f3
> Ancestors: Kernel-nice.1260
>
> Oups, I forgot to fix Float negativeInfinity < 0 when arithmetic
> primitives are configured to refuse to convert a SmallInteger asFloat...
>
> =============== Diff against Kernel-nice.1260 ===============
>
> Item was changed:
> ----- Method: Number>>adaptToFloat:andCompare: (in category
> 'converting') -----
> adaptToFloat: rcvr andCompare: selector
> "If I am involved in comparison with a Float, convert rcvr to a
> Fraction. This way, no bit is lost and comparison is exact."
>
> rcvr isFinite
> ifFalse: [
> selector == #= ifTrue: [^false].
> selector == #~= ifTrue: [^true].
> rcvr isNaN ifTrue: [^ false].
> (selector = #< or: [selector = #'<='])
> + ifTrue: [^ rcvr < 0.0].
> - ifTrue: [^ rcvr positive not].
> (selector = #> or: [selector = #'>='])
> + ifTrue: [^ rcvr > 0.0].
> - ifTrue: [^ rcvr >= 0.0].
> ^self error: 'unknow comparison selector'].
>
> "Try to avoid asTrueFraction because it can cost"
> self isAnExactFloat ifTrue: [^rcvr perform: selector with: self
> asExactFloat].
> selector == #= ifTrue: [^false].
> selector == #~= ifTrue: [^true].
> ^ rcvr asTrueFraction perform: selector with: self!
>
> Item was removed:
> - ----- Method: Object>>perform:with:with:with:with:with: (in category
> 'message handling') -----
> - perform: aSymbol with: firstObject with: secondObject with: thirdObject
> with: fourthObject with: fifthObject
> - "Send the selector, aSymbol, to the receiver with the given
> arguments.
> - Fail if the number of arguments expected by the selector is not
> four.
> - Primitive. Optional. See Object documentation whatIsAPrimitive."
> -
> - <primitive: 83>
> - ^ self perform: aSymbol withArguments: { firstObject.
> secondObject. thirdObject. fourthObject. fifthObject }!
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20190828/aea3870c/attachment.html>
More information about the Squeak-dev
mailing list
|