Search notes:

SAS format: rb

rb creates a string out of a number (or vice versa?) that whose bytes in memory are the same as the number.
Thus, it is possible to create a hexadecimal representation of a stored double:
%macro doubleToHex(dbl);
   dbl = &dbl;
   rb  = put(dbl, rb8.  ); /* A double is 8 bytes */
   hex = put(rb  , hex16.); /* The hexadecimal representation is 16 bytes wide */
   put dbl " = " hex;
%mend  doubleToHex;

data _null_;
  %doubleToHex(0.0) /* 0  = 0000000000000000 */
  %doubleToHex(1.0) /* 1  = 000000000000F03F */
  %doubleToHex(2.0) /* 2  = 0000000000000040 */
  %doubleToHex(0.5) /* 0.5  = 000000000000E03F */
  %doubleToHex(1.5) /* 1.5  = 000000000000F83F */
run;
Github repository about-SAS, path: /programming/formats-informats/rb.sas

See also

informats and formats
IEEE-754 (Floating Point Arithmetic - float/double etc)

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/Companie...', 1759324664, '216.73.216.88', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Companies-Products/SAS/programming/formats-informats/rb(60): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78