From 7ee53ed3bd2222305c93a4959f8c587c373ed97c Mon Sep 17 00:00:00 2001 From: Adrien Destugues - PulkoMandy Date: Sat, 27 Oct 2012 15:44:59 +0200 Subject: [PATCH] Add tan(), tanh(), log10() to std::complex Keep the haiku/ version of the headers in sync with buildtools (see btrev43041) I'm curious: why do we have a copy of these headers in haiku/ tree ? --- headers/cpp/std/complext.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/headers/cpp/std/complext.h b/headers/cpp/std/complext.h index d3eb98a2f9..0e70194780 100644 --- a/headers/cpp/std/complext.h +++ b/headers/cpp/std/complext.h @@ -387,6 +387,22 @@ template complex<_FLT> template complex<_FLT> sqrt (const complex<_FLT>&) __attribute__ ((const)); +template inline complex<_FLT> +tan (const complex<_FLT>& x) +{ + return sin (x) / cos (x); +} +template inline complex<_FLT> +tanh (const complex<_FLT>& x) +{ + return sinh (x) / cosh (x); +} +template inline complex<_FLT> +log10 (const complex<_FLT>& x) +{ + return log (x) / log (10.0); +} + template istream& operator >> (istream&, complex<_FLT>&); template ostream& operator << (ostream&, const complex<_FLT>&); } // extern "C++"