From a1b13b4f91c2ae1dab8191f7c3197897533e3594 Mon Sep 17 00:00:00 2001 From: ckormanyos Date: Sun, 13 Jul 2025 13:43:10 +0200 Subject: [PATCH 1/3] More docs tuning --- doc/multiprecision.qbk | 2 +- doc/tutorial_float_eg.qbk | 6 +- example/cpp_complex_examples.cpp | 160 ++++++++++++++++++------------- 3 files changed, 96 insertions(+), 72 deletions(-) diff --git a/doc/multiprecision.qbk b/doc/multiprecision.qbk index cfe0344f..90a39dd2 100644 --- a/doc/multiprecision.qbk +++ b/doc/multiprecision.qbk @@ -132,7 +132,7 @@ [def __compiler_support [@https://en.cppreference.com/w/cpp/compiler_support compiler support]] [def __ULP [@http://en.wikipedia.org/wiki/Unit_in_the_last_place Unit in the last place (ULP)]] [def __Mathematica [@http://www.wolfram.com/products/mathematica/index.html Wolfram Mathematica]] -[def __WolframAlpha [@http://www.wolframalpha.com/ Wolfram Alpha]] +[def __WolframAlphaGLCoefs [@https://www.wolframalpha.com/input?i=Fit%5B%7B%7B21.0%2C+3.5%7D%2C+%7B51.0%2C+11.1%7D%2C+%7B101.0%2C+22.5%7D%2C+%7B201.0%2C+46.8%7D%7D%2C+%7B1%2C+d%2C+d%5E2%7D%2C+d%5D+FullSimplify%5B%25%5D Wolfram Alpha Gauss-Laguerre coefficients]] [def __Boost_Serialization [@https://www.boost.org/doc/libs/release/libs/serialization/doc/index.html Boost.Serialization]] [def __Boost_Math [@https://www.boost.org/doc/libs/release/libs/math/doc/index.html Boost.Math]] [def __Boost_Multiprecision [@https://www.boost.org/doc/libs/release/libs/multiprecision/doc/index.html Boost.Multiprecision]] diff --git a/doc/tutorial_float_eg.qbk b/doc/tutorial_float_eg.qbk index 5c4f4229..74c257e7 100644 --- a/doc/tutorial_float_eg.qbk +++ b/doc/tutorial_float_eg.qbk @@ -108,9 +108,9 @@ needed for convergence when using various counts of base-10 digits. Let's calibrate, for instance, the number of coefficients needed at the point `x = 1`. -Empirical data were used with __WolframAlpha : +Empirical data were used with __WolframAlphaGLCoefs : `` -Fit[{{21.0, 3.5}, {51.0, 11.1}, {101.0, 22.5}, {201.0, 46.8}}, {1, d, d^2}, d]FullSimplify[%] +Fit[{{21.0, 3.5}, {51.0, 11.1}, {101.0, 22.5}, {201.0, 46.8}}, {1, d, d^2}, d] FullSimplify[%] 0.0000178915 d^2 + 0.235487 d - 1.28301 or -1.28301 + (0.235487 + 0.0000178915 d) d @@ -127,7 +127,7 @@ followed by calculation of accurate abscissa and weights is: [gauss_laguerre_quadrature_output_1] Finally the result using Gauss-Laguerre quadrature is compared with a calculation using `cyl_bessel_k`, -and both are listed, finally confirming that none differ more than a small tolerance. +and both are listed, conclusively confirming that none differ by more than a small tolerance. [gauss_laguerre_quadrature_output_2] For more detail see comments in the source code for this example at [@../../example/gauss_laguerre_quadrature.cpp gauss_laguerre_quadrature.cpp]. diff --git a/example/cpp_complex_examples.cpp b/example/cpp_complex_examples.cpp index 0d807791..e6c8d4d1 100644 --- a/example/cpp_complex_examples.cpp +++ b/example/cpp_complex_examples.cpp @@ -6,66 +6,90 @@ // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt -/*`This example demonstrates the usage of the MPC backend for multiprecision complex numbers. -In the following, we will show how using MPC backend allows for the same operations as the C++ standard library complex numbers. +/*`This example demonstrates the usage of the complex_adaptor backend for multiprecision complex numbers. +In the following, we will show how using the complex_adaptor backend together with number allows for the same operations as the C++ standard library complex numbers. */ //[cpp_complex_eg #include +#include #include #include -template +template +void elementary_functions(const NumericType z1) +{ + std::cout << "\nElementary special functions:\n"; + std::cout << "Absolute value : " << abs(z1) << std::endl; + using std::arg; + std::cout << "Argument : " << arg(z1) << std::endl; + using std::norm; + std::cout << "Norm : " << norm(z1) << std::endl; + using std::conj; + std::cout << "Complex conjugate : " << conj(z1) << std::endl; + using std::proj; + std::cout << "Proj on Riemann sphere : " << proj(z1) << std::endl; + std::cout << "exp(z1) : " << exp(z1) << std::endl; + std::cout << "log(z1) : " << log(z1) << std::endl; + std::cout << "log10(z1) : " << log10(z1) << std::endl; + std::cout << "pow(z1, z1) : " << pow(z1, z1) << std::endl; + std::cout << "Take its square root : " << sqrt(z1) << std::endl; + std::cout << "sin(z1) : " << sin(z1) << std::endl; + std::cout << "cos(z1) : " << cos(z1) << std::endl; + std::cout << "tan(z1) : " << tan(z1) << std::endl; + std::cout << "asin(z1) : " << asin(z1) << std::endl; + std::cout << "acos(z1) : " << acos(z1) << std::endl; + std::cout << "atan(z1) : " << atan(z1) << std::endl; + std::cout << "sinh(z1) : " << sinh(z1) << std::endl; + std::cout << "cosh(z1) : " << cosh(z1) << std::endl; + std::cout << "tanh(z1) : " << tanh(z1) << std::endl; + std::cout << "asinh(z1) : " << asinh(z1) << std::endl; + std::cout << "acosh(z1) : " << acosh(z1) << std::endl; + std::cout << "atanh(z1) : " << atanh(z1) << std::endl; +} + +template void complex_number_examples() { - Complex z1{0, 1}; - std::cout << std::setprecision(std::numeric_limits::digits10); - std::cout << std::scientific << std::fixed; - std::cout << "Print a complex number: " << z1 << std::endl; - std::cout << "Square it : " << z1*z1 << std::endl; - std::cout << "Real part : " << z1.real() << " = " << real(z1) << std::endl; - std::cout << "Imaginary part : " << z1.imag() << " = " << imag(z1) << std::endl; - using std::abs; - std::cout << "Absolute value : " << abs(z1) << std::endl; - std::cout << "Argument : " << arg(z1) << std::endl; - std::cout << "Norm : " << norm(z1) << std::endl; - std::cout << "Complex conjugate : " << conj(z1) << std::endl; - std::cout << "Projection onto Riemann sphere: " << proj(z1) << std::endl; - typename Complex::value_type r = 1; - typename Complex::value_type theta = 0.8; - using std::polar; - std::cout << "Polar coordinates (phase = 0) : " << polar(r) << std::endl; - std::cout << "Polar coordinates (phase !=0) : " << polar(r, theta) << std::endl; + using complex_type = ComplexType; + using real_type = typename complex_type::value_type; - std::cout << "\nElementary special functions:\n"; - std::cout << "exp(z1) = " << exp(z1) << std::endl; - std::cout << "log(z1) = " << log(z1) << std::endl; - std::cout << "log10(z1) = " << log10(z1) << std::endl; - std::cout << "pow(z1, z1) = " << pow(z1, z1) << std::endl; - std::cout << "Take its square root : " << sqrt(z1) << std::endl; - std::cout << "sin(z1) = " << sin(z1) << std::endl; - std::cout << "cos(z1) = " << cos(z1) << std::endl; - std::cout << "tan(z1) = " << tan(z1) << std::endl; - std::cout << "asin(z1) = " << asin(z1) << std::endl; - std::cout << "acos(z1) = " << acos(z1) << std::endl; - std::cout << "atan(z1) = " << atan(z1) << std::endl; - std::cout << "sinh(z1) = " << sinh(z1) << std::endl; - std::cout << "cosh(z1) = " << cosh(z1) << std::endl; - std::cout << "tanh(z1) = " << tanh(z1) << std::endl; - std::cout << "asinh(z1) = " << asinh(z1) << std::endl; - std::cout << "acosh(z1) = " << acosh(z1) << std::endl; - std::cout << "atanh(z1) = " << atanh(z1) << std::endl; + complex_type z1 { real_type(0), real_type(1) }; + + std::cout << "Print a complex number : " << z1 << std::endl; + std::cout << "Square it : " << z1*z1 << std::endl; + std::cout << "Real part : " << z1.real() << " = " << real(z1) << std::endl; + std::cout << "Imaginary part : " << z1.imag() << " = " << imag(z1) << std::endl; + + real_type r { 1 }; + real_type theta { 0.75 }; + using std::polar; + std::cout << "Polar coord phase = 0 : " << polar(r) << std::endl; + std::cout << "Polar coord phase != 0 : " << polar(r, theta) << std::endl; + + elementary_functions(z1); } int main() { + const auto flags_orig = std::cout.flags(); + + std::cout << std::scientific << std::fixed; + std::cout << "First, some operations we usually perform with std::complex:\n"; + std::cout << std::setprecision(std::numeric_limits::value_type>::digits10); complex_number_examples>(); + std::cout << "\nNow the same operations performed using quad precision complex numbers:\n"; + std::cout << std::setprecision(std::numeric_limits::digits10); complex_number_examples(); - return 0; + std::cout << "\nNow the same elementary functions performed using built-in real-valued numbers:\n"; + std::cout << std::setprecision(std::numeric_limits::digits10); + elementary_functions(0.125F); + + std::cout.flags(flags_orig); } //] @@ -73,35 +97,35 @@ int main() //[cpp_complex_out -Print a complex number: (0.000000000000000000000000000000000,1.000000000000000000000000000000000) -Square it : -1.000000000000000000000000000000000 -Real part : 0.000000000000000000000000000000000 = 0.000000000000000000000000000000000 -Imaginary part : 1.000000000000000000000000000000000 = 1.000000000000000000000000000000000 -Absolute value : 1.000000000000000000000000000000000 -Argument : 1.570796326794896619231321691639751 -Norm : 1.000000000000000000000000000000000 -Complex conjugate : (0.000000000000000000000000000000000,-1.000000000000000000000000000000000) -Projection onto Riemann sphere: (0.000000000000000000000000000000000,1.000000000000000000000000000000000) -Polar coordinates (phase = 0) : 1.000000000000000000000000000000000 -Polar coordinates (phase !=0) : (0.696706709347165389063740022772448,0.717356090899522792567167815703377) +Print a complex number : (0.000000000000000000000000000000000,1.000000000000000000000000000000000) +Square it : -1.000000000000000000000000000000000 +Real part : 0.000000000000000000000000000000000 = 0.000000000000000000000000000000000 +Imaginary part : 1.000000000000000000000000000000000 = 1.000000000000000000000000000000000 +Polar coord phase = 0 : 1.000000000000000000000000000000000 +Polar coord phase != 0 : (0.731688868873820886311838753000085,0.681638760023334166733241952779894) Elementary special functions: -exp(z1) = (0.540302305868139717400936607442977,0.841470984807896506652502321630299) -log(z1) = (0.000000000000000000000000000000000,1.570796326794896619231321691639751) -log10(z1) = (0.000000000000000000000000000000000,0.682188176920920673742891812715678) -pow(z1, z1) = 0.207879576350761908546955619834979 -Take its square root : (0.707106781186547524400844362104849,0.707106781186547524400844362104849) -sin(z1) = (0.000000000000000000000000000000000,1.175201193643801456882381850595601) -cos(z1) = 1.543080634815243778477905620757062 -tan(z1) = (0.000000000000000000000000000000000,0.761594155955764888119458282604794) -asin(z1) = (0.000000000000000000000000000000000,0.881373587019543025232609324979793) -acos(z1) = (1.570796326794896619231321691639751,-0.881373587019543025232609324979793) -atan(z1) = (0.000000000000000000000000000000000,inf) -sinh(z1) = (0.000000000000000000000000000000000,0.841470984807896506652502321630299) -cosh(z1) = 0.540302305868139717400936607442977 -tanh(z1) = (0.000000000000000000000000000000000,1.557407724654902230506974807458360) -asinh(z1) = (0.000000000000000000000000000000000,1.570796326794896619231321691639751) -acosh(z1) = (0.881373587019543025232609324979792,1.570796326794896619231321691639751) -atanh(z1) = (0.000000000000000000000000000000000,0.785398163397448309615660845819876) +Absolute value : 1.000000000000000000000000000000000 +Argument : 1.570796326794896619231321691639751 +Norm : 1.000000000000000000000000000000000 +Complex conjugate : (0.000000000000000000000000000000000,-1.000000000000000000000000000000000) +Proj on Riemann sphere : (0.000000000000000000000000000000000,1.000000000000000000000000000000000) +exp(z1) : (0.540302305868139717400936607442977,0.841470984807896506652502321630299) +log(z1) : (0.000000000000000000000000000000000,1.570796326794896619231321691639751) +log10(z1) : (0.000000000000000000000000000000000,0.682188176920920673742891812715678) +pow(z1, z1) : 0.207879576350761908546955619834979 +Take its square root : (0.707106781186547524400844362104849,0.707106781186547524400844362104849) +sin(z1) : (0.000000000000000000000000000000000,1.175201193643801456882381850595601) +cos(z1) : 1.543080634815243778477905620757062 +tan(z1) : (0.000000000000000000000000000000000,0.761594155955764888119458282604794) +asin(z1) : (0.000000000000000000000000000000000,0.881373587019543025232609324979792) +acos(z1) : (1.570796326794896619231321691639751,-0.881373587019543025232609324979792) +atan(z1) : (0.000000000000000000000000000000000,inf) +sinh(z1) : (0.000000000000000000000000000000000,0.841470984807896506652502321630299) +cosh(z1) : 0.540302305868139717400936607442977 +tanh(z1) : (0.000000000000000000000000000000000,1.557407724654902230506974807458360) +asinh(z1) : (0.000000000000000000000000000000000,1.570796326794896619231321691639751) +acosh(z1) : (0.881373587019543025232609324979792,1.570796326794896619231321691639751) +atanh(z1) : (0.000000000000000000000000000000000,0.785398163397448309615660845819876) //] */ From 3305c6914eb8465c5fda64e4bba588ea55bf5a24 Mon Sep 17 00:00:00 2001 From: ckormanyos Date: Sun, 13 Jul 2025 15:36:05 +0200 Subject: [PATCH 2/3] Restore the proper using statements --- example/cpp_complex_examples.cpp | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/example/cpp_complex_examples.cpp b/example/cpp_complex_examples.cpp index e6c8d4d1..fef0dcb7 100644 --- a/example/cpp_complex_examples.cpp +++ b/example/cpp_complex_examples.cpp @@ -30,22 +30,39 @@ void elementary_functions(const NumericType z1) std::cout << "Complex conjugate : " << conj(z1) << std::endl; using std::proj; std::cout << "Proj on Riemann sphere : " << proj(z1) << std::endl; + using std::exp; std::cout << "exp(z1) : " << exp(z1) << std::endl; + using std::log; std::cout << "log(z1) : " << log(z1) << std::endl; + using std::log10; std::cout << "log10(z1) : " << log10(z1) << std::endl; + using std::pow; std::cout << "pow(z1, z1) : " << pow(z1, z1) << std::endl; + using std::sqrt; std::cout << "Take its square root : " << sqrt(z1) << std::endl; + using std::sin; std::cout << "sin(z1) : " << sin(z1) << std::endl; + using std::cos; std::cout << "cos(z1) : " << cos(z1) << std::endl; + using std::tan; std::cout << "tan(z1) : " << tan(z1) << std::endl; + using std::asin; std::cout << "asin(z1) : " << asin(z1) << std::endl; + using std::acos; std::cout << "acos(z1) : " << acos(z1) << std::endl; + using std::atan; std::cout << "atan(z1) : " << atan(z1) << std::endl; + using std::sinh; std::cout << "sinh(z1) : " << sinh(z1) << std::endl; + using std::cosh; std::cout << "cosh(z1) : " << cosh(z1) << std::endl; + using std::tanh; std::cout << "tanh(z1) : " << tanh(z1) << std::endl; + using std::asinh; std::cout << "asinh(z1) : " << asinh(z1) << std::endl; + using std::acosh; std::cout << "acosh(z1) : " << acosh(z1) << std::endl; + using std::atanh; std::cout << "atanh(z1) : " << atanh(z1) << std::endl; } @@ -85,9 +102,10 @@ int main() std::cout << std::setprecision(std::numeric_limits::digits10); complex_number_examples(); - std::cout << "\nNow the same elementary functions performed using built-in real-valued numbers:\n"; - std::cout << std::setprecision(std::numeric_limits::digits10); - elementary_functions(0.125F); + std::cout << "\nNow the elementary functions performed using built-in, real-valued long double numbers:\n"; + std::cout << std::setprecision(std::numeric_limits::digits10); + const long double ld_arg { 0.125L }; + elementary_functions(ld_arg); std::cout.flags(flags_orig); } From 2ad2822bfd7c8bd7a8b55d68c9c168857dff6109 Mon Sep 17 00:00:00 2001 From: ckormanyos Date: Mon, 14 Jul 2025 09:47:28 +0200 Subject: [PATCH 3/3] Tuning and simplification complex example --- example/cpp_complex_examples.cpp | 185 ++++++++++++------------------- 1 file changed, 71 insertions(+), 114 deletions(-) diff --git a/example/cpp_complex_examples.cpp b/example/cpp_complex_examples.cpp index fef0dcb7..2e116629 100644 --- a/example/cpp_complex_examples.cpp +++ b/example/cpp_complex_examples.cpp @@ -11,139 +11,96 @@ In the following, we will show how using the complex_adaptor backend together wi */ //[cpp_complex_eg +#include +#include #include -#include -#include -#include - -template -void elementary_functions(const NumericType z1) -{ - std::cout << "\nElementary special functions:\n"; - std::cout << "Absolute value : " << abs(z1) << std::endl; - using std::arg; - std::cout << "Argument : " << arg(z1) << std::endl; - using std::norm; - std::cout << "Norm : " << norm(z1) << std::endl; - using std::conj; - std::cout << "Complex conjugate : " << conj(z1) << std::endl; - using std::proj; - std::cout << "Proj on Riemann sphere : " << proj(z1) << std::endl; - using std::exp; - std::cout << "exp(z1) : " << exp(z1) << std::endl; - using std::log; - std::cout << "log(z1) : " << log(z1) << std::endl; - using std::log10; - std::cout << "log10(z1) : " << log10(z1) << std::endl; - using std::pow; - std::cout << "pow(z1, z1) : " << pow(z1, z1) << std::endl; - using std::sqrt; - std::cout << "Take its square root : " << sqrt(z1) << std::endl; - using std::sin; - std::cout << "sin(z1) : " << sin(z1) << std::endl; - using std::cos; - std::cout << "cos(z1) : " << cos(z1) << std::endl; - using std::tan; - std::cout << "tan(z1) : " << tan(z1) << std::endl; - using std::asin; - std::cout << "asin(z1) : " << asin(z1) << std::endl; - using std::acos; - std::cout << "acos(z1) : " << acos(z1) << std::endl; - using std::atan; - std::cout << "atan(z1) : " << atan(z1) << std::endl; - using std::sinh; - std::cout << "sinh(z1) : " << sinh(z1) << std::endl; - using std::cosh; - std::cout << "cosh(z1) : " << cosh(z1) << std::endl; - using std::tanh; - std::cout << "tanh(z1) : " << tanh(z1) << std::endl; - using std::asinh; - std::cout << "asinh(z1) : " << asinh(z1) << std::endl; - using std::acosh; - std::cout << "acosh(z1) : " << acosh(z1) << std::endl; - using std::atanh; - std::cout << "atanh(z1) : " << atanh(z1) << std::endl; -} - -template +template void complex_number_examples() { - using complex_type = ComplexType; - using real_type = typename complex_type::value_type; + Complex z1{0, 1}; + std::cout << std::setprecision(std::numeric_limits::digits10); + std::cout << std::scientific << std::fixed; + std::cout << "Print a complex number : " << z1 << std::endl; + std::cout << "Square it : " << z1*z1 << std::endl; + std::cout << "Real part : " << z1.real() << " = " << real(z1) << std::endl; + std::cout << "Imaginary part : " << z1.imag() << " = " << imag(z1) << std::endl; + std::cout << "Absolute value : " << abs(z1) << std::endl; + std::cout << "Argument : " << arg(z1) << std::endl; + std::cout << "Norm : " << norm(z1) << std::endl; + std::cout << "Complex conjugate : " << conj(z1) << std::endl; + std::cout << "Proj onto Riemann sphere : " << proj(z1) << std::endl; + typename Complex::value_type r = 1; + typename Complex::value_type theta = 0.8; - complex_type z1 { real_type(0), real_type(1) }; - - std::cout << "Print a complex number : " << z1 << std::endl; - std::cout << "Square it : " << z1*z1 << std::endl; - std::cout << "Real part : " << z1.real() << " = " << real(z1) << std::endl; - std::cout << "Imaginary part : " << z1.imag() << " = " << imag(z1) << std::endl; - - real_type r { 1 }; - real_type theta { 0.75 }; + // We need a using declaration here, since polar is called with a scalar: using std::polar; - std::cout << "Polar coord phase = 0 : " << polar(r) << std::endl; - std::cout << "Polar coord phase != 0 : " << polar(r, theta) << std::endl; - elementary_functions(z1); + std::cout << "Polar coord phase = 0 : " << polar(r) << std::endl; + std::cout << "Polar coord phase != 0 : " << polar(r, theta) << std::endl; + + std::cout << "\nElementary special functions:\n"; + std::cout << "exp(z1) : " << exp(z1) << std::endl; + std::cout << "log(z1) : " << log(z1) << std::endl; + std::cout << "log10(z1) : " << log10(z1) << std::endl; + std::cout << "pow(z1, z1) : " << pow(z1, z1) << std::endl; + std::cout << "Take its square root : " << sqrt(z1) << std::endl; + std::cout << "sin(z1) : " << sin(z1) << std::endl; + std::cout << "cos(z1) : " << cos(z1) << std::endl; + std::cout << "tan(z1) : " << tan(z1) << std::endl; + std::cout << "asin(z1) : " << asin(z1) << std::endl; + std::cout << "acos(z1) : " << acos(z1) << std::endl; + std::cout << "atan(z1) : " << atan(z1) << std::endl; + std::cout << "sinh(z1) : " << sinh(z1) << std::endl; + std::cout << "cosh(z1) : " << cosh(z1) << std::endl; + std::cout << "tanh(z1) : " << tanh(z1) << std::endl; + std::cout << "asinh(z1) : " << asinh(z1) << std::endl; + std::cout << "acosh(z1) : " << acosh(z1) << std::endl; + std::cout << "atanh(z1) : " << atanh(z1) << std::endl; } int main() { - const auto flags_orig = std::cout.flags(); - - std::cout << std::scientific << std::fixed; - - std::cout << "First, some operations we usually perform with std::complex:\n"; - std::cout << std::setprecision(std::numeric_limits::value_type>::digits10); + std::cout << "First, some operations performed with std::complex:\n"; complex_number_examples>(); - std::cout << "\nNow the same operations performed using quad precision complex numbers:\n"; - std::cout << std::setprecision(std::numeric_limits::digits10); + std::cout << "\nNow the same operations performed with quad precision complex numbers:\n"; complex_number_examples(); - - std::cout << "\nNow the elementary functions performed using built-in, real-valued long double numbers:\n"; - std::cout << std::setprecision(std::numeric_limits::digits10); - const long double ld_arg { 0.125L }; - elementary_functions(ld_arg); - - std::cout.flags(flags_orig); -} -//] +}//] /* //[cpp_complex_out - -Print a complex number : (0.000000000000000000000000000000000,1.000000000000000000000000000000000) -Square it : -1.000000000000000000000000000000000 -Real part : 0.000000000000000000000000000000000 = 0.000000000000000000000000000000000 -Imaginary part : 1.000000000000000000000000000000000 = 1.000000000000000000000000000000000 -Polar coord phase = 0 : 1.000000000000000000000000000000000 -Polar coord phase != 0 : (0.731688868873820886311838753000085,0.681638760023334166733241952779894) +Now the same operations performed using quad precision complex numbers: +Print a complex number : (0.000000000000000000000000000000000,1.000000000000000000000000000000000) +Square it : -1.000000000000000000000000000000000 +Real part : 0.000000000000000000000000000000000 = 0.000000000000000000000000000000000 +Imaginary part : 1.000000000000000000000000000000000 = 1.000000000000000000000000000000000 +Absolute value : 1.000000000000000000000000000000000 +Argument : 1.570796326794896619231321691639751 +Norm : 1.000000000000000000000000000000000 +Complex conjugate : (0.000000000000000000000000000000000,-1.000000000000000000000000000000000) +Proj onto Riemann sphere : (0.000000000000000000000000000000000,1.000000000000000000000000000000000) +Polar coord phase = 0 : 1.000000000000000000000000000000000 +Polar coord phase != 0 : (0.696706709347165389063740022772448,0.717356090899522792567167815703377) Elementary special functions: -Absolute value : 1.000000000000000000000000000000000 -Argument : 1.570796326794896619231321691639751 -Norm : 1.000000000000000000000000000000000 -Complex conjugate : (0.000000000000000000000000000000000,-1.000000000000000000000000000000000) -Proj on Riemann sphere : (0.000000000000000000000000000000000,1.000000000000000000000000000000000) -exp(z1) : (0.540302305868139717400936607442977,0.841470984807896506652502321630299) -log(z1) : (0.000000000000000000000000000000000,1.570796326794896619231321691639751) -log10(z1) : (0.000000000000000000000000000000000,0.682188176920920673742891812715678) -pow(z1, z1) : 0.207879576350761908546955619834979 -Take its square root : (0.707106781186547524400844362104849,0.707106781186547524400844362104849) -sin(z1) : (0.000000000000000000000000000000000,1.175201193643801456882381850595601) -cos(z1) : 1.543080634815243778477905620757062 -tan(z1) : (0.000000000000000000000000000000000,0.761594155955764888119458282604794) -asin(z1) : (0.000000000000000000000000000000000,0.881373587019543025232609324979792) -acos(z1) : (1.570796326794896619231321691639751,-0.881373587019543025232609324979792) -atan(z1) : (0.000000000000000000000000000000000,inf) -sinh(z1) : (0.000000000000000000000000000000000,0.841470984807896506652502321630299) -cosh(z1) : 0.540302305868139717400936607442977 -tanh(z1) : (0.000000000000000000000000000000000,1.557407724654902230506974807458360) -asinh(z1) : (0.000000000000000000000000000000000,1.570796326794896619231321691639751) -acosh(z1) : (0.881373587019543025232609324979792,1.570796326794896619231321691639751) -atanh(z1) : (0.000000000000000000000000000000000,0.785398163397448309615660845819876) +exp(z1) : (0.540302305868139717400936607442977,0.841470984807896506652502321630299) +log(z1) : (0.000000000000000000000000000000000,1.570796326794896619231321691639751) +log10(z1) : (0.000000000000000000000000000000000,0.682188176920920673742891812715678) +pow(z1, z1) : 0.207879576350761908546955619834979 +Take its square root : (0.707106781186547524400844362104849,0.707106781186547524400844362104849) +sin(z1) : (0.000000000000000000000000000000000,1.175201193643801456882381850595601) +cos(z1) : 1.543080634815243778477905620757062 +tan(z1) : (0.000000000000000000000000000000000,0.761594155955764888119458282604794) +asin(z1) : (0.000000000000000000000000000000000,0.881373587019543025232609324979792) +acos(z1) : (1.570796326794896619231321691639751,-0.881373587019543025232609324979792) +atan(z1) : (0.000000000000000000000000000000000,inf) +sinh(z1) : (0.000000000000000000000000000000000,0.841470984807896506652502321630299) +cosh(z1) : 0.540302305868139717400936607442977 +tanh(z1) : (0.000000000000000000000000000000000,1.557407724654902230506974807458360) +asinh(z1) : (0.000000000000000000000000000000000,1.570796326794896619231321691639751) +acosh(z1) : (0.881373587019543025232609324979792,1.570796326794896619231321691639751) +atanh(z1) : (0.000000000000000000000000000000000,0.785398163397448309615660845819876) //] */