[SciPy-user] random number

Steve Schmerler elcorto at gmx.net
Tue Jun 29 04:50:24 CDT 2004


> Don't see the point !!
> Tried the code below, don't get errors !!
> 

Code below ?

What I ment:

    from scipy.stats.rand import *
    uniform(0,1e38)[0]

gives a float rn (e.g. 5.9437827355745297e+037) but

    uniform(0,1e38)[0]

gives
 
    1.#INF

(on win32, PythonWin, Python 2.3.4, scipy 0.3x). It seems that 'uniform'
can't handle maximum values beyond 1e38.

> 
>  
>  
> ______________________________________________________________
> AXA CESSIONS
>  
> Jean-Claude RAZAFINDRAKOTO
>  
> Re-ARMS
> Reinsurance - Actuarial and Risk Management Services
>  
> 109 rue La Boétie
> 75008 Paris
>  
> Tel. : +33 1 56 43 78 54
> Fax. : +33 1 56 43 78 70
> E-mail : jeanclaude.razafindrakoto at axa-cessions.com
> _______________________________________________________________ 
> 
> |-----Message d'origine-----
> |De : Steve Schmerler [mailto:elcorto at gmx.net]
> |Envoyé : mardi 29 juin 2004 00:47
> |À : SciPy Users List
> |Objet : [SciPy-user] random number
> |
> |Hi
> |
> |I'm looking for a random number generator wich generates (uniformly
> |distributed) rn's from 0 to 1e200.
> |
> |    scipy.stats.rand.uniform(0,1e38)[0]
> |
> |gives a rn, but
> |
> |    scipy.stats.rand.uniform(0,1e38)[0]
> |
> |gives
> |
> |    1.#INF
> |
> |!?
> |
> |Any hint is much appreciated. Thanx!
> |
> |bye
> |

-- 
"Documentation is like sex: when it's good,
it is very, very good; and when it's bad, it
is better than nothing." -- Dick Brandon
--

+++ Jetzt WLAN-Router für alle DSL-Einsteiger und Wechsler +++
GMX DSL-Powertarife zudem 3 Monate gratis* http://www.gmx.net/dsl



More information about the SciPy-user mailing list