Numeric Q: How to get DBL_MAX, etc. in Python?

Louis M. Pecora pecora at anvil.nrl.navy.mil
Wed Jul 24 17:28:27 EDT 2002


In C there are platform-specfic, floating-point constants as follows
defined in float.h,

/* The largest double precision # */
DBL_MAX                 (* (double *) __double_max)

/* The accuracy of double precision */
#define DBL_EPSILON     (* (double *) __double_epsilon)

/* The smallest double precision # */
#define DBL_MIN         (* (double *) __double_min)

Where do these reside in Python?  I have looked over my Python manuals
and done a Google search, but can't find any reference to them or
float/double limits outside of some threads online that are requesting
the same as me, but no answers.  Are there standard Python functions or
globals that return these values for the platform one is operating on? 
Any help appreciated. Thanks.


(I am posting this on the Python Mac Sig list and the Python NG, so
sorry if you are seeing it twice.)

-- 
Lou Pecora
  - My views are my own.



More information about the Python-list mailing list