home *** CD-ROM | disk | FTP | other *** search
- #include <math.h>
- #include <stdio.h>
- #include <errno.h>
- double asinh(double farg)
- {
- return log( farg + sqrt(farg * farg + 1.0) );
- }
-
- #ifdef STANDALONE
- /*
- Correct output:
- [0.1] 0.099834078899208
- [0.2] 0.198690110349241
- [0.3] 0.295673047563423
- [0.4] 0.390035319770715
- [0.5] 0.481211825059603
- [0.6] 0.568824898732248
- [0.7] 0.652666566082356
- [0.8] 0.732668256045411
- [0.9] 0.808866935652783
- */
- int main()
- {
- int i=1;
- double r;
-
- while (i < 10) {
- r= asinh((double)i/10.0);
- printf("[%3.1f] %10.15f\n",(double)i/10.0,r);
- i++;
- }
- }
- #endif
-