Ticket #3653 (closed enhancement: fixed)

Opened 5 years ago

Last modified 5 years ago

[with patch, positive review] Better random complex numbers

Reported by: novoselt Owned by: cwitty
Priority: minor Milestone: sage-3.1.2
Component: basic arithmetic Keywords:
Cc: Work issues:
Report Upstream: Reviewers:
Authors: Merged in:
Dependencies: Stopgaps:

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 Download (1.6 KB) - added by cwitty 5 years ago.

Change History

comment:1 Changed 5 years ago by cwitty

  • Owner changed from somebody to cwitty
  • Status changed from new to assigned

Changed 5 years ago by cwitty

comment:2 Changed 5 years ago by cwitty

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

comment:3 Changed 5 years ago 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.

comment:4 Changed 5 years ago by mabshoff

  • Status changed from assigned to closed
  • Resolution set to fixed

Merged in Sage 3.1.2.alpha1

comment:5 Changed 5 years ago by mabshoff

  • Milestone changed from sage-wishlist to sage-3.1.2
Note: See TracTickets for help on using tickets.