# [plt-scheme] fractions and decimals

 From: Robert Bruce Findler (robby at cs.uchicago.edu) Date: Mon Jan 20 11:31:40 EST 2003 Previous message: [plt-scheme] fractions and decimals Next message: [plt-scheme] fractions and decimals Messages sorted by: [date] [thread] [subject] [author]

```Arbitrary distinctions in what all seem to be exact numbers can be
confusing for beginners. That's why (for those languages) we the only
literal syntax for inexact numbers is to prefix the number with #i, eg:

#i1.1231

For the other languages, we've just been keeping with the standard
Scheme notations in an attempt not to confuse people already familiar
with Scheme.

The only thing missing from our story is a decimal-based notation for
rationals that have repeating digits, I think.

Robby

At Mon, 20 Jan 2003 11:05:43 -0500, Paul Schlie wrote:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
> maybe better:
>
> A) zero(0) and repeat(_) terminated decimal fractions being exact,
> inexact otherwise:
>
> 1    == 1     ; exact
> 1.   == 1.    ; inexact
> 1.0  == 1     ; exact
> 1.1  == 1.1   ; inexact
> 1.10 == 11/10 ; exact
> 1.1_ == 10/9  ; exact
>
> vs.
>
> B) non-zero(1-9) and repeat(_) terminated decimal fractions being exact,
> inexact otherwise:
>
> 1    == 1     ; exact
> 1.   == 1.    ; inexact
> 1.0  == 1.0   ; inexact
> 1.1  == 11/10 ; exact
> 1.10 == 1.10  ; inexact
> 1.1_ == 10/9  ; exact
>
> Option A does seem arguably more reasonable,
>
> -paul-
>
> on 1/20/03 10:11 AM, Matthew Flatt wrote:
> >
> > At Sun, 19 Jan 2003 21:00:23 -0500, Paul Schlie wrote:
> >> Wonder if broadly adopting the convention that decimals terminated with a
> >> zero (0), would be interpreted as an inexact number, otherwise considered
> >> exact; would help unify the two worlds;
> >
> > I may be misunderstanding the proposal, but I don't think this would
> > solve the problem for the teaching levels. For example, when working
> > with American dollars, students expect "0.10" to mean exactly a dime.
> >
> > Matthew
> >

```

 Posted on the users mailing list. Previous message: [plt-scheme] fractions and decimals Next message: [plt-scheme] fractions and decimals Messages sorted by: [date] [thread] [subject] [author]