April 29, 2024, 06:16:51 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Static Libraries for Inverse Hyperbolic Functions and Functions for pi() & e()

Started by John S, February 18, 2006, 05:27:43 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

John S

I am uploading the compiled and sources for two static libraries.  These are very simple functions - nothing too complicated.
I'm fairly new at using Aurora so don't ask me any Guru-type questions.
(Some of you will recognize this post as it was originally posted in a private area.)

This is meant to be useful to those with mathematics, science and engineering tendancies and those wanting to create static libraries will find the examples useful.

pie provides functions which return values of pi ( =3.14159...) and e (= 2.71828...)

usage:
  PI = pi();
  E = e();

aHyp provides Inverse Hyperbolic functions for ArcSineH, ArcCosH and ArcTanH
    Note:    for acosh(x):  x must be greater than or equal to 1.0 ( x >= 1 )
                and for atanh(x):  x^2 must be less than or equal to 1.0 ( x^2 < 1 or -1 < x < 1 )
                for these functions, x values outside of these ranges will result in errors
                ( I programmed in sqrt(-1.0) to produce the error since returning 0 or -1
                 might be construed as an answer )  I also included a small testAHyp program in there.
usage:

  y = asinh(x);
  y = acosh(x);
  y = atanh(x);


To create a static library:
1. created a project (named pie or aHyp), selected Static Library as the Project Type and gave the Output File a name ending in ".lib"

2. write functions (pie.src or aHyp.src)

3. add the function .src file to my project

4. compile project.

5. move compile .lib file to the Aurora\libs directory

6. write and save the include file (pie.inc or aHyp.inc) in the Aurora\bin directory

7. use new static library - your library filename will appear in the Aurora about dialog.

Use these examples as templates for your own static libs.
John Siino, Advanced Engineering Services and Software

Parker

However, it's a bad idea to stick your libraries includes in the bin directory. That's only for official libraries, otherwise we have what happened with paks in IBPro.

For example, the CCL requires that you #include "ccl.inc" before you can use any of the functions. Put the files in the "includes" (maybe called "inc") directory, and just use the #include command, that's better I think, because then it doesn't force a user to include it.

- I was the one arguing against having the GUI lib included by default a while back though.