diff options
author | Brad King <brad.king@kitware.com> | 2022-06-02 13:20:52 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2022-06-02 13:21:06 (GMT) |
commit | dbb6e04b5fe45c413fb3a06b52ffceb5e86bf60c (patch) | |
tree | 24135a7724cfe50b036521f67ebb1d878d827ee7 /Help/guide/tutorial/Step6/MathFunctions/mysqrt.cxx | |
parent | 4c9aa6c4256bc78ffd4c5fb3e7fe8adc6533dc46 (diff) | |
parent | 5c84eca2108c8b47a74391c732710c67e23adfa3 (diff) | |
download | CMake-dbb6e04b5fe45c413fb3a06b52ffceb5e86bf60c.zip CMake-dbb6e04b5fe45c413fb3a06b52ffceb5e86bf60c.tar.gz CMake-dbb6e04b5fe45c413fb3a06b52ffceb5e86bf60c.tar.bz2 |
Merge topic 'tutorial-cmath'
5c84eca210 Tutorial: Simplify logic checking for cmath functions
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7314
Diffstat (limited to 'Help/guide/tutorial/Step6/MathFunctions/mysqrt.cxx')
-rw-r--r-- | Help/guide/tutorial/Step6/MathFunctions/mysqrt.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Help/guide/tutorial/Step6/MathFunctions/mysqrt.cxx b/Help/guide/tutorial/Step6/MathFunctions/mysqrt.cxx index 0637063..7eecd26 100644 --- a/Help/guide/tutorial/Step6/MathFunctions/mysqrt.cxx +++ b/Help/guide/tutorial/Step6/MathFunctions/mysqrt.cxx @@ -12,7 +12,7 @@ double mysqrt(double x) // if we have both log and exp then use them #if defined(HAVE_LOG) && defined(HAVE_EXP) - double result = exp(log(x) * 0.5); + double result = std::exp(std::log(x) * 0.5); std::cout << "Computing sqrt of " << x << " to be " << result << " using log and exp" << std::endl; #else |