[Curious] Integer division => fraction

John M McIntosh johnmci at smalltalkconsulting.com
Thu Jun 12 18:01:34 UTC 2003


Actually have the preference print the fraction as both representations.
"(1/3) or about 0.333333333"

mmm one could have a project just to alter printStrings to make the  
results more meaningful, and expand on ones (lots I bet) that just  
print the class name.

On Thursday, June 12, 2003, at 07:11  AM, Stephen Pair wrote:

> One thing that might alleviate some of this confusion is to have a  
> preference that would cause fractions to be displayed as floats (in  
> the inspectors for example)...I actually find myself sending #asFloat  
> to fractions from time to time just to see a fraction in a floating  
> point representation...its hard to digest big fractions like: "(  
> 34123412341234124 / 14312431343 )"...it's much easier to think about  
> this fraction as: 2384179.98476013.  This is especially true when  
> you're looking at multiple fractions and trying to guage their  
> relative magnitudes when their reductions have different denominators.
>
> Unfortunately, there might be some unsuspecting and casual users of  
> #printString that might get bitten if the preference were enabled.   
> But, it couldn't hurt to try it...it would be interesting to see if  
> the confusion is alleviated by simply changing the presentation of the  
> fraction in some key places.
>
> - Stephen
>
>
>
>
>
>
--
======================================================================== 
===
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
======================================================================== 
===



More information about the Squeak-dev mailing list