Python Forum

Full Version: float constants
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
i don't see any of these kinds of float constants defined in the obvious modules.

1. the highest possible float value.
2. the lowest possible float value.
3. the highest float value that when 1.0 is subtracted, the result can be represented exactly.
4. the lowest float value that when 1.0 is added, the result can be represented exactly.

these values could vary by platform. if constants are not defined for these, then i will write some functions to calculate these values without using C.

i might need to think about platforms which have floats that are not based of powers of two.
i assume these are for i386 or x86_64.

i only see one of the constants i listed in there, so i will go ahead and create these functions.