2013-06-13から1日間の記事一覧

inf

C++

※VCの場合はfloat.hに_finiteがあることがわかった。 #include <iostream> #include <cmath> using namespace std; int main() { cout << log10(0) << endl; // -inf cout << isinf(log10(0)) << endl; // 1 cout << isfinite(log10(0)) << endl; // 0 cout << (int)log10(0) <</cmath></iostream>…