Real constants and functions: Difference between revisions
Content added Content deleted
(→{{header|C++}}: Boost lib) |
(→{{header|C++}}: comment) |
||
Line 472: | Line 472: | ||
<< "\nlg(100) = " << std::log10(100.0) |
<< "\nlg(100) = " << std::log10(100.0) |
||
<< "\nexp(3) = " << std::exp(3.0) |
<< "\nexp(3) = " << std::exp(3.0) |
||
<< "\n|-4.5| = " << std::abs(-4.5) // or std::fabs(4. |
<< "\n|-4.5| = " << std::abs(-4.5) // or std::fabs(-4.5); both work in C++ |
||
<< "\nfloor(4.5) = " << std::floor(4.5) |
<< "\nfloor(4.5) = " << std::floor(4.5) |
||
<< "\nceiling(4.5) = " << std::ceil(4.5) |
<< "\nceiling(4.5) = " << std::ceil(4.5) |
||
Line 494: | Line 494: | ||
<< "\nln(e) = " << std::log(e) |
<< "\nln(e) = " << std::log(e) |
||
<< "\nlg(100) = " << std::log10(100.0) |
<< "\nlg(100) = " << std::log10(100.0) |
||
<< "\n|-4.5| = " << std::abs(-4.5) |
<< "\n|-4.5| = " << std::abs(-4.5) |
||
<< "\nfloor(4.5) = " << std::floor(4.5) |
<< "\nfloor(4.5) = " << std::floor(4.5) |
||
<< "\nceiling(4.5) = " << std::ceil(4.5) << std::endl; |
<< "\nceiling(4.5) = " << std::ceil(4.5) << std::endl; |