Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Hexadecimal
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Hexadecimal exponential notation=== Just as decimal numbers can be represented in [[exponential notation]], so too can hexadecimal numbers. [[P notation]] uses the letter ''P'' (or ''p'', for "power"), whereas ''E'' (or ''e'') serves a similar purpose in decimal [[E notation]]. The number after the ''P'' is ''decimal'' and represents the ''binary'' exponent. Increasing the exponent by 1 multiplies by 2, not 16: {{mono|1=20p0 = 10p1 = 8p2 = 4p3 = 2p4 = 1p5}}. Usually, the number is normalized so that the hexadecimal digits start with {{mono|1.}} (zero is usually {{mono|0}} with no ''P''). Example: {{mono|1.3DEp42}} represents {{math|1.3DE<sub>16</sub>βΓβ2<sup>42<sub>10</sub></sup>}}. P notation is required by the [[IEEE 754-2008]] binary floating-point standard and can be used for floating-point literals in the [[C99]] edition of the [[C (programming language)|C programming language]].<ref>{{cite web |url=http://www.iso.org/iso/iso_catalogue/catalogue_ics/catalogue_detail_ics.htm?csnumber=29237 |title=ISO/IEC 9899:1999 β Programming languages β C |publisher=Iso.org |website=ISO |date=2011-12-08 |access-date=2014-04-08 |archive-date=2016-10-10 |archive-url=https://web.archive.org/web/20161010112929/http://www.iso.org/iso/iso_catalogue/catalogue_ics/catalogue_detail_ics.htm?csnumber=29237 |url-status=live }}</ref> Using the ''%a'' or ''%A'' conversion specifiers, this notation can be produced by implementations of the ''[[printf]]'' family of functions following the C99 specification<ref name="Rationale_2003_C">{{cite web |title=Rationale for International Standard β Programming Languages β C |version=5.10 |date=April 2003 |pages=52, 153β154, 159 |url=http://www.open-std.org/jtc1/sc22/wg14/www/C99RationaleV5.10.pdf |website=Open Standards |access-date=2010-10-17 |url-status=live |archive-url=https://web.archive.org/web/20160606072228/http://www.open-std.org/jtc1/sc22/wg14/www/C99RationaleV5.10.pdf |archive-date=2016-06-06}}</ref> and [[Single UNIX Specification|Single Unix Specification]] (IEEE Std 1003.1) [[POSIX]] standard.<ref name="printf_2013">{{cite web |title=dprintf, fprintf, printf, snprintf, sprintf β print formatted output |work=The Open Group Base Specifications |edition=Issue 7, IEEE Std 1003.1, 2013 |date=2013 |orig-year=2001 |author=The IEEE and The Open Group |url=http://pubs.opengroup.org/onlinepubs/9699919799/functions/printf.html |access-date=2016-06-21 |url-status=live |archive-url=https://web.archive.org/web/20160621211105/http://pubs.opengroup.org/onlinepubs/9699919799/functions/printf.html |archive-date=2016-06-21}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)