rangexpr.cc 300 B

1234567891011121314151617
  1. // -*- mode: c++; coding: utf-8 -*-
  2. // Adapted from blitz++/examples/rangexpr.cpp
  3. // Daniel Llorens - 2015
  4. #include "ra/ra.hh"
  5. #include <iostream>
  6. using std::cout, std::endl, ra::PI;
  7. int main()
  8. {
  9. ra::Big<float, 1> x = cos(ra::iota(8) * (2.0 * PI / 8));
  10. cout << x << endl;
  11. return 0;
  12. }