[racket] weirdness with complex numbers

From: Todd O'Bryan (toddobryan at gmail.com)
Date: Wed Aug 8 17:05:47 EDT 2012

Wolfram Alpha parses 1/2+2/3i as 1/2 + 2/(3i) and 1/2+(2/3)i as the
complex number with real part 1/2 and imaginary part 2/3.

On Wed, Aug 8, 2012 at 3:47 AM, Jens Axel Søgaard <jensaxel at soegaard.net> wrote:
> 2012/8/8 Matthias Felleisen <matthias at ccs.neu.edu>:
>>
>> 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?
>
> I believe it parses 1+2i as (+ 1 (* 2 i)).
>
> The section on number syntax:
>
> http://reference.wolfram.com/mathematica/tutorial/InputSyntax.html
>
> /Jens Axel


Posted on the users mailing list.