Differences between revisions 12 and 13
 ⇤ ← Revision 12 as of 2008-11-15 02:54:09 → Size: 2721 Editor: RogerHui Comment: 2^53 ← Revision 13 as of 2008-12-08 10:45:34 → ⇥ Size: 2726 Editor: anonymous Comment: converted to 1.6 markup Deletions are marked like this. Additions are marked like this. Line 5: Line 5: [http://wikipedia.org/wiki/IEEE_754#Double-precision_64_bit IEEE 754 standard] [[http://wikipedia.org/wiki/IEEE_754#Double-precision_64_bit|IEEE 754 standard]] Line 36: Line 36: || ` 3feffffffffffe00 ` ||` 0.99999999999994316 ` || the smallest number equal to 1 with a [:../Tolerant Comparison:tolerance] of` 2^_44 ` || || ` 3feffffffffffe00 ` ||` 0.99999999999994316 ` || the smallest number equal to 1 with a [[../Tolerant Comparison|tolerance]] of` 2^_44 ` || Line 43: Line 43: || ` deadbeefdeadbeef ` ||` _1.2785010645440762e148 ` || [http://wikipedia.org/wiki/Hexspeak hamburger] || || ` deadbeefdeadbeef ` ||` _1.2785010645440762e148 ` || [[http://wikipedia.org/wiki/Hexspeak|hamburger]] || Line 49: Line 49: [[BR]] <
>

64-bit floating-point numbers in the IEEE 754 standard have 1 bit for the sign, 11 bits for the exponent with a bias of 1023, and 52 bits for the mantissa. The hex representation and its inverse (3!:3 and 3!:2) facilitate explorations with these numbers.

```unhex=: 3!:2
hex  =: 2&(3!:3)
cons =: unhex @ ((}: hex 0.5)&,) " 1

hex 1.5
e200000000000000
0000000000000008
0000000000000001
0000000000000000
3ff8000000000000
unhex hex 1.5
1.5
cons '3ff8000011112222'
1.5
":!.18 cons '3ff8000011112222'
1.5000000635792579```
 x ":!.18 cons x Description 0000000000000001 4.9406564584124654e_324 the smallest positive number 8000000000000001 _4.9406564584124654e_324 the largest negative number 0000000000000000 0 0 3fefffffffffffff 0.99999999999999989 the largest number less than 1 3ff0000000000000 1 1 3ff0000000000001 1.0000000000000002 the smallest number greater than 1 3feffffffffffe00 0.99999999999994316 the smallest number equal to 1 with a tolerance of 2^_44 3ff0000000000100 1.0000000000000568 the largest number equal to 1 with a tolerance of 2^_44 4005bf0a8b145769 2.7182818284590451 Euler's number 400921fb54442d18 3.1415926535897931 pi 4024000000000000 10 10 4340000000000000 9007199254740992 the smallest positive x such that x and x+1 have the same representation (2^53) baabaabaabaabaaa _4.4698305231135437e_26 sheepish number deadbeefdeadbeef _1.2785010645440762e148 7fefffffffffffff 1.7976931348623157e308 the largest finite number ffefffffffffffff _1.7976931348623157e308 the smallest finite number 7ff0000000000000 _ positive infinity fff0000000000000 __ negative infinity

Contributed by RogerHui.

Essays/IEEE Floating-Point Numbers (last edited 2008-12-08 10:45:34 by anonymous)