var searchIndex = {}; searchIndex["num_rational"] = {"doc":"Rational numbers","items":[[3,"Ratio","num_rational","Represents the ratio between 2 numbers.",null,null],[3,"ParseRatioError","","",null,null],[6,"Rational","","Alias for a `Ratio` of machine-sized integers.",null,null],[6,"Rational32","","",null,null],[6,"Rational64","","",null,null],[6,"BigRational","","Alias for arbitrary precision rationals.",null,null],[11,"fmt","","",0,null],[11,"hash","","",0,null],[11,"clone","","",0,null],[11,"decode","","",0,{"inputs":[{"name":"__dt"}],"output":{"name":"result"}}],[11,"encode","","",0,null],[11,"new","","Creates a new `Ratio`. Fails if `denom` is zero.",0,{"inputs":[{"name":"t"},{"name":"t"}],"output":{"name":"ratio"}}],[11,"from_integer","","Creates a `Ratio` representing the integer `t`.",0,{"inputs":[{"name":"t"}],"output":{"name":"ratio"}}],[11,"new_raw","","Creates a `Ratio` without checking for `denom == 0` or reducing.",0,{"inputs":[{"name":"t"},{"name":"t"}],"output":{"name":"ratio"}}],[11,"to_integer","","Converts to an integer, rounding towards zero.",0,null],[11,"numer","","Gets an immutable reference to the numerator.",0,null],[11,"denom","","Gets an immutable reference to the denominator.",0,null],[11,"is_integer","","Returns true if the rational number is an integer (denominator is 1).",0,null],[11,"reduced","","Returns a reduced copy of self.",0,null],[11,"recip","","Returns the reciprocal.",0,null],[11,"floor","","Rounds towards minus infinity.",0,null],[11,"ceil","","Rounds towards plus infinity.",0,null],[11,"round","","Rounds to the nearest integer. Rounds half-way cases away from zero.",0,null],[11,"trunc","","Rounds towards zero.",0,null],[11,"fract","","Returns the fractional part of a number, with division rounded towards zero.",0,null],[11,"pow","","Raises the `Ratio` to the power of an exponent.",0,null],[11,"from_float","","Converts a float into a rational number.",0,{"inputs":[{"name":"t"}],"output":{"name":"option"}}],[11,"cmp","","",0,null],[11,"partial_cmp","","",0,null],[11,"eq","","",0,null],[11,"mul","","",0,null],[11,"mul","","",0,null],[11,"div","","",0,null],[11,"div","","",0,null],[11,"add","","",0,null],[11,"add","","",0,null],[11,"sub","","",0,null],[11,"sub","","",0,null],[11,"rem","","",0,null],[11,"rem","","",0,null],[11,"neg","","",0,null],[11,"zero","","",0,{"inputs":[],"output":{"name":"ratio"}}],[11,"is_zero","","",0,null],[11,"one","","",0,{"inputs":[],"output":{"name":"ratio"}}],[11,"from_str_radix","","Parses `numer/denom` where the numbers are in base `radix`.",0,{"inputs":[{"name":"str"},{"name":"u32"}],"output":{"name":"result"}}],[11,"abs","","",0,null],[11,"abs_sub","","",0,null],[11,"signum","","",0,null],[11,"is_positive","","",0,null],[11,"is_negative","","",0,null],[11,"fmt","","Renders as `numer/denom`. If denom=1, renders as numer.",0,null],[11,"from_str","","Parses `numer/denom` or just `numer`.",0,{"inputs":[{"name":"str"}],"output":{"name":"result"}}],[11,"eq","","",1,null],[11,"ne","","",1,null],[11,"fmt","","",1,null],[11,"clone","","",1,null],[11,"fmt","","",1,null],[11,"description","","",1,null]],"paths":[[3,"Ratio"],[3,"ParseRatioError"]]}; initSearch(searchIndex);