rangexpr.cc 373 B

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