.TH "std::ratio< _Num, _Den >" 3cxx "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME std::ratio< _Num, _Den > \- Provides compile-time rational arithmetic\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .SS "Public Types" .in +1c .ti -1c .RI "\fBtypedef\fP \fBratio\fP< num, den > \fBtype\fP" .br .in -1c .SS "Static Public Attributes" .in +1c .ti -1c .RI "\fBstatic\fP \fBconstexpr\fP \fBintmax_t\fP \fBden\fP" .br .ti -1c .RI "\fBstatic\fP \fBconstexpr\fP \fBintmax_t\fP \fBnum\fP" .br .in -1c .SH "Detailed Description" .PP .SS "template<\fBintmax_t\fP _Num, \fBintmax_t\fP _Den = 1> .br struct std::ratio< _Num, _Den >"Provides compile-time rational arithmetic\&. This class template represents any finite rational number with a numerator and denominator representable by compile-time constants of type intmax_t\&. The ratio is simplified when instantiated\&. .PP For example: .PP .nf std::ratio<7,\-21>::num == \-1; std::ratio<7,\-21>::den == 3; .fi .PP .PP Definition at line \fB261\fP of file \fBratio\fP\&. .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.