home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Misc / TRSICAT.LZX / CATS_CD2_TRSI / Reference_Library / lib_examples / mathieeedoubbas.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-08-21  |  1.1 KB  |  33 lines

  1. #include <exec/types.h>
  2. #include <libraries/mathieeedp.h>
  3.  
  4. #include <clib/mathieeedoubbas_protos.h>
  5.  
  6. struct Library *MathIeeeDoubBasBase;
  7.  
  8. VOID main()
  9. {
  10. DOUBLE d1, d2, d3;
  11. LONG   i1;
  12.  
  13. if (MathIeeeDoubBasBase = OpenLibrary("mathieeedoubbas.library",34))
  14.     {
  15.  
  16.     i1 = IEEEDPFix(d1);                /* Call IEEEDPFix entry */
  17.     fi = IEEEDPFlt(i1);                /* Call IEEEDPFlt entry */
  18.     switch (IEEEDPCmp(d1, d2)) {};     /* Call IEEEDPCmp entry */
  19.     switch (IEEEDPTst(d1)) {};         /* Call IEEEDPTst entry */
  20.     d1 = IEEEDPAbs(d2);                /* Call IEEEDPAbs entry */
  21.     d1 = IEEEDPNeg(d2);                /* Call IEEEDPNeg entry */
  22.     d1 = IEEEDPAdd(d2, d3);            /* Call IEEEDPAdd entry */
  23.     d1 = IEEEDPSub(d2, d3);            /* Call IEEEDPSub entry */
  24.     d1 = IEEEDPMul(d2, d3);            /* Call IEEEDPMul entry */
  25.     d1 = IEEEDPDiv(d2, d3);            /* Call IEEEDPDiv entry */
  26.     d1 = IEEEDPCeil(d2);               /* Call IEEEDPCeil entry */
  27.     d1 = IEEEDPFloor(d2);              /* Call IEEEDPFloor entry */
  28.  
  29.     CloseLibrary(MathIeeeDoubBasBase);
  30.     }
  31. else printf("Can't open mathieeedoubbas.library\n");
  32. }
  33.