# random number generator function

What is SAGE's equivalent of Mathematica's RandomReal[] function?

random number generator function

What is SAGE's equivalent of Mathematica's RandomReal[] function?

2

I don't know much about Mathematica but from looking at the description here I think you want random_element(). Typing

```
RR.random_element(-10,10)
```

will produce a random real between -10 and 10. Change the upper and lower limits as you need.

Asked: **
2013-12-04 15:28:11 -0600
**

Seen: **1,943 times**

Last updated: **Dec 06 '13**

How do I generate a random number according to the binomial distribution?

how to calculate in SAGE the cumulative distribution function of a "stable distribution"?

Mathematica-like transformations rules

Round trip through Mathematica's FullSimplify

Probability density function - multivariate random variable

'object is not callable' error in sagetex (that doesn't occur in a worksheet)

Does Sage have a plain math expression editor, without any calculation performed?

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.

See if the [random_element](http://www.sagemath.org/doc/reference/rings_numerical/sage/rings/real_mpfr.html) command is what you want. For example RR.random_element(-10,10)

Yes, thank you. That's what I was looking for.

@dazedANDconfused - please put this as an answer so that Tom can accept it :)