Jump to content
Wikimedia Meta-Wiki

Template:Hex/doc

From Meta, a Wikimedia project coordination wiki
(Redirected from Template:Shn2/doc)
This is a documentation subpage for Template:Hex.
It contains usage information, categories, and other content that is not part of the original template page.

This template shows the exact value of a number of type float.

The significand is given in hexadecimal format, which, apart from the sign, consists of a fixed "1.", followed by 13 hexadecimal characters.

Denormal numbers are shown in normalized format, not in internal format, but without inherently zero digits.

No distinction is made between 0 and -0.

For numbers of type integer which are not exactly representable as float the integer is rounded to float. If an integer just below 2^n is rounded to 2^n the result is shown in the form 2*2^(n-1), thus giving the exponent the value it would have in an exact floating-point representation (which would require up to 10 bits more, hence up to three hexadecimal digits more).

See also Help:Calculation accuracy.

Examples

[edit ]

Numbers of type integer which are not exactly representable as float:


AltStyle によって変換されたページ (->オリジナル) /