]> www.ginac.de Git - ginac.git/blobdiff - ginac/inifcns_trans.cpp
[bugfix] Always #include <lst.h> before using lst. Fixes build error on MinGW.
[ginac.git] / ginac / inifcns_trans.cpp
index 3884d79c5275abda52f8917901769739c8ae9e64..10a36758f43001f6c02774531522c7fd2667c7c2 100644 (file)
@@ -4,7 +4,7 @@
  *  functions. */
 
 /*
- *  GiNaC Copyright (C) 1999-2010 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2011 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -1059,11 +1059,18 @@ static ex sinh_imag_part(const ex & x)
        return cosh(GiNaC::real_part(x))*sin(GiNaC::imag_part(x));
 }
 
+static ex sinh_conjugate(const ex & x)
+{
+       // conjugate(sinh(x))==sinh(conjugate(x))
+       return sinh(x.conjugate());
+}
+
 REGISTER_FUNCTION(sinh, eval_func(sinh_eval).
                         evalf_func(sinh_evalf).
                         derivative_func(sinh_deriv).
                         real_part_func(sinh_real_part).
                         imag_part_func(sinh_imag_part).
+                        conjugate_func(sinh_conjugate).
                         latex_name("\\sinh"));
 
 //////////
@@ -1136,11 +1143,18 @@ static ex cosh_imag_part(const ex & x)
        return sinh(GiNaC::real_part(x))*sin(GiNaC::imag_part(x));
 }
 
+static ex cosh_conjugate(const ex & x)
+{
+       // conjugate(cosh(x))==cosh(conjugate(x))
+       return cosh(x.conjugate());
+}
+
 REGISTER_FUNCTION(cosh, eval_func(cosh_eval).
                         evalf_func(cosh_evalf).
                         derivative_func(cosh_deriv).
                         real_part_func(cosh_real_part).
                         imag_part_func(cosh_imag_part).
+                        conjugate_func(cosh_conjugate).
                         latex_name("\\cosh"));
 
 //////////
@@ -1233,12 +1247,19 @@ static ex tanh_imag_part(const ex & x)
        return tan(b)/(1+power(tanh(a),2)*power(tan(b),2));
 }
 
+static ex tanh_conjugate(const ex & x)
+{
+       // conjugate(tanh(x))==tanh(conjugate(x))
+       return tanh(x.conjugate());
+}
+
 REGISTER_FUNCTION(tanh, eval_func(tanh_eval).
                         evalf_func(tanh_evalf).
                         derivative_func(tanh_deriv).
                         series_func(tanh_series).
                         real_part_func(tanh_real_part).
                         imag_part_func(tanh_imag_part).
+                        conjugate_func(tanh_conjugate).
                         latex_name("\\tanh"));
 
 //////////