2
$\begingroup$

What is the name of the numeric data type where a float has its exponent bits replaced with another floating point value to use as the outer float's exponent?

This is a tip-of-the-tongue problem, as I recall having a casual conversation with a friend of mine on exotic data types.

A normal float may be constructed from 3 parts: sign bit, mantissa (fractional), and an exponent section.

With 64 bits of IEEE standard float, you have a range of 1024 binary magnitudes.

The number I'm trying to recall has its exponent section replaced with another float. Going back to the double, if we replace the biased exponent with a 1.4.6 float we would lose some more precision but represent much larger values--2^256 binary magnitudes.

Here is a graphical representation of a normal float and what I'm thinking of:

enter image description here

Any idea what I'm thinking of?

Edit: The answer is posits. I described it wrong, but @njuffa found the answer anyways. Instead of making the exponent into a float, a posit uses the following format:

Posit Bits Source: Training Deep Neural Networks Using Posit Number System (2019)

Where s is the sign bit, r are the regime bits, e are the exponents, es is the number of the exponent bits, and f are the fraction/mantissa bits. The es value is pre-defined just as a 32-bit integer has a predefined size n of 32 total bits. The mantissa size is variable within a single definition of a posit. The resulting number it represents is given by this formula:

posit to decimal

Formula Source

$\endgroup$
9
  • $\begingroup$ Is the intention to maintain the exponent as an integer (so effectively changing the number of bits allocated to the "exponent section, but otherwise maintaining the design of a floating point format)? $\endgroup$
    – hardmath
    May 28, 2023 at 2:07
  • 1
    $\begingroup$ This SO Question refers to "float-extended-exponent [versus] float in java" and links to some Oracle documentation that sounds like your concept is optionally supported (alongside the analogous double precision formats). $\endgroup$
    – hardmath
    May 28, 2023 at 3:27
  • $\begingroup$ Why would one want to do that? $\endgroup$ May 30, 2023 at 20:52
  • $\begingroup$ @hardmath No, 'float-extended-exponent' uses the same format as floats, but with a larger exponent by removing some of the mantissa. $\endgroup$
    – Jeff
    Jun 1, 2023 at 11:13
  • $\begingroup$ @WolfgangBangerth For when intermediate calculations require a larger range of magnitudes, but don't need as much precision at that point. $\endgroup$
    – Jeff
    Jun 1, 2023 at 11:14

1 Answer 1

4
$\begingroup$

The general name for such a format is tapered floating-point. The basic idea is that instead of choosing a fixed number of bits to assign to exponent and significand as in classical floating-point formats, letting the number of bits in each vary such that accuracy is enhanced near unity but reduced for numbers very large or very small in magnitude. In floating-point computations one often observes that many operands cluster fairly closely to unity, while operands with very large and very small exponents are rare, so such a scheme could enhance the overall accuracy of floating-point computations. Obviously, in a tapered floating-point format, one has to record in an additional parameter which split between exponent and significand bits is in effect.

The first appearance in the literature of a tapered floating-point format was in:

Robert Morris, "Tapered Floating Point: A New Floating-Point Representation", IEEE Transactions on Computers, Vol. C-20, No. 12, December 1971, pp. 1578-1579.

While tapered floating-point formats were very much a niche topic for decades, recent work by John Gustafson on this has created fairly wide-spread interest. This may also have been amplified somewhat by the search for the most advantageous number representations to use in AI / machine learning /deep learning applications, and the willingness of that community to embrace non-IEEE-754 floating-point formats.

John L. Gustafson, The end of error: Unum computing, CRC Press 2017.

This book was critized fairly sharply by William Kahan, the "father" of IEEE-754 floating point. Since unum presents significant challenges to hardware implementation, Gustafson in short order followed up with a more hardware-friendly scheme called posit:

J. L. Gustafson and I. T. Yonemoto, "Beating floating point at its own game: Posit arithmetic". Supercomputing frontiers and innovations, Vol 4., No. 2, 2017, pp. 71-86.

A useful independent comparison of posit arithmetic with traditional IEEE-754 floating-point arithmetic can be found in

F. De Dinechin, L. Forget, J. M. Muller, and Y. Uguen, "Posits: the good, the bad and the ugly." In: Proceedings of the Conference for Next Generation Arithmetic, March 2019, Article 6, pp. 1-10.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.