× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi Bruce

> I am trying to convert the formula for taking two deg mm ss convert them to
> dec and calc the distance from the two points.   I am having some problems
> making this formula work I have posted the formula as an image below.  I am

Wow... a uuencoded picture.  I haven't seen somehting uuencoded in e-mail
in years ;)

Unfortunately, I haven't even looked at an equasion like that since
college, and I don't remember what it means ;)  But I can tell you that
you're calling the API incorrectly...

> trying to use the ceessacs but its returns a error every time. The sin and
> cos works fine.  I am converting all my dec. to float.  Has anyone ever
> translated this formula to free or fixed and made it work.
> dACS PR 8f Extproc('CEESSACS')
> din 8f value


There are two versions of the ILE CEESxACS API.  CEESSACS and CEESDACS.
The one letter difference describes the parameters that the API receives
-- in this case, "S" and "D".

Here's a quote from the manual for the CEE Math APIs:

CEESxnnn
  The name of the math bindable API being called. The character x
  identifies the type of parameters being passed to the API, and may be one
  of the following: I 32-bit binary integer. The data type is INT4.

   J 64-bit binary integer. The data type is INT8.
   S 32-bit single floating-point number. The data type is FLOAT4.
   D A 64-bit double floating-point number. The data type is FLOAT8.
   T A 32-bit single floating-complex number (both real and imaginary parts
        are 32 bits long). The data type is COMPLEX8.
   E A 64-bit double floating-complex number (both real and imaginary
        parts are 64 bits long). The data type is COMPLEX16.

  The character nnn identifies the API being called. contains information
  about each of the ILE math bindable APIs.

What that tells you is that if you want to call CEESSACS, the parameters
need to be 32-bit floating point -- i.e. "4F" in ILE RPG.  Personally, I'd
recommend using the 64-bit floating point version.  Single precision
floating point is waaaaay too limited for my taste.

In other words, if you really want to call CEESSACS, your prototype shoudl
be:

     D acos            PR                  Extproc('CEESSACS')
     D   in                           4F
     D   out                          4F
     D   feedback                    12A   options(*omit)

But, I recommend using CEESDACS instead:

     D acos            PR                  Extproc('CEESDACS')
     D   in                           8F
     D   out                          8F
     D   feedback                    12A   options(*omit)

Good luck


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.