[racket] weirdness with complex numbers

From: Ray Racine (ray.racine at gmail.com)
Date: Tue Aug 7 18:50:15 EDT 2012

More apropos

http://www.wolframalpha.com/input/?i=+1%2F2+%2B+i2%2F3+*+1%2F2%2B2i%2F3

On Tue, Aug 7, 2012 at 6:45 PM, Ray Racine <ray.racine at gmail.com> wrote:

> Wolfram
>
> http://www.wolframalpha.com/input/?i=roots+x%5E2+%2B+2*x+%2B+10
>
>
> On Tue, Aug 7, 2012 at 6:28 PM, Matthias Felleisen <matthias at ccs.neu.edu>wrote:
>
>>
>> If it weren't against math conventions, I wouldn't mind seeing 1-i1 or
>> 1/2+i2/3. But I am sure the people who produce Racket or Scheme or Lisp
>> readers would hate me for that one, too. I think your students will need to
>> cope, like all people who study sophisticated concepts (such as complex).
>>
>> Anyone know how Mathematica copes?
>>
>>
>> On Aug 6, 2012, at 6:05 PM, Todd O'Bryan wrote:
>>
>> > I just discovered that the way you enter (and display) a number like
>> >
>> > 1/2 + (2/3)i
>> >
>> > in Racket (and Scheme, presumably) is 1/2+2/3i.
>> >
>> > I understand why that is, and can't think of what else to do, but has
>> > anyone had students get confused because the form looks like the i is
>> > in the denominator of the imaginary part?
>> >
>> > What's more potentially confusing is that 1/2+2i/3 is a legal
>> > identifier in its own right.
>> >
>> > I'm working on a program that models basic algebra in the way that
>> > high school students are taught to do it, and one of my self-imposed
>> > rules has been that "math should look like math." In other words, I'm
>> > trying to minimize the conversion gymnastics that students have to put
>> > up with when they enter math in calculators or computer programs. In
>> > that spirit, I'm not sure if it would be better to allow the
>> > inconsistency with the way order of operations normally works or just
>> > have students enter 1/2+(2/3)i (or 1/2+2i/3, maybe) and do the
>> > conversion behind the scenes.
>> >
>> > Anyone have any thoughts or prejudices one way or the other?
>> >
>> > Todd
>> > ____________________
>> >  Racket Users list:
>> >  http://lists.racket-lang.org/users
>>
>>
>> ____________________
>>   Racket Users list:
>>   http://lists.racket-lang.org/users
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20120807/b067fd13/attachment.html>

Posted on the users mailing list.