[Python Learning Article] [Book Learning] [Python Standrad Library] Value of [built-in type]

Source: Internet
Author: User
Tags pow

numeric Type- int, float, long, complex

There are four different numeric types: ordinary integers, long integers, floating-point numbers, and complex numbers

A normal integer (or short integer) is implemented using a long in C with a precision of at least 32 bits (Sys.maxint is always set to the maximum normal integer value of the current platform, and the minimum value is -sys.maxint - 1). long integers have infinite precision. floating-point numbers are usually implemented with a double in C;information about the precision of floating-point numbers and their internal representations on the machine on which your program is running is available in sys.float_info . complex numbers have real and imaginary parts, each of which is a floating-point number. to extract these parts from complex Z, use z.real and z.imag. (The standard library includes additional numeric types,fractions supports rational numbers, anddecimal supports a floating-point number for user-defined precision.) )

Sys.maxint = POW (2, 32-1)

>>> Pow (2,4294967296L) >>> pow (2, )1024x768>>> pow (2,2147483648L) > >> sys.maxint2147483647

[Python Learning chapter] [book Learning][python Standrad library][built-in type] value

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.