summaryrefslogtreecommitdiff
path: root/Doc/Elementary Functions/TrigonometricsDependeces.dot
blob: 7acb16881e9af8795a0cf80ead996df1d9611546 (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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
digraph TrigonometricsFunctions {
	node [shape=circle];

//
// -*- Basic Call -*-
//
F77_Call [label="Fortan Call", shape=doublecircle, color=green];
C_Call [label="C Call", shape=doublecircle, color=blue];
LAPACK_Call [label="LAPACK Call", shape=doublecircle, color=red];

//
// -*- Specific LAPACK Call -*-
//
Dlamch_E_Call [label="dlamch('E')", comment="Précision Machine - LAPACK", shape=doublecircle, color=red];
Dlamch_U_Call [label="dlamch('U')", comment="Borne Inférieure - LAPACK", shape=doublecircle, color=red];
Dlamch_O_Call [label="dlamch('O')", comment="Borne Supérieure - LAPACK", shape=doublecircle, color=red];

//
// -*- Functions definition -*-
//

// Cosinus
subgraph clusterCosinus {
	label="Cosine";
	color=yellow;
	style=filled;
	Cos_Real [label="cos(R)"];
	Cos_Complex [label="cos(C)"];
}
subgraph clusterHyperbolicCosinus {
	label="Hyperbolic Cosine";
	color="wheat";
	style=filled;
	Cos_Hyperbolic_Real [label="ch(R)"];
	Cos_Hyperbolic_Complex [label="ch(C)"];
}

// ArcCosinus
subgraph clusterArcCosinus {
	label="Inverse Cosine";
	color=springgreen;
	style=filled;
	ACos_Real [label="acos(R)"];
	ACos_Complex [label="acos(C)"];
}
subgraph clusterArcHyperbolicCosinus {
	label="Inverse Hyperbolic Cosine";
	color=slategray;
	style=filled;
	ACos_Hyperbolic_Real [label="ach(R)"];
	ACos_Hyperbolic_Complex [label="ach(C)"];
}

// Sinus
subgraph clusterSinus {
	label="Sine";
	color="violetred";
	style=filled;
	Sin_Real [label="sin(R)"];
	Sin_Complex [label="sin(C)"];
}
subgraph clusterHyperbolicSinus {
	label="Hyperbolic Sine";
	color=skyblue;
	style=filled;
	Sin_Hyperbolic_Real [label="sh(R)"];
	Sin_Hyperbolic_Complex [label="sh(C)"];
}


// ArcSinus
subgraph clusterArcSinus {
	label="Inverse Sine";
	color=slateblue;
	style=filled;
	ASin_Real [label="asin(R)"];
	ASin_Complex [label="asin(C)"];
}
subgraph clusterArcHyperbolicSinus {
	label="Inverse Hyperbolic Sine";
	color=violet;
	style=filled;
	ASin_Hyperbolic_Real [label="ash(R)"];
	ASin_Hyperbolic_Complex [label="ash(C)"];
}


// Tangeante
subgraph clusterTan {
	label="Tan";
	color=turquoise;
	style=filled;
	Tan_Real [label="tan(R)"];
	Tan_Complex [label="tan(C)", comment="wtan"];
}
subgraph clusterHyperbolicTan {
	label="Hyperbolic Tan";
	color=tomato;
	style=filled;
	Tan_Hyperbolic_Real [label="tanh(R)"];
	Tan_Hyperbolic_Complex [label="tanh(C)"];
}


// ArcTangeante
subgraph clusterArcTan {
	label="Inverse Tan";
	color=limegreen;
	style=filled;
	ATan_Real [label="atan(R)"];
	ATan_Complex [label="atan(C)", comment="watan"];
}
subgraph clusterArcHyperbolicTan {
	label="Inverse Hyperbolic Tan";
	color=mediumorchid;
	style=filled;
	ATan_Hyperbolic_Real [label="atanh(R)"];
	ATan_Hyperbolic_Complex [label="atanh(C)"];
}


// ArcTaneante2
ATan2_Real [label="atan2(R)"];

// Exponentielle
subgraph clusterExponential {
	label="Exponential";
	color=thistle;
	style=filled;
	Exp_Real [label="exp(R)"];
	Exp_Complex [label="exp(C)"];
}

// Log
subgraph clusterLog {
	label="Log";
	color=tan;
	style=filled;
	Log_Real [label="log(R)"];
	Log_Positive_Real [label="log(R+)"];
	Log_Negative_Real [label="log(R-)"];
	Log_Complex [label="log(C)"];
}

// Log1p
Log1p_Real [label="log1p(R)"];

// Racine Carrée
subgraph clusterSquare {
	label="Square Root";
	color=steelblue;
	style=filled;
	Sqrt_Real [label="sqrt(R)"];
	Sqrt_Positive_Real [label="sqrt(R+)"];
	Sqrt_Negative_Real [label="sqrt(R-)"];
	Sqrt_Complex [label="sqrt(C)", comment="wsqrt"];
}

// Partie Imaginaire
Imag_Complex [label="imag(C)"];

// Valeur Absolue
Abs_Real [label="abs(R)", comment="|R|"];

// Signe
Sign_Real [label="sign(R)"];

// Pythagore
Pythag_Real [label="pythag(R)"];


//
// -*- Functions call links -*-
//
subgraph clusterLAPACK {
	style=filled;
	color=lightsteelblue;
	label="LAPACK";
	// -*- DLAMCH -*-
	Dlamch_E_Call -> LAPACK_Call;
	Dlamch_U_Call -> LAPACK_Call;
	Dlamch_O_Call -> LAPACK_Call;
}


// -*- COS -*-
//
// cos(a+ib) = cos(a).ch(b) - i.sin(a).sh(b)
Cos_Complex  -> {
	Cos_Real
	Sin_Real
	Cos_Hyperbolic_Real
	Sin_Hyperbolic_Real
	};

// Call a cosinus function in F77 math lib
Cos_Real -> F77_Call;


// -*- ACOS -*-
//
// acos(a+ib) = see $SCIHOME/modules/elementaries_functions/src/fortran/wacos.f
ACos_Complex -> {
	Dlamch_O_Call
	Dlamch_E_Call
	Dlamch_U_Call
	Sqrt_Real
	Abs_Real
	ACos_Real
	ATan_Real
	Log1p_Real
	Log_Real
	Sign_Real
	};

// Call an inverse cosine function in F77 math lib
ACos_Real -> F77_Call;


// -*- COSH -*-
//
// ch(z) = cos(i.z)
Cos_Hyperbolic_Complex -> {
	Cos_Complex
	};

// ch(x) = 1/2 . exp(|x|) + exp(-|x|)
Cos_Hyperbolic_Real -> {
	Exp_Real
	Abs_Real
	};


// -*- ACOSH -*-
//
// acosh(z) = sign(-imag(acos(z)) i acos(z)
ACos_Hyperbolic_Complex -> {
	Imag_Complex
	ACos_Complex
};
// acosh(z) = sign(-imag(acos(z)) i acos(
ACos_Hyperbolic_Real -> {
	Imag_Complex
	ACos_Complex
	Min_Real
};


// -*- SIN -*-
//
// sin(a+ib) = sin(a).ch(b) + i.cos(a).sh(b)
Sin_Complex -> {
	Cos_Real
	Sin_Real
	Cos_Hyperbolic_Real
	Sin_Hyperbolic_Real
	};

// Call a sinus function in F77 math lib
Sin_Real -> F77_Call;


// -*- ASIN -*-
//
// asin(a+ib) = see $SCIHOME/modules/elementaries_functions/src/fortran/wasin.f
ASin_Complex -> {
	Dlamch_O_Call
	Dlamch_U_Call
	Dlamch_E_Call
	Abs_Real
	Sqrt_Real
	ASin_Real
	ATan_Real
	Log1p_Real
	Log_Real
	Sign_Real
};

// Call an inverse sine function in F77 math lib
ASin_Real -> F77_Call;


// -*- SINH -*-
//
// sh(z) = -i.sin(i.z)
Sin_Hyperbolic_Complex -> {
	Sin_Complex
	};

// sh(x) = imag(sin(i.x))
Sin_Hyperbolic_Real -> {
	Sin_Complex
	Imag_Complex
	};


// -*- ASINH -*-
//
// asinh(z) = -i asin(i z)
ASin_Hyperbolic_Complex -> {
	ASin_Complex
};

// asinh(z) = -i asin(i z)
ASin_Hyperbolic_Real -> {
	ASin_Complex
	Imag_Complex
};


// -*- TAN -*-
//
// tan(a+ib) = x_r + i.x_i
//
// x_r= 1/2 sin(2.a) / d
//
// x_i = | sh(2.b) / 2.d	si |b| <= L
//	 | sign(a)
//
// d = cos(a)^2 + sh(b)^2
//
// L = 1 + log(2 / sqrt(dlamch('e')))
Tan_Complex -> {
	Cos_Real
	Sin_Hyperbolic_Real
	Log_Real
	Sqrt_Real
	Dlamch_E_Call
	Abs_Real
	Sign_Real
	};

// Call a tangeante function in F77 math lib
Tan_Real -> F77_Call;


//
// -*- ATAN -*-
//
ATan_Complex -> {
	Dlamch_O_Call
	ATan_Real
	Abs_Real
	Sign_Real
	Log_Real
	ATan2_Real
};

// Call an inverse tangeant function in F77 math lib
ATan_Real -> F77_Call;


// -*- TANH -*-
//
// tanh(z) = -i.tan(i.z)
Tan_Hyperbolic_Complex -> {
	Tan_Complex
	};

// tanh(x) = imag(tan(i.x))
Tan_Hyperbolic_Real -> {
	Tan_Complex
	Imag_Complex
	};

// -*- ATANH -*-
//
// atanh(z) = i atan(-i z)
ATan_Hyperbolic_Complex -> {
	ATan_Complex
	};

// atanh(x) = -imag(atan(i.x)) | i.atan(-i.x)
ATan_Hyperbolic_Real -> {
	ATan_Complex
	Imag_Complex
	};


// -*- LOG -*-
//
// log(a+ib) = x_r + i.x_i
//
// Constantes :
//		L_inf = sqrt(dlamch('U'))
//		L_sup = sqrt(R_max / 2)
//		R_max = dlamch('O')
//		t = pythag(|a|,|b|)
//		r = |b|/|a|
//
// x_i = atan2(b, a)
//
// x_r = | 1/2 logp1((|a|-1)(|a|+1) + |b|^2)		si 1/2 <= |a| <= sqrt(2)
//	 | 1/2 log(|a|^2 + |b|^2)			si L_inf < |b| && |a| < L_sup
//	 | |a|						si |a| > R_max
//	 | log(t)					si t <= R_max
//	 | log(|a|) + 1/2 logp1(r^2)			sinon
Log_Complex -> {
	Sqrt_Real
	Dlamch_U_Call
	Dlamch_O_Call
	Pythag_Real
	Log1p_Real
	Log_Real
	Abs_Real
	Pythag_Real
	ATan2_Real
	};

// Separate positive and negative case
Log_Real -> {
	Log_Positive_Real
	Log_Negative_Real
	};

// Call another log function, treat it as complex
Log_Negative_Real -> Log_Complex;

// Call a log function in F77 math lib
Log_Positive_Real -> F77_Call;

// Call a log1p function in F77 math lib
Log1p_Real -> F77_Call;


// -*- SQRT -*-
//
// sqrt(a+ib) = x_r + i.x_i
//
// Constantes :
//		Rmax = dlamch('O')
//		BRmin = 2.dlamch('U')
//		t = sqrt(2.|a| + pythag(a,b))
//
// (1) a = 0
//~~~~~~~~~~~~
// x_r = | sqrt(|b| / 2)		si |b| <= BRmin
//	 | sqrt(|b|).sqrt(1/2)
//
// x_i = sign(b).x_r
//
// (2) |a| >= BRmax && |b| >= BRmax
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//  - Si t > Rmax
//	a = a / 16
//      b = b / 16
//      t = sqrt(2.|a| + pythag(a,b))
//	x_r = | 2.t		si a >= 0
//	      | 4.|b| / t
//	x_i = | 4.b / t		si a >= 0
//	      | 2.sign(b).t
//
//  - Sinon
//
//	x_r = | t / 2		si a >= 0
//	      | |b| / t
//
//	x_i = | b / t		si a >= 0
//	      | sign(b) / 2.t
//
// (3) Tous les cas pourris
//~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// x_r = | a + b		si a is NaN && b is NaN
//	 | |b|			si |b| > Rmax
//	 | 0			si a < -Rmax
//	 | a
//
// x_i = | a + b		si a is NaN && b is NaN
//	 | b			si |b| > Rmax
//	 | sign(b).|a|		si a < -Rmax
//	 | 0
//
Sqrt_Complex -> {
	Abs_Real
	Sqrt_Real
	Sign_Real
	Pythag_Real
	Dlamch_U_Call
	Dlamch_O_Call
	};

// Separate positive and negative case
Sqrt_Real -> {
	Sqrt_Positive_Real
	Sqrt_Negative_Real
	};

// Call another sqrt function, treat it as complex
Sqrt_Negative_Real -> Sqrt_Complex;

// Call a sqrt function in F77 math lib
Sqrt_Positive_Real -> F77_Call;

// -*- PYTHAG -*-
//
// pythag(a,b) = sqrt(a^2 + b^2)
//
//
Pythag_Real -> {
	Sqrt_Real
	Dlamch_O_Call
	};



// -*- SIGN -*-
//
// Call a sign function in F77 math lib
Sign_Real -> F77_Call;


// -*- ABS -*-
//
// Call a abs function in F77 math lib
Abs_Real -> F77_Call;


// -*- EXP -*-
//
// exp(a+i.b) = exp(a).cos(b) + i.exp(a)sin(b)
Exp_Complex -> {
	Exp_Real
	Cos_Real
	Sin_Real
	};

// Call a exp function in F77 math lib
Exp_Real -> F77_Call;


// -*- ATAN2 -*-
//
// Call atan2 function in C math lib
ATan2_Real -> C_Call;


// -*- IMAG -*-
//
// Call a imag function in F77 math lib
Imag_Complex -> F77_Call;

}