summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjofret2006-11-28 17:13:28 +0000
committerjofret2006-11-28 17:13:28 +0000
commitfa5fc0b98f339d915c40bbb91ae50b53184bb23b (patch)
tree66898e1686b26578c9ed190324aaa36820c59df7
parentc4f28b522214f08574fe8bc3094ba85d15a7e696 (diff)
downloadscilab2c-fa5fc0b98f339d915c40bbb91ae50b53184bb23b.tar.gz
scilab2c-fa5fc0b98f339d915c40bbb91ae50b53184bb23b.tar.bz2
scilab2c-fa5fc0b98f339d915c40bbb91ae50b53184bb23b.zip
More and more work...
log -- Correction sqrt-- End
-rw-r--r--ChangeLog7
-rw-r--r--Doc/Elementary Functions/TrigonometricsDependeces.dot49
-rw-r--r--TODO11
3 files changed, 54 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index f71158aa..c85b5dd5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-11-28 Bruno JOFRET <bruno.jofret@inria.fr>
+
+ * Logarithm [log]:
+ Correction : Log for a negative Real call Log as complex.
+ * Root [sqrt]:
+ Done for Real and Complex.
+
2006-11-27 Bruno JOFRET <bruno.jofret@inria.fr>
* Number Sign [sign]:
diff --git a/Doc/Elementary Functions/TrigonometricsDependeces.dot b/Doc/Elementary Functions/TrigonometricsDependeces.dot
index d3c0710d..d864ac70 100644
--- a/Doc/Elementary Functions/TrigonometricsDependeces.dot
+++ b/Doc/Elementary Functions/TrigonometricsDependeces.dot
@@ -7,15 +7,15 @@ digraph TrigonometricsFunctions {
//
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=yellow];
+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="??? - LAPACK", shape=doublecircle, color=red];
-Dlamch_O_Call [label="dlamch('O')", comment="??? - 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];
//
@@ -38,6 +38,7 @@ Sin_Hyperbolic_Complex [label="sh(C)"];
Tan_Real [label="tan(R)"];
Tan_Complex [label="tan(C)", comment="wtan"];
Tan_Hyperbolic_Real [label="tanh(R)"];
+Tan_Hyperbolic_Complex [label="tanh(C)"];
// Exponentielle
Exp_Real [label="exp(R)"];
@@ -45,6 +46,8 @@ Exp_Complex [label="exp(C)"];
// Log
Log_Real [label="log(R)"];
+Log_Positive_Real [label="log(R+)"];
+Log_Negative_Real [label="log(R-)"];
Log_Complex [label="log(C)"];
// Racine Carrée
@@ -64,14 +67,19 @@ Sign_Real [label="sign(R)"];
//
// -*- Functions call links -*-
//
-
-// -*- DLAMCH -*-
-Dlamch_E_Call -> LAPACK_Call;
-Dlamch_U_Call -> LAPACK_Call;
-Dlamch_O_Call -> LAPACK_Call;
+subgraph clusterLAPACK {
+ style=filled;
+ color=lightsteelblue1;
+ 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
@@ -83,6 +91,7 @@ Cos_Complex -> {
// Call a cosinus function in F77 math lib
Cos_Real -> F77_Call;
+
// -*- SIN -*-
//
// sin(a+ib) = sin(a).ch(b) + i.cos(a).sh(b)
@@ -153,8 +162,17 @@ Log_Complex -> {
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_Real -> F77_Call;
+Log_Positive_Real -> F77_Call;
@@ -162,6 +180,11 @@ Log_Real -> F77_Call;
//
// 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
@@ -201,6 +224,14 @@ Log_Real -> F77_Call;
// | 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 -> {
diff --git a/TODO b/TODO
index 2782c2ae..8fa20771 100644
--- a/TODO
+++ b/TODO
@@ -5,7 +5,7 @@
## Made by Bruno JOFRET <bruno.jofret@inria.fr>
##
## Started on Tue Nov 21 15:22:58 2006 jofret
-## Last update Mon Nov 27 12:19:53 2006 jofret
+## Last update Tue Nov 28 18:03:35 2006 jofret
##
## Copyright INRIA 2006
##
@@ -18,13 +18,16 @@ BJ - Evaluated and draw :
+ log : [done R & C]
+ sign : [done R]
+ abs : [done R]
+ + sqrt : [done R & C]
BJ - Evaluate and draw a graph of function dependences.
- + sqrt : Working...
- + ch : Fixme (R)
- + sh : Fixme (R)
+ + ch : Fixme (R & C)
+ + sh : Fixme (R & C)
+ + tanh : Fixme (R & C)
+ atan2 : Fixme (R)
+ exp : Fixme (R & C)
+ + pythag: Fixme (R)
+ + Logp1 : Fixme (R)
BJ - Find a way to code complex type taking care of double/float precision.