[bug] my first squeak bugfix - Interval>>includes: (plus [ENH]ScaledDecimal plug)

Mark A. Schwenk mas at wellthot.com
Fri Jul 30 13:35:29 UTC 1999


Bob Jarvis wrote:

> Floats suck.

ScaledDecimals rule!

Try my Squeak implementation of ScaledDecimal (intended to be ANSI compliant). The most recent changeset is available from ftp://ftp.wellthot.com/pub/squeak/goodies/ScaledDecimal/.

After filing in the ScaledDecimal support and Alan Lovejoy's Inteval>includes: fix, you can the evaluate the following expressions and Be Unsurprised(TM) with Squeak:

(((1.3s to: 2.2s by: 0.3s) collect: [:i | i]) at: 3) = 1.9s
	 true
(1.0s to: 5.0s by: 1.0s) includes: 1.4s
	 false
(1.3s to: 2.2s by: 0.3s) includes: 1.9s
	 true
(1.0s to: 5.0s by: 0.2s) includes: 1.2s
	 true
(1.0s to: 5.0s by: 0.3s) includes: 1.3s
	 true
((0.1s to: 1.0s by: 0.1s) asOrderedCollection at: 9) - 0.9s
	 0.0s

-Mark Schwenk
 WellThot Inc.





More information about the Squeak-dev mailing list