Ticket #3653 (closed enhancement: fixed)

Opened 2 months ago

Last modified 3 days ago

[with patch, positive review] Better random complex numbers

Reported by: novoselt Assigned to: cwitty
Priority: minor Milestone: sage-wishlist
Component: basic arithmetic Keywords:
Cc:

Description

I have tried to generate some random complex numbers today and discovered that random_element behaves somewhat unexpected - without arguments it returns integer values between -2 and 2, with an optional argument n - integers between -n and n. That is exactly what is described in the documentation, but I would expect it to be a random complex number from the square [-1,1]x[-1,1] or unit disk and with an argument - a random value from the square or the disk of given size.

Attachments

trac3653-complex-random_element.patch (1.6 kB) - added by cwitty on 08/23/2008 10:29:52 AM.

Change History

08/02/2008 06:43:30 AM changed by cwitty

  • owner changed from somebody to cwitty.
  • status changed from new to assigned.

08/23/2008 10:29:52 AM changed by cwitty

  • attachment trac3653-complex-random_element.patch added.

08/23/2008 10:30:14 AM changed by cwitty

  • summary changed from Better random complex numbers to [with patch, needs review] Better random complex numbers.

08/26/2008 03:07:36 PM changed by mhansen

  • summary changed from [with patch, needs review] Better random complex numbers to [with patch, positive review] Better random complex numbers.

Looks good to me.

08/26/2008 03:54:27 PM changed by mabshoff

  • status changed from assigned to closed.
  • resolution set to fixed.

Merged in Sage 3.1.2.alpha1