Search notes:

SAS programming, function constant

%macro put_constant(name, desc);
  c = constant("&name");
  put     "&desc" 
      @40 "&name:" 
      c 51-71 .9;
%mend  put_constant;

data _null_;
  %put_constant(big         ,Largest double-precision number)
  %put_constant(e           ,Natural base                   )
  %put_constant(euler       ,Euler%str(%')s constant        )
  %put_constant(logbig      ,LOG of BIG                     )
  %put_constant(logmaceps   ,MACEPS                         )
  %put_constant(maceps      ,Machine precision              )
  %put_constant(pi          ,π                              )
  %put_constant(small       ,Smalles double-precision number)
  %put_constant(sqrtsmall   ,Square root of SMALL           )
  %put_constant(sqrtmaceps  ,Square root of MACEPS          )
run;
/*
Largest double-precision number        big:         1.7976931348623E308
Natural base                           e:                   2.718281828
Euler's constant                       euler:               0.577215665
LOG of BIG                             logbig:            709.782712893
MACEPS                                 logmaceps:         -36.043653389
Machine precision                      maceps:              0.000000000
π                                      pi:                  3.141592654
Smalles double-precision number        small:               0.000000000
Square root of SMALL                   sqrtsmall:           0.000000000
Square root of MACEPS                  sqrtmaceps:          0.000000015
*/
Github repository about-SAS, path: /programming/functions/constant.sas

See also

functions

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...', 1759408077, '216.73.216.42', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Companies-Products/SAS/programming/functions/constant(68): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78