Template for irrationals without approxiimation

As the title suggests I am looking for a template that handles arithmetic with irrationals without converting them into doubles

I have a rough idea of what's to be in the template but if something like this already exists I would love to use it.
So you want a computer algebra system? There's a few libraries that do that. This is the first one for C++ that shows up on Google:
https://www.ginac.de/
Last edited on
Search this forum for "rational" and "fraction." There are dozens of examples, although I don't know if many use a template, most just use an integer for numerator and denominator.

What would your template parameter be?
Topic archived. No new replies allowed.