File tree Expand file tree Collapse file tree 3 files changed +24
-2
lines changed
Expand file tree Collapse file tree 3 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,13 @@ long double _Complex clog1pl(long double _Complex z)
4040}
4141
4242
43+ /**
44+ * returns log(z) for complex z
45+ * @param z complex argument
46+ * @note Points on the branch cut are treated differently from std::log(z):
47+ * Points with Re(z) < 0 and Im(z) == -0.0 are mapped to Im(z) == 0.0
48+ * @return log(z)
49+ */
4350double _Complex pos_clog (double _Complex z )
4451{
4552 const double rz = creal (z );
@@ -55,6 +62,13 @@ double _Complex pos_clog(double _Complex z)
5562}
5663
5764
65+ /**
66+ * returns log(z) for complex z
67+ * @param z complex argument
68+ * @note Points on the branch cut are treated differently from std::log(z):
69+ * Points with Re(z) < 0 and Im(z) == -0.0 are mapped to Im(z) == 0.0
70+ * @return log(z)
71+ */
5872long double _Complex pos_clogl (long double _Complex z )
5973{
6074 const long double rz = creall (z );
Original file line number Diff line number Diff line change @@ -12,8 +12,8 @@ double _Complex clog1p(double _Complex z);
1212/** returns clog(1 + z) with long double precision */
1313long double _Complex clog1pl (long double _Complex z );
1414
15- /** returns clog(z) with double precision, treating -0.0 correctly */
15+ /** returns clog(z) with double precision */
1616double _Complex pos_clog (double _Complex z );
1717
18- /** returns clog(z) with long double precision, treating -0.0L correctly */
18+ /** returns clog(z) with long double precision */
1919long double _Complex pos_clogl (long double _Complex z );
Original file line number Diff line number Diff line change 1212namespace polylogarithm {
1313
1414
15+ // / returns log(1 + z) for complex z
1516template <typename T>
1617std::complex <T> log1p (const std::complex <T>& z) noexcept
1718{
@@ -27,6 +28,13 @@ std::complex<T> log1p(const std::complex<T>& z) noexcept
2728}
2829
2930
31+ /* *
32+ * returns log(z) for complex z
33+ * @param z complex argument
34+ * @note Points on the branch cut are treated differently from std::log(z):
35+ * Points with Re(z) < 0 and Im(z) == -0.0 are mapped to Im(z) == 0.0
36+ * @return log(z)
37+ */
3038template <typename T>
3139std::complex <T> pos_log (const std::complex <T>& z) noexcept
3240{
You can’t perform that action at this time.
0 commit comments