home *** CD-ROM | disk | FTP | other *** search
/ Solo Programadores 22 / SOLO_22.iso / packages / win32ada / data.z / win32-math.ads < prev    next >
Encoding:
Text File  |  1996-03-15  |  8.9 KB  |  191 lines

  1. -- $Source: /home/harp/1/proto/monoBANK/winnt/win32-math.ads,v $ 
  2. -- $Revision: 1.9 $ $Date: 96/03/15 12:53:34 $ $Author: stm $ 
  3. -- See end of file for Copyright (c) information.
  4.  
  5. package Win32.Math is
  6.  
  7.     DOMAIN                 : constant := 1;                 -- math.h:88
  8.     SING                   : constant := 2;                 -- math.h:89
  9.     OVERFLOW               : constant := 3;                 -- math.h:90
  10.     UNDERFLOW              : constant := 4;                 -- math.h:91
  11.     TLOSS                  : constant := 5;                 -- math.h:92
  12.     PLOSS                  : constant := 6;                 -- math.h:93
  13.     EDOM                   : constant := 33;                -- math.h:95
  14.     ERANGE                 : constant := 34;                -- math.h:96
  15.  
  16.     type struct_exception is                                -- math.h:50
  17.         record
  18.             c_type: Win32.INT;                              -- math.h:51
  19.             name  : Win32.PSTR;                             -- math.h:52
  20.             arg1  : Win32.DOUBLE;                           -- math.h:53
  21.             arg2  : Win32.DOUBLE;                           -- math.h:54
  22.             retval: Win32.DOUBLE;                           -- math.h:55
  23.         end record;
  24.  
  25.     type complex is                                         -- math.h:72
  26.         record
  27.             x: Win32.DOUBLE;                                -- math.h:73
  28.             y: Win32.DOUBLE;                                -- math.h:73
  29.         end record;
  30.  
  31.     -- auxiliary declarations
  32.     type AD is access Win32.DOUBLE;
  33.     function huge_Addr return AD;
  34.     pragma Import(C, huge_Addr, "__huge_addr");
  35.     -- end of auxiliary declarations
  36.  
  37.     -- a value returned in case of error by a number of the
  38.     -- floating point math routines
  39.     HUGE: Win32.DOUBLE renames huge_Addr.all;               -- math.h:107
  40.  
  41.     HUGE_VAL: Win32.DOUBLE renames HUGE;                    -- math.h:110
  42.  
  43.     function c_abs(n: Win32.INT) return Win32.INT;          -- math.h:114
  44.  
  45.     function acos(x: Win32.DOUBLE) return Win32.DOUBLE;     -- math.h:115
  46.  
  47.     function asin(x: Win32.DOUBLE) return Win32.DOUBLE;     -- math.h:116
  48.  
  49.     function atan(x: Win32.DOUBLE) return Win32.DOUBLE;     -- math.h:117
  50.  
  51.     function atan2(y: Win32.DOUBLE;
  52.                    x: Win32.DOUBLE)
  53.                        return Win32.DOUBLE;                 -- math.h:118
  54.  
  55.     function atof(a_string: Win32.PCSTR) return Win32.DOUBLE;
  56.                                                             -- math.h:119
  57.  
  58.     function cabs(z: complex) return Win32.DOUBLE;          -- math.h:120
  59.  
  60.     function ceil(x: Win32.DOUBLE) return Win32.DOUBLE;     -- math.h:121
  61.  
  62.     function cos(x: Win32.DOUBLE) return Win32.DOUBLE;      -- math.h:122
  63.  
  64.     function cosh(x: Win32.DOUBLE) return Win32.DOUBLE;     -- math.h:123
  65.  
  66.     function exp(x: Win32.DOUBLE) return Win32.DOUBLE;      -- math.h:124
  67.  
  68.     function fabs(x: Win32.DOUBLE) return Win32.DOUBLE;     -- math.h:125
  69.  
  70.     function floor(x: Win32.DOUBLE) return Win32.DOUBLE;    -- math.h:126
  71.  
  72.     function fmod(x: Win32.DOUBLE;
  73.                   y: Win32.DOUBLE)
  74.                       return Win32.DOUBLE;                  -- math.h:127
  75.  
  76.     function frexp(x     : Win32.DOUBLE;
  77.                    expptr: Win32.PINT)
  78.                        return Win32.DOUBLE;                 -- math.h:128
  79.  
  80.     function hypot(x: Win32.DOUBLE;
  81.                    y: Win32.DOUBLE)
  82.                        return Win32.DOUBLE;                 -- math.h:129
  83.  
  84.     function j0(x: Win32.DOUBLE) return Win32.DOUBLE;       -- math.h:130
  85.  
  86.     function j1(x: Win32.DOUBLE) return Win32.DOUBLE;       -- math.h:131
  87.  
  88.     function jn(n: Win32.INT;
  89.                 x: Win32.DOUBLE)
  90.                     return Win32.DOUBLE;                    -- math.h:132
  91.  
  92.     function labs(n: Win32.INT) return Win32.INT;           -- math.h:133
  93.  
  94.     function ldexp(x: Win32.DOUBLE;
  95.                    exp: Win32.INT)
  96.                        return Win32.DOUBLE;                 -- math.h:134
  97.  
  98.     function log(x: Win32.DOUBLE) return Win32.DOUBLE;      -- math.h:135
  99.  
  100.     function log10(x: Win32.DOUBLE) return Win32.DOUBLE;    -- math.h:136
  101.  
  102.     function matherr(except: access struct_exception) 
  103.         return Win32.INT;                                   -- math.h:137
  104.  
  105.     function modf(x     : Win32.DOUBLE;
  106.                   intptr: access Win32.DOUBLE)
  107.                       return Win32.DOUBLE;                  -- math.h:138
  108.  
  109.     function pow(x: Win32.DOUBLE;
  110.                  y: Win32.DOUBLE)
  111.                      return Win32.DOUBLE;                   -- math.h:139
  112.  
  113.     function sin(x: Win32.DOUBLE) return Win32.DOUBLE;      -- math.h:140
  114.  
  115.     function sinh(x: Win32.DOUBLE) return Win32.DOUBLE;     -- math.h:141
  116.  
  117.     function sqrt(x: Win32.DOUBLE) return Win32.DOUBLE;     -- math.h:142
  118.  
  119.     function tan(x: Win32.DOUBLE) return Win32.DOUBLE;      -- math.h:143
  120.  
  121.     function tanh(x: Win32.DOUBLE) return Win32.DOUBLE;     -- math.h:144
  122.  
  123.     function y0(x: Win32.DOUBLE) return Win32.DOUBLE;       -- math.h:145
  124.  
  125.     function y1(x: Win32.DOUBLE) return Win32.DOUBLE;       -- math.h:146
  126.  
  127.     function yn(n: Win32.INT;
  128.                 x: Win32.DOUBLE)
  129.                     return Win32.DOUBLE;                    -- math.h:147
  130.  
  131. private
  132.  
  133.     pragma Convention(C, struct_exception);                 -- math.h:50
  134.     pragma Convention(C, complex);                          -- math.h:72
  135.  
  136.     pragma Import(C, c_abs, "abs");                         -- math.h:114
  137.     pragma Import(C, acos, "acos");                         -- math.h:115
  138.     pragma Import(C, asin, "asin");                         -- math.h:116
  139.     pragma Import(C, atan, "atan");                         -- math.h:117
  140.     pragma Import(C, atan2, "atan2");                       -- math.h:118
  141.     pragma Import(C, atof, "atof");                         -- math.h:119
  142.     pragma Import(C, cabs, "_cabs");                        -- math.h:120
  143.     pragma Import(C, ceil, "ceil");                         -- math.h:121
  144.     pragma Import(C, cos, "cos");                           -- math.h:122
  145.     pragma Import(C, cosh, "cosh");                         -- math.h:123
  146.     pragma Import(C, exp, "exp");                           -- math.h:124
  147.     pragma Import(C, fabs, "fabs");                         -- math.h:125
  148.     pragma Import(C, floor, "floor");                       -- math.h:126
  149.     pragma Import(C, fmod, "fmod");                         -- math.h:127
  150.     pragma Import(C, frexp, "frexp");                       -- math.h:128
  151.     pragma Import(C, hypot, "_hypot");                      -- math.h:129
  152.     pragma Import(C, j0, "_j0");                            -- math.h:130
  153.     pragma Import(C, j1, "_j1");                            -- math.h:131
  154.     pragma Import(C, jn, "_jn");                            -- math.h:132
  155.     pragma Import(C, labs, "labs");                         -- math.h:133
  156.     pragma Import(C, ldexp, "ldexp");                       -- math.h:134
  157.     pragma Import(C, log, "log");                           -- math.h:135
  158.     pragma Import(C, log10, "log10");                       -- math.h:136
  159.     pragma Import(C, matherr, "_matherr");                  -- math.h:137
  160.     pragma Import(C, modf, "modf");                         -- math.h:138
  161.     pragma Import(C, pow, "pow");                           -- math.h:139
  162.     pragma Import(C, sin, "sin");                           -- math.h:140
  163.     pragma Import(C, sinh, "sinh");                         -- math.h:141
  164.     pragma Import(C, sqrt, "sqrt");                         -- math.h:142
  165.     pragma Import(C, tan, "tan");                           -- math.h:143
  166.     pragma Import(C, tanh, "tanh");                         -- math.h:144
  167.     pragma Import(C, y0, "_y0");                            -- math.h:145
  168.     pragma Import(C, y1, "_y1");                            -- math.h:146
  169.     pragma Import(C, yn, "_yn");                            -- math.h:147
  170.  
  171. -------------------------------------------------------------------------------
  172. --
  173. -- THIS FILE AND ANY ASSOCIATED DOCUMENTATION IS PROVIDED WITHOUT CHARGE
  174. -- "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
  175. -- BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR
  176. -- FITNESS FOR A PARTICULAR PURPOSE.  The user assumes the entire risk as to
  177. -- the accuracy and the use of this file.  This file may be used, copied,
  178. -- modified and distributed only by licensees of Microsoft Corporation's
  179. -- WIN32 Software Development Kit in accordance with the terms of the 
  180. -- licensee's End-User License Agreement for Microsoft Software for the
  181. -- WIN32 Development Kit.
  182. --
  183. -- Copyright (c) Intermetrics, Inc. 1995
  184. -- Portions (c) 1985-1994 Microsoft Corporation with permission.
  185. -- Microsoft is a registered trademark and Windows and Windows NT are
  186. -- trademarks of Microsoft Corporation.
  187. --
  188. -------------------------------------------------------------------------------
  189.  
  190. end Win32.Math;
  191.