.TH "std::ratio< _Num, _Den >" 3cxx "Tue Jul 18 2023" "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME std::ratio< _Num, _Den > \- Provides compile-time rational arithmetic\&. .SH SYNOPSIS .br .PP .SS "Public Types" .in +1c .ti -1c .RI "typedef \fBratio\fP< num, den > \fBtype\fP" .br .in -1c .SS "Static Public Attributes" .in +1c .ti -1c .RI "static constexpr intmax_t \fBden\fP" .br .ti -1c .RI "static constexpr intmax_t \fBnum\fP" .br .in -1c .SH "Detailed Description" .PP .SS "template .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 .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.