C..3 区間であることが必要ならば Hull() で格上げ

test2.cpp

// test2.cpp
// g++ -I/usr/local/include/profil -o test2 test2.cpp -lProfil -lBias -llr
//

#include <iostream>
#include <iomanip>
#include <Interval.h>
using namespace std;

int main(void)
{
  int N = 3;
  cout << setprecision(18);
  cout << 1 / N << endl;
  cout << Hull(1) / N << endl;
  cout << 1 / Hull(N) << endl;
  cout << (INTERVAL) 1 / N << endl;
  cout << INTERVAL(1) / N << endl;
  cout << 1 / (INTERVAL) N << endl;
  cout << 1 / INTERVAL(N) << endl;
  cout << "幅=" << Diam(1/Hull(N)) << endl;

  return 0;
}
test2 の結果

[katsurada-no-MacBook-Air-4:~/work/tmp] mk% ./test2
0
0.333333333333333[3,4]
0.333333333333333[3,4]
0.333333333333333[3,4]
0.333333333333333[3,4]
0.333333333333333[3,4]
0.333333333333333[3,4]
幅=5.55111512312578271e-17
[katsurada-no-MacBook-Air-4:~/work/tmp] mk%

桂田 祐史
2020-09-03