summaryrefslogtreecommitdiff
path: root/src/elementaryFunctions/atanh/testAtanh.c
blob: 9765172923fffd4be8176f98b3d7aad518bc5624 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*
**  -*- C -*-
**
** testAtanh.c
** Made by  Bruno JOFRET <bruno.jofret@inria.fr>
**
** Started on  Fri Dec  8 15:05:44 2006 jofret
** Last update Thu Sep  6 15:09:45 2007 bruno
**
** Copyright INRIA 2006
*/

#include "testAtanh.h"

void satanhsTest() {
  printf(">> Float scalar\n");
  printf("satanhs(0) = %f\n", satanhs((float) 0));
  printf("satanhs(PI) = %f\n", satanhs(PI));
  printf("satanhs(PI/2) = %f\n", satanhs(PI/2));
  printf("satanhs(PI/3) = %f\n", satanhs(PI/3));
  printf("satanhs(PI/4) = %f\n", satanhs(PI/4));
  printf("satanhs(PI/6) = %f\n", satanhs(PI/6));
  printf("satanhs(-PI) = %f\n", satanhs(-PI));
  printf("satanhs(-PI/2) = %f\n", satanhs(-PI/2));
  printf("satanhs(-PI/3) = %f\n", satanhs(-PI/3));
  printf("satanhs(-PI/4) = %f\n", satanhs(-PI/4));
  printf("satanhs(-PI/6) = %f\n", satanhs(-PI/6));
}

void datanhsTest() {
  printf(">> Double scalar\n");
  printf("datanhs(0) = %e\n", datanhs((double) 0));
  printf("datanhs(PI) = %e\n", datanhs(PI));
  printf("datanhs(PI/2) = %e\n", datanhs(PI/2));
  printf("datanhs(PI/3) = %e\n", datanhs(PI/3));
  printf("datanhs(PI/4) = %e\n", datanhs(PI/4));
  printf("datanhs(PI/6) = %e\n", datanhs(PI/6));
  printf("datanhs(-PI) = %e\n", datanhs(-PI));
  printf("datanhs(-PI/2) = %e\n", datanhs(-PI/2));
  printf("datanhs(-PI/3) = %e\n", datanhs(-PI/3));
  printf("datanhs(-PI/4) = %e\n", datanhs(-PI/4));
  printf("datanhs(-PI/6) = %e\n", datanhs(-PI/6));
}

int testAtanh() {
  printf("\n>>>> Atanhgeant Tests\n");
  satanhsTest();
  datanhsTest();
  /* FIXME : Implement some test here ... */
  /*
    catanhsTest();
    zatanhsTest();
    satanhaTest();
    datanhaTest();
    catanhaTest();
    zatanhaTest();
  */
  return 0;
}

int main() {
  assert(testAtanh() == 0);
  return 0;
}